Skip to content

Commit 038f6a3

Browse files
committed
🐳 chore: Upgrade V8 to v13.1.201.8
1 parent 250cf30 commit 038f6a3

22 files changed

+31
-43
lines changed

.github/workflows/android_v8_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
JAVET_V8_VERSION: 13.0.245.16
11+
JAVET_V8_VERSION: 13.1.201.8
1212
JAVET_VERSION: 4.1.0
1313
ROOT: /home/runner/work/Javet
1414

.github/workflows/linux_build_artifact.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1919
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
2020
JAVET_NODE_VERSION: 22.11.0
21-
JAVET_V8_VERSION: 13.0.245.16
21+
JAVET_V8_VERSION: 13.1.201.8
2222
JAVET_VERSION: 4.1.0
2323

2424
jobs:

.github/workflows/linux_build_node_v8_image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
2323
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
2424
JAVET_NODE_VERSION: 22.11.0
25-
JAVET_V8_VERSION: 13.0.245.16
25+
JAVET_V8_VERSION: 13.1.201.8
2626
JAVET_VERSION: 4.1.0
2727

2828
# if we skip a job using a job level `if` condition, then any dependent jobs also don't run.

.github/workflows/linux_x86_64_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
JAVET_NODE_VERSION: 22.11.0
11-
JAVET_V8_VERSION: 13.0.245.16
11+
JAVET_V8_VERSION: 13.1.201.8
1212
JAVET_VERSION: 4.1.0
1313
ROOT: /home/runner/work/Javet
1414

.github/workflows/macos_arm64_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
JAVET_NODE_VERSION: 22.11.0
11-
JAVET_V8_VERSION: 13.0.245.16
11+
JAVET_V8_VERSION: 13.1.201.8
1212
JAVET_VERSION: 4.1.0
1313
ROOT: /Users/runner/work/Javet
1414

.github/workflows/macos_x86_64_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
JAVET_NODE_VERSION: 22.11.0
11-
JAVET_V8_VERSION: 13.0.245.16
11+
JAVET_V8_VERSION: 13.1.201.8
1212
JAVET_VERSION: 4.1.0
1313
ROOT: /Users/runner/work/Javet
1414

.github/workflows/windows_x86_64_build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
JAVET_NODE_VERSION: 22.11.0
11-
JAVET_V8_VERSION: 13.0.245.16
11+
JAVET_V8_VERSION: 13.1.201.8
1212
JAVET_VERSION: 4.1.0
1313
ROOT: D:\a\Javet
1414

@@ -66,6 +66,7 @@ jobs:
6666
python3 tools\dev\v8gen.py x64.release -- v8_monolithic=true v8_use_external_startup_data=false is_component_build=false ${{ matrix.v8_flag }} v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
6767
..\depot_tools\gn.bat gen out.gn/x64.release
6868
python3 ${{ env.ROOT }}\Javet\scripts\python\patch_v8_build.py -p .\
69+
..\depot_tools\ninja.bat -C out.gn/x64.release v8_monolith || python3 ${{ env.ROOT }}\Javet\scripts\python\patch_v8_build.py -p .\
6970
..\depot_tools\ninja.bat -C out.gn/x64.release v8_monolith
7071
move out.gn out.gn.${{ matrix.name }}
7172

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ arm ✔️ ❌ ❌ ❌
5050
arm64 ✔️ ✔️ ✔️ ❌
5151
=========== ======= ======= ======= =======
5252

53-
* Node.js ``v22.11.0`` + V8 ``v13.0.245.16``
53+
* Node.js ``v22.11.0`` + V8 ``v13.1.201.8``
5454
* i18n and non-i18n
5555
* Dynamic switch between Node.js and V8 mode
5656
* Polyfill V8 mode with `Javenode <https://github.com/caoccao/Javenode>`_

