From 782d4ea239f5d6d53f5ed992780b47645f381391 Mon Sep 17 00:00:00 2001 From: Sam Cao Date: Sun, 15 Sep 2024 10:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore:=20Upgrade=20V8=20to=20v12?= =?UTF-8?q?.9.202.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android_v8_build.yml | 2 +- .github/workflows/linux_build_artifact.yml | 2 +- .../workflows/linux_build_node_v8_image.yml | 2 +- .github/workflows/linux_x86_64_build.yml | 2 +- .github/workflows/macos_arm64_build.yml | 2 +- .github/workflows/macos_x86_64_build.yml | 2 +- .github/workflows/windows_x86_64_build.yml | 2 +- README.rst | 2 +- cpp/jni/javet_jni_function.cpp | 63 ++++++++++--------- docker/android/base.Dockerfile | 2 +- docker/linux-arm64/base_all_in_one.Dockerfile | 2 +- docker/linux-arm64/base_v8.Dockerfile | 6 +- .../linux-x86_64/base_all_in_one.Dockerfile | 2 +- docker/linux-x86_64/base_v8.Dockerfile | 6 +- docker/linux-x86_64/build.env | 2 +- docker/windows-x86_64/base.Dockerfile | 2 +- docs/release_notes/release_notes_3_1.rst | 6 ++ scripts/python/change_node_v8_version.py | 2 +- .../caoccao/javet/enums/JSRuntimeType.java | 2 +- 19 files changed, 61 insertions(+), 50 deletions(-) diff --git a/.github/workflows/android_v8_build.yml b/.github/workflows/android_v8_build.yml index 621c355e..26ba1c96 100644 --- a/.github/workflows/android_v8_build.yml +++ b/.github/workflows/android_v8_build.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 ROOT: /home/runner/work/Javet diff --git a/.github/workflows/linux_build_artifact.yml b/.github/workflows/linux_build_artifact.yml index 8ebefedf..8c1a4a65 100644 --- a/.github/workflows/linux_build_artifact.yml +++ b/.github/workflows/linux_build_artifact.yml @@ -18,7 +18,7 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }} JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 jobs: diff --git a/.github/workflows/linux_build_node_v8_image.yml b/.github/workflows/linux_build_node_v8_image.yml index 25201ede..66a32b23 100644 --- a/.github/workflows/linux_build_node_v8_image.yml +++ b/.github/workflows/linux_build_node_v8_image.yml @@ -22,7 +22,7 @@ env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }} JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 # if we skip a job using a job level `if` condition, then any dependent jobs also don't run. diff --git a/.github/workflows/linux_x86_64_build.yml b/.github/workflows/linux_x86_64_build.yml index ecf0985c..751cc546 100644 --- a/.github/workflows/linux_x86_64_build.yml +++ b/.github/workflows/linux_x86_64_build.yml @@ -8,7 +8,7 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 ROOT: /home/runner/work/Javet diff --git a/.github/workflows/macos_arm64_build.yml b/.github/workflows/macos_arm64_build.yml index 44a5ba23..5c70c120 100644 --- a/.github/workflows/macos_arm64_build.yml +++ b/.github/workflows/macos_arm64_build.yml @@ -8,7 +8,7 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 ROOT: /Users/runner/work/Javet diff --git a/.github/workflows/macos_x86_64_build.yml b/.github/workflows/macos_x86_64_build.yml index f5e6a838..3b345285 100644 --- a/.github/workflows/macos_x86_64_build.yml +++ b/.github/workflows/macos_x86_64_build.yml @@ -8,7 +8,7 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 ROOT: /Users/runner/work/Javet diff --git a/.github/workflows/windows_x86_64_build.yml b/.github/workflows/windows_x86_64_build.yml index 674a1f26..0e83e375 100644 --- a/.github/workflows/windows_x86_64_build.yml +++ b/.github/workflows/windows_x86_64_build.yml @@ -8,7 +8,7 @@ on: env: JAVET_NODE_VERSION: 20.17.0 - JAVET_V8_VERSION: 12.8.374.17 + JAVET_V8_VERSION: 12.9.202.18 JAVET_VERSION: 3.1.8 ROOT: D:\a\Javet diff --git a/README.rst b/README.rst index da203304..8bbbe544 100644 --- a/README.rst +++ b/README.rst @@ -50,7 +50,7 @@ arm ✔️ ❌ ❌ ❌ arm64 ✔️ ✔️ ✔️ ❌ =========== ======= ======= ======= ======= -* Node.js ``v20.17.0`` + V8 ``v12.8.374.17`` +* Node.js ``v20.17.0`` + V8 ``v12.9.202.18`` * Dynamic switch between Node.js and V8 mode * Polyfill V8 mode with `Javenode `_ * V8 API exposure in JVM diff --git a/cpp/jni/javet_jni_function.cpp b/cpp/jni/javet_jni_function.cpp index fa60158d..3ae334e9 100644 --- a/cpp/jni/javet_jni_function.cpp +++ b/cpp/jni/javet_jni_function.cpp @@ -158,16 +158,21 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionCopyS // Clone the scope info #ifdef ENABLE_NODE auto sourceScopeInfo = sourceV8InternalShared.scope_info(); -#else - auto sourceScopeInfo = sourceV8InternalShared->scope_info(); -#endif auto emptyBlocklistHandle = V8InternalStringSet::New(v8InternalIsolate); auto targetScopeInfo = *V8InternalScopeInfo::RecreateWithBlockList( v8InternalIsolate, v8::internal::handle(sourceScopeInfo, v8InternalIsolate), emptyBlocklistHandle); -#ifdef ENABLE_NODE targetV8InternalShared.set_raw_scope_info(targetScopeInfo); #else - targetV8InternalShared->set_raw_scope_info(targetScopeInfo); + auto sourceScopeInfo = sourceV8InternalShared->scope_info(); + const int length = (sourceScopeInfo->AllocatedSize() - V8InternalHeapObject::kHeaderSize) / v8::internal::kTaggedSize; + auto targetScopeInfo = v8InternalIsolate->factory()->NewScopeInfo(length); + v8InternalIsolate->heap()->CopyRange( + *targetScopeInfo, + targetScopeInfo->data_start(), + sourceScopeInfo->data_start(), + length, + V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER); + targetV8InternalShared->set_raw_scope_info(*targetScopeInfo); #endif targetV8InternalFunction.set_shared(targetV8InternalShared, V8InternalWriteBarrierMode::UPDATE_WRITE_BARRIER); success = true; @@ -223,13 +228,13 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionDisca V8InternalSharedFunctionInfo::DiscardCompiled(v8InternalIsolate, v8::internal::handle(v8InternalShared, v8InternalIsolate)); return true; } + } } - } return false; -} + } JNIEXPORT jobjectArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetArguments -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -261,10 +266,10 @@ JNIEXPORT jobjectArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionG } } return nullptr; -} + } JNIEXPORT jbyteArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetCachedData -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { if (IS_V8_FUNCTION(v8ValueType)) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -288,13 +293,13 @@ JNIEXPORT jbyteArray JNICALL Java_com_caoccao_javet_interop_V8Native_functionGet return Javet::Converter::ToJavaByteArray(jniEnv, cachedDataPointer.get()); } } + } } - } return nullptr; } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetContext -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalIsolate = reinterpret_cast(v8Context->GetIsolate()); @@ -307,7 +312,7 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetCon } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetInternalProperties -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { // This feature is not enabled yet. @@ -328,7 +333,7 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetInt } JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSFunctionType -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); using namespace Javet::Enums::JSFunctionType; if (IS_V8_FUNCTION(v8ValueType)) { @@ -352,7 +357,7 @@ JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSFunc } JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSScopeType -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -369,7 +374,7 @@ JNIEXPORT jint JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetJSScop } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScopeInfos -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jboolean includeGlobalVariables, jboolean includeScopeTypeGlobal) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); V8LocalArray v8LocalArray = v8::Array::New(v8Context->GetIsolate()); @@ -403,12 +408,12 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSco v8LocalArray->Set(v8Context, index, innerV8LocalArray).ToChecked(); ++index; } - } +} return v8Runtime->SafeToExternalV8Value(jniEnv, v8Context, v8LocalArray); } JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScriptSource -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { V8InternalDisallowGarbageCollection disallowGarbageCollection; @@ -440,13 +445,13 @@ JNIEXPORT jobject JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetScr Javet::Converter::ToJavaString(jniEnv, sourceCode.get()), startPosition, endPosition); - } - } +} +} return nullptr; } JNIEXPORT jstring JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSourceCode -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -470,13 +475,13 @@ JNIEXPORT jstring JNICALL Java_com_caoccao_javet_interop_V8Native_functionGetSou startPosition, endPosition - startPosition); #endif return Javet::Converter::ToJavaString(jniEnv, sourceCode.get()); - } } +} return nullptr; } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsCompiled -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -493,7 +498,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsCom } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsWrapped -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); if (IS_V8_FUNCTION(v8ValueType)) { auto v8InternalFunction = Javet::Converter::ToV8InternalJSFunction(v8LocalValue); @@ -510,7 +515,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionIsWra } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetContext -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mV8ContextValue) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mV8ContextValue) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -525,7 +530,7 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetCo } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetScriptSource -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mScriptSource, jboolean mCloneScript) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jobject mScriptSource, jboolean mCloneScript) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -600,13 +605,13 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSc } DELETE_LOCAL_REF(jniEnv, mSourceCode); } + } } - } return success; } JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSourceCode -(JNIEnv* jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jstring mSourceCode, jboolean mCloneScript) { +(JNIEnv * jniEnv, jobject caller, jlong v8RuntimeHandle, jlong v8ValueHandle, jint v8ValueType, jstring mSourceCode, jboolean mCloneScript) { RUNTIME_AND_VALUE_HANDLES_TO_OBJECTS_WITH_SCOPE(v8RuntimeHandle, v8ValueHandle); jboolean success = false; if (IS_V8_FUNCTION(v8ValueType)) { @@ -755,8 +760,8 @@ JNIEXPORT jboolean JNICALL Java_com_caoccao_javet_interop_V8Native_functionSetSo success = true; } break; - } } +} } return success; } diff --git a/docker/android/base.Dockerfile b/docker/android/base.Dockerfile index ef17f9df..fa615f08 100644 --- a/docker/android/base.Dockerfile +++ b/docker/android/base.Dockerfile @@ -15,7 +15,7 @@ # Usage: docker build -t sjtucaocao/javet-android:3.1.8 -f docker/android/base.Dockerfile . -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ubuntu:20.04 WORKDIR / diff --git a/docker/linux-arm64/base_all_in_one.Dockerfile b/docker/linux-arm64/base_all_in_one.Dockerfile index 65092294..6c338a48 100644 --- a/docker/linux-arm64/base_all_in_one.Dockerfile +++ b/docker/linux-arm64/base_all_in_one.Dockerfile @@ -16,7 +16,7 @@ # Usage: docker build -t sjtucaocao/javet-arm64:3.1.8 -f docker/linux-arm64/base_all_in_one.Dockerfile . ARG JAVET_NODE_VERSION=18.15.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ubuntu:20.04 WORKDIR / diff --git a/docker/linux-arm64/base_v8.Dockerfile b/docker/linux-arm64/base_v8.Dockerfile index bf25271e..2ce2848f 100644 --- a/docker/linux-arm64/base_v8.Dockerfile +++ b/docker/linux-arm64/base_v8.Dockerfile @@ -14,13 +14,13 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:arm64-base-v8_12.8.374.17 \ +# -t sjtucaocao/javet:arm64-base-v8_12.9.202.18 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ -# --build-arg JAVET_V8_VERSION=12.8.374.17 \ +# --build-arg JAVET_V8_VERSION=12.9.202.18 \ # -f docker/linux-arm64/base_v8.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ${JAVET_REPO}:arm64-base-jvm diff --git a/docker/linux-x86_64/base_all_in_one.Dockerfile b/docker/linux-x86_64/base_all_in_one.Dockerfile index 986b26e8..060fa665 100644 --- a/docker/linux-x86_64/base_all_in_one.Dockerfile +++ b/docker/linux-x86_64/base_all_in_one.Dockerfile @@ -19,7 +19,7 @@ FROM ubuntu:20.04 WORKDIR / ARG JAVET_NODE_VERSION=20.17.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 # Update Ubuntu ENV DEBIAN_FRONTEND=noninteractive diff --git a/docker/linux-x86_64/base_v8.Dockerfile b/docker/linux-x86_64/base_v8.Dockerfile index 040841a7..4590d948 100644 --- a/docker/linux-x86_64/base_v8.Dockerfile +++ b/docker/linux-x86_64/base_v8.Dockerfile @@ -14,13 +14,13 @@ # limitations under the License. # Usage: docker build \ -# -t sjtucaocao/javet:x86_64-base-v8_12.8.374.17 \ +# -t sjtucaocao/javet:x86_64-base-v8_12.9.202.18 \ # --build-arg JAVET_REPO=sjtucaocao/javet \ -# --build-arg JAVET_V8_VERSION=12.8.374.17 \ +# --build-arg JAVET_V8_VERSION=12.9.202.18 \ # -f docker/linux-x86_64/base_v8.Dockerfile . ARG JAVET_REPO=sjtucaocao/javet -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 FROM ${JAVET_REPO}:x86_64-base-jvm diff --git a/docker/linux-x86_64/build.env b/docker/linux-x86_64/build.env index 4d7e36e5..c2dee097 100644 --- a/docker/linux-x86_64/build.env +++ b/docker/linux-x86_64/build.env @@ -1,4 +1,4 @@ JAVET_REPO=sjtucaocao/javet JAVET_VERSION=3.1.8 -JAVET_V8_VERSION=12.8.374.17 +JAVET_V8_VERSION=12.9.202.18 JAVET_NODE_VERSION=20.17.0 diff --git a/docker/windows-x86_64/base.Dockerfile b/docker/windows-x86_64/base.Dockerfile index 532f2ca2..a010d382 100644 --- a/docker/windows-x86_64/base.Dockerfile +++ b/docker/windows-x86_64/base.Dockerfile @@ -32,7 +32,7 @@ # Usage: docker build -t sjtucaocao/javet-windows:3.1.8 -m 4G -f docker/windows-x86_64/base.Dockerfile . ARG JAVET_NODE_VERSION=20.17.0 -ARG JAVET_V8_VERSION=12.8.374.17 +ARG JAVET_V8_VERSION=12.9.202.18 # https://hub.docker.com/_/microsoft-windows FROM mcr.microsoft.com/windows:20H2-amd64 diff --git a/docs/release_notes/release_notes_3_1.rst b/docs/release_notes/release_notes_3_1.rst index a8fdc22d..ff8d3ec3 100644 --- a/docs/release_notes/release_notes_3_1.rst +++ b/docs/release_notes/release_notes_3_1.rst @@ -2,6 +2,12 @@ Release Notes 3.1.x =================== +3.1.8 +----- + +* Upgraded V8 to ``v12.9.202.18`` (2024-09-13) +* Upgraded Visual Studio 2022 to `v17.11.3 `_ + 3.1.7 ----- diff --git a/scripts/python/change_node_v8_version.py b/scripts/python/change_node_v8_version.py index c283f169..c84bd94f 100644 --- a/scripts/python/change_node_v8_version.py +++ b/scripts/python/change_node_v8_version.py @@ -172,7 +172,7 @@ def update(self) -> None: def main(): change_node_version = ChangeNodeVersion('20.17.0') change_node_version.update() - change_v8_version = ChangeV8Version('12.8.374.17') + change_v8_version = ChangeV8Version('12.9.202.18') change_v8_version.update() return 0 diff --git a/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java b/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java index d0c25827..d506d631 100644 --- a/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java +++ b/src/main/java/com/caoccao/javet/enums/JSRuntimeType.java @@ -47,7 +47,7 @@ public enum JSRuntimeType { */ V8( "v8", - "12.8.374.17", + "12.9.202.18", V8RuntimeOptions::new, o -> o instanceof V8RuntimeOptions);