nodejs-23.0.0-fix-v8-external-code-space.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. diff --git a/configure.py b/configure.py
  2. index 84b016cd85..df9aebdd3f 100755
  3. --- a/configure.py
  4. +++ b/configure.py
  5. @@ -1692,6 +1692,7 @@ def configure_v8(o, configs):
  6. o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and
  7. o['variables']['target_arch'] in maglev_enabled_architectures)
  8. o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
  9. + o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0
  10. o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
  11. o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
  12. o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
  13. diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi
  14. index c768d7a0f1..f762a5990c 100644
  15. --- a/tools/v8_gypfiles/features.gypi
  16. +++ b/tools/v8_gypfiles/features.gypi
  17. @@ -439,6 +439,9 @@
  18. ['v8_enable_shared_ro_heap==1', {
  19. 'defines': ['V8_SHARED_RO_HEAP',],
  20. }],
  21. + ['v8_enable_external_code_space==1', {
  22. + 'defines': ['V8_EXTERNAL_CODE_SPACE',],
  23. + }],
  24. ['dcheck_always_on!=0', {
  25. 'defines': ['DEBUG',],
  26. }],
  27. --- a/test/cctest/node_test_fixture.cc
  28. +++ b/test/cctest/node_test_fixture.cc
  29. @@ -20,9 +20,6 @@ void NodeTestEnvironment::SetUp() {
  30. NodeZeroIsolateTestFixture::platform.reset(
  31. new node::NodePlatform(kV8ThreadPoolSize, tracing_controller));
  32. v8::V8::InitializePlatform(NodeZeroIsolateTestFixture::platform.get());
  33. -#ifdef V8_ENABLE_SANDBOX
  34. - ASSERT_TRUE(v8::V8::InitializeSandbox());
  35. -#endif
  36. cppgc::InitializeProcess(
  37. NodeZeroIsolateTestFixture::platform->GetPageAllocator());