cpp/jni/javet_jni_function.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -151,25 +151,6 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionCopyS
151151
// Clone the shared function info
152152
targetV8InternalShared = *v8InternalIsolate->factory()->CloneSharedFunctionInfo(
153153
v8::internal::handle(sourceV8InternalShared, v8InternalIsolate));
154-
// Clone the scope info
155-
#ifdef ENABLE_NODE
156-
auto sourceScopeInfo = sourceV8InternalShared->scope_info();
157-
auto emptyBlocklistHandle = V8InternalStringSet::New(v8InternalIsolate);
158-
auto targetScopeInfo = *V8InternalScopeInfo::RecreateWithBlockList(
159-
v8InternalIsolate, v8::internal::handle(sourceScopeInfo, v8InternalIsolate), emptyBlocklistHandle);
160-
targetV8InternalShared->set_raw_scope_info(targetScopeInfo);
161-
#else
162-
auto sourceScopeInfo = sourceV8InternalShared->scope_info();
163-
const int length = (sourceScopeInfo->AllocatedSize() - V8InternalHeapObject::kHeaderSize) / v8::internal::kTaggedSize;
164-
auto targetScopeInfo = v8InternalIsolate->factory()->NewScopeInfo(length);
165-
v8InternalIsolate->heap()->CopyRange(
166-
*targetScopeInfo,
167-
targetScopeInfo->data_start(),
168-
sourceScopeInfo->data_start(),
169-
length,
170-
V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER);
171-
targetV8InternalShared->set_raw_scope_info(*targetScopeInfo);
172-
#endif
173154
targetV8InternalFunction.set_shared(targetV8InternalShared, V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER);
174155
success = true;
175156
}

cpp/jni/javet_v8.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717

1818
#pragma once
1919

20+
#pragma warning(disable: 4018)
2021
#pragma warning(disable: 4244)
2122
#include <libplatform/libplatform.h>
22-
#pragma warning(default: 4244)
2323
#include <v8.h>
2424
#include <v8-inspector.h>
25+
#pragma warning(default: 4018)
26+
#pragma warning(default: 4244)
2527

2628
#ifdef _WIN32
2729
#pragma comment(lib, "DbgHelp.lib")

cpp/jni/javet_v8_internal.h

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
#pragma warning(disable: 4065)
27+
#pragma warning(disable: 4018)
2728
#pragma warning(disable: 4146)
2829
#pragma warning(disable: 4244)
2930
#pragma warning(disable: 4267)
@@ -48,6 +49,7 @@
4849
#include <src/inspector/v8-inspector-impl.h>
4950

5051
#pragma warning(default: 4065)
52+
#pragma warning(default: 4018)
5153
#pragma warning(default: 4146)
5254
#pragma warning(default: 4244)
5355
#pragma warning(default: 4267)

docker/android/base.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Usage: docker build -t sjtucaocao/javet-android:4.1.0 -f docker/android/base.Dockerfile .
1717

18-
ARG JAVET_V8_VERSION=13.0.245.16
18+
ARG JAVET_V8_VERSION=13.1.201.8
1919

2020
FROM ubuntu:20.04
2121
WORKDIR /

docker/linux-arm64/base_all_in_one.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Usage: docker build -t sjtucaocao/javet-arm64:4.1.0 -f docker/linux-arm64/base_all_in_one.Dockerfile .
1717

1818
ARG JAVET_NODE_VERSION=18.15.0
19-
ARG JAVET_V8_VERSION=13.0.245.16
19+
ARG JAVET_V8_VERSION=13.1.201.8
2020

2121
FROM ubuntu:20.04
2222
WORKDIR /

docker/linux-arm64/base_v8.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
# limitations under the License.
1515

1616
# Usage: docker build \
17-
# -t sjtucaocao/javet:arm64-base-v8_13.0.245.16 \
17+
# -t sjtucaocao/javet:arm64-base-v8_13.1.201.8 \
1818
# --build-arg JAVET_REPO=sjtucaocao/javet \
19-
# --build-arg JAVET_V8_VERSION=13.0.245.16 \
19+
# --build-arg JAVET_V8_VERSION=13.1.201.8 \
2020
# -f docker/linux-arm64/base_v8.Dockerfile .
2121

2222
ARG JAVET_REPO=sjtucaocao/javet
23-
ARG JAVET_V8_VERSION=13.0.245.16
23+
ARG JAVET_V8_VERSION=13.1.201.8
2424

2525
FROM ${JAVET_REPO}:arm64-base-jvm
2626

docker/linux-x86_64/base_all_in_one.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM ubuntu:20.04
1919
WORKDIR /
2020

