File tree Expand file tree Collapse file tree 5 files changed +28
-20
lines changed Expand file tree Collapse file tree 5 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ target_include_directories(v8inspector
1919 PRIVATE "${llhttp_SOURCE_DIR} /include" )
2020
2121target_compile_definitions (v8inspector
22- PRIVATE ASIO_STANDALONE)
22+ PRIVATE ASIO_STANDALONE
23+ PRIVATE NOMINMAX)
2324
2425target_link_libraries (v8inspector
2526 PRIVATE asio
Original file line number Diff line number Diff line change 11#pragma once
22
3- // Enable V8 Pointer Compression
4- // https://v8.dev/blog/pointer-compression
5- // https://stackoverflow.com/q/62921373
3+ #include <stdint.h>
4+
5+ #if INTPTR_MAX == INT64_MAX
66#ifndef V8_COMPRESS_POINTERS
77#define V8_COMPRESS_POINTERS 1
88#endif
9-
10- // Enable V8 Sandbox
11- // https://v8.dev/blog/sandbox
9+ #ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
10+ #define V8_31BIT_SMIS_ON_64BIT_ARCH 1
11+ #endif
1212#ifndef V8_ENABLE_SANDBOX
1313#define V8_ENABLE_SANDBOX 1
1414#endif
15+ #endif
1516
1617#ifdef _MSC_VER
1718#pragma warning(push)
Original file line number Diff line number Diff line change 22
33#include < napi/napi.h>
44
5- // Enable V8 Pointer Compression
6- // https://v8.dev/blog/pointer-compression
7- // https://stackoverflow.com/q/62921373
5+ # include < stdint.h >
6+
7+ # if INTPTR_MAX == INT64_MAX
88#ifndef V8_COMPRESS_POINTERS
99#define V8_COMPRESS_POINTERS 1
1010#endif
11-
12- // Enable V8 Sandbox
13- // https://v8.dev/blog/sandbox
11+ # ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
12+ # define V8_31BIT_SMIS_ON_64BIT_ARCH 1
13+ # endif
1414#ifndef V8_ENABLE_SANDBOX
1515#define V8_ENABLE_SANDBOX 1
1616#endif
17+ #endif
1718
1819#ifdef __clang__
1920#pragma clang diagnostic push
Original file line number Diff line number Diff line change 1313// are bridged to remove references to the `node` namespace. `node_version.h`,
1414// included below, defines `NAPI_VERSION`.
1515
16- // [BABYLON-NATIVE-ADDITION]: Enable V8 Pointer Compression
17- // https://v8.dev/blog/pointer-compression
18- // https://stackoverflow.com/q/62921373
16+ // [BABYLON-NATIVE-ADDITION]: For INTPTR_MAX and INT64_MAX
17+ #include < stdint.h>
18+
19+ // [BABYLON-NATIVE-ADDITION]: Enable V8 Pointer Compression and Sandbox for 64-bit architecture
20+ #if INTPTR_MAX == INT64_MAX
1921#ifndef V8_COMPRESS_POINTERS
2022#define V8_COMPRESS_POINTERS 1
2123#endif
22-
23- // [BABYLON-NATIVE-ADDITION]: Enable V8 Sandbox
24- // https://v8.dev/blog/sandbox
24+ # ifndef V8_31BIT_SMIS_ON_64BIT_ARCH
25+ # define V8_31BIT_SMIS_ON_64BIT_ARCH 1
26+ # endif
2527#ifndef V8_ENABLE_SANDBOX
2628#define V8_ENABLE_SANDBOX 1
2729#endif
30+ #endif
2831
2932#include < v8.h>
3033#include < cassert>
Original file line number Diff line number Diff line change @@ -18,4 +18,6 @@ android.useAndroidX=true
1818# Enables namespacing of each library's R class so that its R class includes only the
1919# resources declared in the library itself and none from the library's dependencies,
2020# thereby reducing the size of the R class for that library
21- android.nonTransitiveRClass =true
21+ android.nonTransitiveRClass =true
22+ # Select the JavaScript engine to use
23+ # jsEngine=JavaScriptCore
You can’t perform that action at this time.
0 commit comments