Skip to content

Commit 06d4420

Browse files
authored
Update to Babylon fork of v8 binary for Android (#133)
We recently forked the v8-android-buildscripts OSS repo to get it building again and to enable a new compiler flag needed for the Android Play Store (details here: BabylonJS/v8-android-buildscripts#1). This PR switches over to the new Babylon forked package ([@babylonjs/v8-android-jit-nointl-nosnapshot](https://www.npmjs.com/package/@babylonjs/v8-android-jit-nointl-nosnapshot)).
1 parent ae0253a commit 06d4420

6 files changed

Lines changed: 8 additions & 14 deletions

File tree

Core/AppRuntime/V8Inspector/Include/V8Inc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
1010
#define V8_31BIT_SMIS_ON_64BIT_ARCH 1
1111
#endif
12-
#ifndef V8_ENABLE_SANDBOX
12+
#if !defined(ANDROID) && !defined(V8_ENABLE_SANDBOX)
1313
#define V8_ENABLE_SANDBOX 1
1414
#endif
1515
#endif

Core/AppRuntime/V8Inspector/Source/V8InspectorAgent.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,7 @@ namespace Babylon
194194

195195
void ConnectFrontend()
196196
{
197-
session_ = inspector_->connect(
198-
1, new ChannelImpl(agent_), v8_inspector::StringView()
199-
// v8-android package and v8 nuget do not share the same V8 version. A change in V8_inspector API forces us to add this
200-
// ifndef check. This will be fixed in a future nuget package update.
201-
#ifndef ANDROID
202-
, v8_inspector::V8Inspector::kFullyTrusted
203-
#endif
204-
);
197+
session_ = inspector_->connect(1, new ChannelImpl(agent_), v8_inspector::StringView(), v8_inspector::V8Inspector::kFullyTrusted);
205198
}
206199

207200
void DisconnectFrontend()

Core/Node-API/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ if(NAPI_BUILD_ABI)
8888
"Source/js_native_api_v8_internals.h")
8989

9090
if(ANDROID)
91-
set(V8_PACKAGE_NAME "v8-android-jit-nointl-nosnapshot")
92-
set(V8_ANDROID_DIR "${CMAKE_CURRENT_BINARY_DIR}/${V8_PACKAGE_NAME}")
91+
set(V8_PACKAGE_BASE_NAME "v8-android-jit-nointl-nosnapshot")
92+
set(V8_PACKAGE_NAME "@babylonjs/${V8_PACKAGE_BASE_NAME}")
93+
set(V8_ANDROID_DIR "${CMAKE_CURRENT_BINARY_DIR}/${V8_PACKAGE_BASE_NAME}")
9394
napi_install_android_package(v8 "dist/org/chromium" ${V8_ANDROID_DIR})
9495

9596
set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES}

Core/Node-API/Include/Engine/V8/napi/env.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
1212
#define V8_31BIT_SMIS_ON_64BIT_ARCH 1
1313
#endif
14-
#ifndef V8_ENABLE_SANDBOX
14+
#if !defined(ANDROID) && !defined(V8_ENABLE_SANDBOX)
1515
#define V8_ENABLE_SANDBOX 1
1616
#endif
1717
#endif

Core/Node-API/Source/js_native_api_v8_internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
2525
#define V8_31BIT_SMIS_ON_64BIT_ARCH 1
2626
#endif
27-
#ifndef V8_ENABLE_SANDBOX
27+
#if !defined(ANDROID) && !defined(V8_ENABLE_SANDBOX)
2828
#define V8_ENABLE_SANDBOX 1
2929
#endif
3030
#endif

Core/Node-API/package-v8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"dependencies": {
3-
"v8-android-jit-nointl-nosnapshot": "11.1000.4"
3+
"@babylonjs/v8-android-jit-nointl-nosnapshot": "11.110.1"
44
}
55
}

0 commit comments

Comments
 (0)