2121
ARG JAVET_NODE_VERSION=22.11.0
22-
ARG JAVET_V8_VERSION=13.0.245.16
22+
ARG JAVET_V8_VERSION=13.1.201.8
2323

2424
# Update Ubuntu
2525
ENV DEBIAN_FRONTEND=noninteractive

docker/linux-x86_64/base_v8.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
# limitations under the License.
1515

1616
# Usage: docker build \
17-
# -t sjtucaocao/javet:x86_64-base-v8_13.0.245.16 \
17+
# -t sjtucaocao/javet:x86_64-base-v8_13.1.201.8 \
1818
# --build-arg JAVET_REPO=sjtucaocao/javet \
19-
# --build-arg JAVET_V8_VERSION=13.0.245.16 \
19+
# --build-arg JAVET_V8_VERSION=13.1.201.8 \
2020
# -f docker/linux-x86_64/base_v8.Dockerfile .
2121

2222
ARG JAVET_REPO=sjtucaocao/javet
23-
ARG JAVET_V8_VERSION=13.0.245.16
23+
ARG JAVET_V8_VERSION=13.1.201.8
2424

2525
FROM ${JAVET_REPO}:x86_64-base-jvm
2626

docker/linux-x86_64/build.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
JAVET_REPO=sjtucaocao/javet
22
JAVET_VERSION=4.1.0
3-
JAVET_V8_VERSION=13.0.245.16
3+
JAVET_V8_VERSION=13.1.201.8
44
JAVET_NODE_VERSION=22.11.0

docker/windows-x86_64/base.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# Usage: docker build -t sjtucaocao/javet-windows:4.1.0 -m 4G -f docker/windows-x86_64/base.Dockerfile .
3333

3434
ARG JAVET_NODE_VERSION=22.11.0
35-
ARG JAVET_V8_VERSION=13.0.245.16
35+
ARG JAVET_V8_VERSION=13.1.201.8
3636

3737
# https://hub.docker.com/_/microsoft-windows
3838
FROM mcr.microsoft.com/windows:20H2-amd64

docs/release_notes/release_notes_4_0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release Notes 4.0.x - 4.1.x
66
-----
77

88
* Upgraded Node.js to ``v22.11.0`` `(2024-10-29) <https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.11.0>`_
9+
* Upgraded V8 to ``v13.1.201.8`` (2024-11-11)
910
* Switched to core dependency + individual native dependency
1011
* Supported ``Float16Array``
1112
* Added ``Float16``

scripts/python/change_node_v8_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def update(self) -> None:
172172
def main():
173173
change_node_version = ChangeNodeVersion('22.11.0')
174174
change_node_version.update()
175-
change_v8_version = ChangeV8Version('13.0.245.16')
175+
change_v8_version = ChangeV8Version('13.1.201.8')
176176
change_v8_version.update()
177177
return 0
178178

src/main/java/com/caoccao/javet/enums/JSRuntimeType.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public enum JSRuntimeType {
6060
V8(
6161
"v8",
6262
false,
63-
"13.0.245.16",
63+
"13.1.201.8",
6464
V8RuntimeOptions::new,
6565
o -> o instanceof V8RuntimeOptions),
6666
/**
@@ -71,7 +71,7 @@ public enum JSRuntimeType {
7171
V8I18n(
7272
"v8",
7373
true,
74-
"13.0.245.16",
74+
"13.1.201.8",
7575
V8RuntimeOptions::new,
7676
o -> o instanceof V8RuntimeOptions);
7777

src/test/java/com/caoccao/javet/values/reference/TestV8ValueFunction.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,8 @@ public void testGetAndSetScriptSource() throws JavetException {
15921592
crackedV8ValueFunction.canDiscardCompiled(),
15931593
"The cracked function should support discard compiled.");
15941594
assertEquals(2, originalV8ValueFunction.callInteger(null));
1595-
assertEquals(originalScriptSource, originalV8ValueFunction.getScriptSource());
1595+
assertEquals(originalScriptSource.getCode(), originalV8ValueFunction.getScriptSource().getCode());
1596+
assertTrue(originalV8ValueFunction.setScriptSource(originalScriptSource));
15961597
assertFalse(
15971598
originalV8ValueFunction.setScriptSource(originalScriptSource),
15981599
"The original function remains unchanged.");

0 commit comments

Comments
 (0)