diff --git a/common.gypi b/common.gypi index 162faabcefc3bc..4dd65c9f011bc9 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.16', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### @@ -78,8 +78,6 @@ 'v8_win64_unwinding_info': 1, # Variables controlling external defines exposed in public headers. - 'v8_enable_conservative_stack_scanning%': 0, - 'v8_enable_direct_local%': 0, 'v8_enable_map_packing%': 0, 'v8_enable_pointer_compression_shared_cage%': 0, 'v8_enable_sandbox%': 0, @@ -473,12 +471,6 @@ ['tsan == 1', { 'defines': ['V8_IS_TSAN',], }], - ['v8_enable_conservative_stack_scanning == 1', { - 'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',], - }], - ['v8_enable_direct_local == 1', { - 'defines': ['V8_ENABLE_DIRECT_LOCAL',], - }], ['OS == "win"', { 'defines': [ 'WIN32', diff --git a/deps/v8/.git-blame-ignore-revs b/deps/v8/.git-blame-ignore-revs index 29372f34c1813d..0b12c1ac601857 100644 --- a/deps/v8/.git-blame-ignore-revs +++ b/deps/v8/.git-blame-ignore-revs @@ -85,6 +85,9 @@ e50b49a0e38b34e2b28e026f4d1c7e0da0c7bb1a # Rewrite code base to use "." instead of "->" to access Object members. 878ccb33bd3cf0e6dc018ff8d15843f585ac07be +# Rewrite code base to use "->" instead of "." to access Object members. +95532da70de14206e64060647082766a293f81cb + # Splitting src/ into subfolders 632239011db501e76475d82ff6492f37fa8c1edc f455f86d899716df3b9550950ce172f5b867619a diff --git a/deps/v8/.gn b/deps/v8/.gn index b9b11d589b582a..d83c69db63f963 100644 --- a/deps/v8/.gn +++ b/deps/v8/.gn @@ -30,10 +30,13 @@ default_args = { # Disable rust dependencies. enable_rust = true + + # Needed only for std::atomic_ref for large Ts http://crbug.com/402171653 + use_llvm_libatomic = false } # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly # discouraged except for gypi_to_gn calls. -exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + +exec_script_allowlist = build_dotfile_settings.exec_script_allowlist + [ "//build_overrides/build.gni" ] diff --git a/deps/v8/.vpython3 b/deps/v8/.vpython3 index 6afd6e51890055..0d30d688efa997 100644 --- a/deps/v8/.vpython3 +++ b/deps/v8/.vpython3 @@ -22,7 +22,7 @@ # Read more about `vpython` and how to modify this file here: # https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md -python_version: "3.8" +python_version: "3.11" # The default set of platforms vpython checks does not yet include mac-arm64. # Setting `verify_pep425_tag` to the list of platforms we explicitly must support @@ -47,7 +47,7 @@ wheel: < wheel: < name: "infra/python/wheels/coverage/${vpython_platform}" - version: "version:5.5.chromium.3" + version: "version:7.3.1" > wheel: < @@ -55,6 +55,11 @@ wheel: < version: "version:3.0.0" > +wheel: < + name: "infra/python/wheels/filecheck-py2_py3" + version: "version:1.0.1" +> + wheel: < name: "infra/python/wheels/funcsigs-py2_py3" version: "version:1.0.2" @@ -67,7 +72,7 @@ wheel: < wheel: < name: "infra/python/wheels/numpy/${vpython_platform}" - version: "version:1.2x.supported.1" + version: "version:1.23.5.chromium.4" > wheel: < @@ -97,6 +102,6 @@ wheel: < version: "version:2.0.4" > wheel: < - name: "infra/python/wheels/pyfakefs-py2_py3" - version: "version:3.7.2" -> \ No newline at end of file + name: "infra/python/wheels/pyfakefs-py3" + version: "version:5.7.3" +> diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index e5a0957b3a928e..280e33e6841cc1 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -334,3 +334,4 @@ Kotaro Ohsugi Jing Peiyang magic-akari Ryuhei Shima +Domagoj Stolfa diff --git a/deps/v8/BUILD.bazel b/deps/v8/BUILD.bazel index 54be2b945d4d23..920ed94829fdb8 100644 --- a/deps/v8/BUILD.bazel +++ b/deps/v8/BUILD.bazel @@ -41,7 +41,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_trace_feedback_updates # v8_enable_atomic_object_field_writes # v8_enable_concurrent_marking -# v8_enable_conservative_stack_scanning # v8_enable_direct_handle # v8_enable_local_off_stack_check # v8_enable_ignition_dispatch_counting @@ -671,6 +670,7 @@ filegroup( "include/cppgc/process-heap-statistics.h", "include/cppgc/sentinel-pointer.h", "include/cppgc/source-location.h", + "include/cppgc/tagged-member.h", "include/cppgc/trace-trait.h", "include/cppgc/type-traits.h", "include/cppgc/visitor.h", @@ -685,6 +685,7 @@ filegroup( "include/v8-callbacks.h", "include/v8-container.h", "include/v8-context.h", + "include/v8-cpp-heap-external.h", "include/v8-cppgc.h", "include/v8-data.h", "include/v8-date.h", @@ -831,6 +832,25 @@ filegroup( "src/base/numbers/fixed-dtoa.h", "src/base/numbers/strtod.cc", "src/base/numbers/strtod.h", + "src/base/numerics/angle_conversions.h", + "src/base/numerics/basic_ops_impl.h", + "src/base/numerics/byte_conversions.h", + "src/base/numerics/checked_math.h", + "src/base/numerics/checked_math_impl.h", + "src/base/numerics/clamped_math.h", + "src/base/numerics/clamped_math_impl.h", + "src/base/numerics/integral_constant_like.h", + "src/base/numerics/math_constants.h", + "src/base/numerics/ostream_operators.h", + "src/base/numerics/ranges.h", + "src/base/numerics/safe_conversions.h", + "src/base/numerics/safe_conversions_arm_impl.h", + "src/base/numerics/safe_conversions_impl.h", + "src/base/numerics/safe_math.h", + "src/base/numerics/safe_math_arm_impl.h", + "src/base/numerics/safe_math_clang_gcc_impl.h", + "src/base/numerics/safe_math_shared_impl.h", + "src/base/numerics/wrapping_math.h", "src/base/once.cc", "src/base/once.h", "src/base/overflowing-math.h", @@ -857,9 +877,6 @@ filegroup( "src/base/region-allocator.cc", "src/base/region-allocator.h", "src/base/ring-buffer.h", - "src/base/safe_conversions.h", - "src/base/safe_conversions_arm_impl.h", - "src/base/safe_conversions_impl.h", "src/base/small-map.h", "src/base/small-vector.h", "src/base/string-format.h", @@ -1129,6 +1146,7 @@ filegroup( "src/objects/call-site-info.tq", "src/objects/cell.tq", "src/objects/contexts.tq", + "src/objects/cpp-heap-external-object.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", "src/objects/descriptor-array.tq", @@ -1430,6 +1448,8 @@ filegroup( "src/codegen/interface-descriptors.cc", "src/codegen/interface-descriptors.h", "src/codegen/interface-descriptors-inl.h", + "src/codegen/jump-table-info.cc", + "src/codegen/jump-table-info.h", "src/codegen/label.h", "src/codegen/linkage-location.h", "src/codegen/machine-type.cc", @@ -1723,7 +1743,6 @@ filegroup( "src/heap/heap-write-barrier-inl.h", "src/heap/incremental-marking.cc", "src/heap/incremental-marking.h", - "src/heap/incremental-marking-inl.h", "src/heap/incremental-marking-job.cc", "src/heap/incremental-marking-job.h", "src/heap/index-generator.cc", @@ -1982,6 +2001,10 @@ filegroup( "src/objects/contexts.cc", "src/objects/contexts.h", "src/objects/contexts-inl.h", + "src/objects/cpp-heap-external-object.h", + "src/objects/cpp-heap-external-object-inl.h", + "src/objects/cpp-heap-object-wrapper.h", + "src/objects/cpp-heap-object-wrapper-inl.h", "src/objects/data-handler.h", "src/objects/data-handler-inl.h", "src/objects/debug-objects.cc", @@ -2604,8 +2627,6 @@ filegroup( "src/codegen/x64/assembler-x64.cc", "src/codegen/x64/assembler-x64.h", "src/codegen/x64/assembler-x64-inl.h", - "src/codegen/x64/builtin-jump-table-info-x64.cc", - "src/codegen/x64/builtin-jump-table-info-x64.h", "src/codegen/x64/constants-x64.h", "src/codegen/x64/cpu-x64.cc", "src/codegen/x64/fma-instr.h", diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 9a2b2cdd94f9b9..818f13802c6660 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -25,12 +25,6 @@ if (is_ios) { import("//build/config/apple/mobile_config.gni") # For `target_platform`. } -# Specifies if the target build is a simulator build. Comparing target cpu -# with v8 target cpu to not affect simulator builds for making cross-compile -# snapshots. -target_is_simulator = (target_cpu != v8_target_cpu && !v8_multi_arch_build) || - (current_cpu != v8_current_cpu && v8_multi_arch_build) - # For faster Windows builds. See https://crbug.com/v8/8475. emit_builtins_as_inline_asm = is_win && is_clang @@ -323,10 +317,11 @@ declare_args() { # Enable control-flow integrity features, such as pointer authentication for # ARM64. Enable it by default for simulator builds and when native code - # supports it as well. - v8_control_flow_integrity = - v8_current_cpu == "arm64" && - (target_is_simulator || arm_control_flow_integrity != "none") + # supports it as well. On Mac, control-flow integrity does not work so we + # avoid enabling it when using the simulator. + v8_control_flow_integrity = v8_current_cpu == "arm64" && + ((v8_target_is_simulator && target_os != "mac") || + arm_control_flow_integrity != "none") # Enable heap reservation of size 4GB. Only possible for 64bit archs. cppgc_enable_caged_heap = @@ -361,6 +356,10 @@ declare_args() { # Requires use_rtti = true v8_enable_precise_zone_stats = false + # Set this if V8 monolithic static library is going to be linked into + # another shared library. + v8_monolithic_for_shared_library = false + # Experimental feature that uses SwissNameDictionary instead of NameDictionary # as the backing store for all dictionary mode objects. v8_enable_swiss_name_dictionary = false @@ -739,7 +738,8 @@ if (v8_builtins_profiling_log_file == "default") { } } -if (v8_enable_webassembly && !target_is_simulator && v8_current_cpu == "x64") { +if (v8_enable_webassembly && !v8_target_is_simulator && + v8_current_cpu == "x64") { v8_enable_wasm_simd256_revec = true } @@ -989,7 +989,6 @@ external_v8_defines = [ "V8_USE_PERFETTO", "V8_MAP_PACKING", "V8_IS_TSAN", - "V8_ENABLE_CONSERVATIVE_STACK_SCANNING", "V8_ENABLE_DIRECT_HANDLE", "V8_MINORMS_STRING_SHORTCUTTING", "V8_HAVE_TARGET_OS", @@ -1044,9 +1043,6 @@ if (v8_enable_map_packing) { if (is_tsan) { enabled_external_v8_defines += [ "V8_IS_TSAN" ] } -if (v8_enable_conservative_stack_scanning) { - enabled_external_v8_defines += [ "V8_ENABLE_CONSERVATIVE_STACK_SCANNING" ] -} if (v8_enable_direct_handle) { enabled_external_v8_defines += [ "V8_ENABLE_DIRECT_HANDLE" ] } @@ -1184,6 +1180,10 @@ config("features") { defines += [ "CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS" ] } + if (v8_monolithic && v8_monolithic_for_shared_library) { + defines += [ "V8_TLS_USED_IN_LIBRARY" ] + } + if (v8_enable_pointer_compression && !v8_enable_pointer_compression_shared_cage) { defines += [ "V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES" ] @@ -1447,6 +1447,9 @@ config("features") { if (v8_lower_limits_mode) { defines += [ "V8_LOWER_LIMITS_MODE" ] } + if (v8_target_is_simulator) { + defines += [ "USE_SIMULATOR" ] + } } config("toolchain") { @@ -1497,7 +1500,7 @@ config("toolchain") { } # Mips64el simulators. - if (target_is_simulator && v8_current_cpu == "mips64el") { + if (v8_target_is_simulator && v8_current_cpu == "mips64el") { defines += [ "_MIPS_TARGET_SIMULATOR" ] } @@ -1530,7 +1533,7 @@ config("toolchain") { } # loong64 simulators. - if (target_is_simulator && v8_current_cpu == "loong64") { + if (v8_target_is_simulator && v8_current_cpu == "loong64") { defines += [ "_LOONG64_TARGET_SIMULATOR" ] } if (v8_current_cpu == "loong64") { @@ -1563,10 +1566,10 @@ config("toolchain") { # Under simulator build, compiler will not provide __riscv_xlen. Define here if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") { - if (target_is_simulator) { + if (v8_target_is_simulator) { defines += [ "_RISCV_TARGET_SIMULATOR" ] } - if (riscv_use_rvv || target_is_simulator) { + if (riscv_use_rvv || v8_target_is_simulator) { defines += [ "CAN_USE_RVV_INSTRUCTIONS" ] defines += [ "RVV_VLEN=${riscv_rvv_vlen}" ] } @@ -1823,6 +1826,10 @@ if (v8_postmortem_support) { "src/objects/casting-inl.h", "src/objects/code.h", "src/objects/code-inl.h", + "src/objects/cpp-heap-external-object.h", + "src/objects/cpp-heap-external-object-inl.h", + "src/objects/cpp-heap-object-wrapper.h", + "src/objects/cpp-heap-object-wrapper-inl.h", "src/objects/data-handler.h", "src/objects/data-handler-inl.h", "src/objects/deoptimization-data.h", @@ -2061,6 +2068,7 @@ torque_files = [ "src/objects/cell.tq", "src/objects/bytecode-array.tq", "src/objects/contexts.tq", + "src/objects/cpp-heap-external-object.tq", "src/objects/data-handler.tq", "src/objects/debug-objects.tq", "src/objects/descriptor-array.tq", @@ -2546,7 +2554,7 @@ template("run_mksnapshot") { # This is needed to distinguish between generating code for the simulator # and cross-compiling. The latter may need to run code on the host with the # simulator but cannot use simulator-specific instructions. - if (target_is_simulator) { + if (v8_target_is_simulator) { args += [ "--target_is_simulator" ] } @@ -2788,7 +2796,6 @@ action("v8_dump_build_config") { "code_comments=$v8_code_comments", "component_build=$is_component_build", "concurrent_marking=$v8_enable_concurrent_marking", - "conservative_stack_scanning=$v8_enable_conservative_stack_scanning", "current_cpu=\"$current_cpu\"", "dcheck_always_on=$v8_dcheck_always_on", "debug_code=$v8_enable_debug_code", @@ -2854,8 +2861,6 @@ generated_file("v8_generate_features_json") { contents = { v8_deprecation_warnings = v8_deprecation_warnings v8_enable_31bit_smis_on_64bit_arch = v8_enable_31bit_smis_on_64bit_arch - v8_enable_conservative_stack_scanning = - v8_enable_conservative_stack_scanning v8_enable_direct_handle = v8_enable_direct_handle v8_enable_extensible_ro_snapshot = v8_enable_extensible_ro_snapshot v8_enable_gdbjit = v8_enable_gdbjit @@ -3176,6 +3181,7 @@ v8_header_set("v8_headers") { "include/v8-callbacks.h", "include/v8-container.h", "include/v8-context.h", + "include/v8-cpp-heap-external.h", "include/v8-cppgc.h", "include/v8-data.h", "include/v8-date.h", @@ -3380,6 +3386,7 @@ v8_header_set("v8_internal_headers") { "src/codegen/handler-table.h", "src/codegen/interface-descriptors-inl.h", "src/codegen/interface-descriptors.h", + "src/codegen/jump-table-info.h", "src/codegen/label.h", "src/codegen/linkage-location.h", "src/codegen/machine-type.h", @@ -3773,7 +3780,6 @@ v8_header_set("v8_internal_headers") { "src/heap/heap-write-barrier-inl.h", "src/heap/heap-write-barrier.h", "src/heap/heap.h", - "src/heap/incremental-marking-inl.h", "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.h", "src/heap/index-generator.h", @@ -3937,6 +3943,10 @@ v8_header_set("v8_internal_headers") { "src/objects/compressed-slots.h", "src/objects/contexts-inl.h", "src/objects/contexts.h", + "src/objects/cpp-heap-external-object-inl.h", + "src/objects/cpp-heap-external-object.h", + "src/objects/cpp-heap-object-wrapper-inl.h", + "src/objects/cpp-heap-object-wrapper.h", "src/objects/data-handler-inl.h", "src/objects/data-handler.h", "src/objects/debug-objects-inl.h", @@ -4610,7 +4620,6 @@ v8_header_set("v8_internal_headers") { "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.h", "src/codegen/x64/assembler-x64-inl.h", "src/codegen/x64/assembler-x64.h", - "src/codegen/x64/builtin-jump-table-info-x64.h", "src/codegen/x64/constants-x64.h", "src/codegen/x64/fma-instr.h", "src/codegen/x64/interface-descriptors-x64-inl.h", @@ -4711,8 +4720,10 @@ v8_header_set("v8_internal_headers") { (current_cpu == "x64" && (is_linux || is_chromeos || is_mac))) { sources += [ "src/trap-handler/handler-inside-posix.h" ] } - if (current_cpu == "x64" && - (is_linux || is_chromeos || is_mac || is_win)) { + if ((current_cpu == "x64" && + (is_linux || is_chromeos || is_mac || is_win)) || + (current_cpu == "arm64" && v8_target_is_simulator && + (is_linux || is_mac))) { sources += [ "src/trap-handler/trap-handler-simulator.h" ] } } @@ -5401,6 +5412,7 @@ v8_source_set("v8_base_without_compiler") { "src/codegen/flush-instruction-cache.cc", "src/codegen/handler-table.cc", "src/codegen/interface-descriptors.cc", + "src/codegen/jump-table-info.cc", "src/codegen/machine-type.cc", "src/codegen/macro-assembler-base.cc", "src/codegen/maglev-safepoint-table.cc", @@ -5984,7 +5996,6 @@ v8_source_set("v8_base_without_compiler") { ### gcmole(x64) ### "src/codegen/shared-ia32-x64/macro-assembler-shared-ia32-x64.cc", "src/codegen/x64/assembler-x64.cc", - "src/codegen/x64/builtin-jump-table-info-x64.cc", "src/codegen/x64/cpu-x64.cc", "src/codegen/x64/macro-assembler-x64.cc", "src/deoptimizer/x64/deoptimizer-x64.cc", @@ -6065,7 +6076,7 @@ v8_source_set("v8_base_without_compiler") { "src/trap-handler/handler-outside-win.cc", ] } - if (current_cpu == "x64" && + if ((current_cpu == "x64" || current_cpu == "arm64") && (is_linux || is_chromeos || is_mac || is_win)) { sources += [ "src/trap-handler/handler-outside-simulator.cc" ] } @@ -6529,6 +6540,25 @@ v8_component("v8_libbase") { "src/base/numbers/fixed-dtoa.h", "src/base/numbers/strtod.cc", "src/base/numbers/strtod.h", + "src/base/numerics/angle_conversions.h", + "src/base/numerics/basic_ops_impl.h", + "src/base/numerics/byte_conversions.h", + "src/base/numerics/checked_math.h", + "src/base/numerics/checked_math_impl.h", + "src/base/numerics/clamped_math.h", + "src/base/numerics/clamped_math_impl.h", + "src/base/numerics/integral_constant_like.h", + "src/base/numerics/math_constants.h", + "src/base/numerics/ostream_operators.h", + "src/base/numerics/ranges.h", + "src/base/numerics/safe_conversions.h", + "src/base/numerics/safe_conversions_arm_impl.h", + "src/base/numerics/safe_conversions_impl.h", + "src/base/numerics/safe_math.h", + "src/base/numerics/safe_math_arm_impl.h", + "src/base/numerics/safe_math_clang_gcc_impl.h", + "src/base/numerics/safe_math_shared_impl.h", + "src/base/numerics/wrapping_math.h", "src/base/once.cc", "src/base/once.h", "src/base/overflowing-math.h", @@ -6554,9 +6584,6 @@ v8_component("v8_libbase") { "src/base/region-allocator.cc", "src/base/region-allocator.h", "src/base/ring-buffer.h", - "src/base/safe_conversions.h", - "src/base/safe_conversions_arm_impl.h", - "src/base/safe_conversions_impl.h", "src/base/sanitizer/asan.h", "src/base/sanitizer/lsan-page-allocator.cc", "src/base/sanitizer/lsan-page-allocator.h", @@ -7010,6 +7037,7 @@ v8_header_set("cppgc_headers") { "include/cppgc/process-heap-statistics.h", "include/cppgc/sentinel-pointer.h", "include/cppgc/source-location.h", + "include/cppgc/tagged-member.h", # TODO(v8:11952): Remove the testing header here once depending on both, # //v8:v8 and //v8:v8_for_testing does not result in ODR violations. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 36fb1fc0f2624d..9d240951e47b47 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -74,24 +74,24 @@ vars = { 'build_with_chromium': False, # GN CIPD package version. - 'gn_version': 'git_revision:6e8e0d6d4a151ab2ed9b4a35366e630c55888444', + 'gn_version': 'git_revision:90478db6b59b9bebf7ca4cf912d860cf868e724c', # ninja CIPD package version # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja 'ninja_version': 'version:3@1.12.1.chromium.4', # siso CIPD package version - 'siso_version': 'git_revision:68bdc49e4e23aef066fc652cbdb1b4973aab1a31', + 'siso_version': 'git_revision:70e1167e0e6dad10c8388cace8fd9d9376c43316', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:27.20250326.5.1', + 'fuchsia_version': 'version:27.20250424.2.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling partition_alloc_version # and whatever else without interference from each other. - 'partition_alloc_version': 'ab56923a27b2793f21994589b0c39bc3324ff49f', + 'partition_alloc_version': '862506deb382f3f8a8fa9689c8d5136a48e9b778', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling android_sdk_build-tools_version @@ -129,9 +129,9 @@ vars = { deps = { 'build': - Var('chromium_url') + '/chromium/src/build.git' + '@' + '451ef881d77fff0b7a8bbfa61934f5e4a35b4c96', + Var('chromium_url') + '/chromium/src/build.git' + '@' + '88030b320338e0706b6b93336c4b35e6bbaf467e', 'buildtools': - Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '6f359296daa889aa726f3d05046b9f37be241169', + Var('chromium_url') + '/chromium/src/buildtools.git' + '@' + '0f32cb9025766951122d4ed19aba87a94ded3f43', 'buildtools/linux64': { 'packages': [ { @@ -177,7 +177,7 @@ deps = { 'test/mozilla/data': Var('chromium_url') + '/v8/deps/third_party/mozilla-tests.git' + '@' + 'f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', 'test/test262/data': - Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'ce7e72d2107f99d165f4259571f10aa75753d997', + Var('chromium_url') + '/external/github.com/tc39/test262.git' + '@' + 'c5257e6119f83f856602f2ccbc46547a8fef0960', 'third_party/android_platform': { 'url': Var('chromium_url') + '/chromium/src/third_party/android_platform.git' + '@' + '98aee46efb1cc4e09fa0e3ecaa6b19dc258645fa', 'condition': 'checkout_android', @@ -224,14 +224,14 @@ deps = { 'packages': [ { 'package': 'chromium/third_party/android_toolchain/android_toolchain', - 'version': 'Idl-vYnWGnM8K3XJhM3h6zjYVDXlnljVz3FE00V9IM8C', + 'version': 'KXOia11cm9lVdUdPlbGLu8sCz6Y4ey_HV2s8_8qeqhgC', }, ], 'condition': 'checkout_android', 'dep_type': 'cipd', }, 'third_party/catapult': { - 'url': Var('chromium_url') + '/catapult.git' + '@' + '5bda0fdab9d93ec9963e2cd858c7b49ad7fec7d4', + 'url': Var('chromium_url') + '/catapult.git' + '@' + '000f47cfa393d7f9557025a252862e2a61a60d44', 'condition': 'checkout_android', }, 'third_party/clang-format/script': @@ -245,17 +245,17 @@ deps = { 'condition': 'checkout_android', }, 'third_party/depot_tools': - Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + 'f40ddcd8d51626fb7be3ab3c418b3f3be801623f', + Var('chromium_url') + '/chromium/tools/depot_tools.git' + '@' + '1fcc527019d786502b02f71b8b764ee674a40953', 'third_party/fp16/src': Var('chromium_url') + '/external/github.com/Maratyszcza/FP16.git' + '@' + '0a92994d729ff76a58f692d3028ca1b64b145d91', 'third_party/fast_float/src': Var('chromium_url') + '/external/github.com/fastfloat/fast_float.git' + '@' + 'cb1d42aaa1e14b09e1452cfdef373d051b8c02a4', 'third_party/fuchsia-gn-sdk': { - 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + '3845a68eb4421e64fbdf9f4805b5ac6d73742e08', + 'url': Var('chromium_url') + '/chromium/src/third_party/fuchsia-gn-sdk.git' + '@' + 'e678aca1bad7a1c9a38620b2e328281bc68f6357', 'condition': 'checkout_fuchsia', }, 'third_party/simdutf': - Var('chromium_url') + '/chromium/src/third_party/simdutf' + '@' + '40d1fa26cd5ca221605c974e22c001ca2fb12fde', + Var('chromium_url') + '/chromium/src/third_party/simdutf' + '@' + '62d1cfb62967c0076c997a10d54d50f9571fb8e9', # Exists for rolling the Fuchsia SDK. Check out of the SDK should always # rely on the hook running |update_sdk.py| script below. 'third_party/fuchsia-sdk/sdk': { @@ -269,21 +269,21 @@ deps = { 'dep_type': 'cipd', }, 'third_party/google_benchmark_chrome': { - 'url': Var('chromium_url') + '/chromium/src/third_party/google_benchmark.git' + '@' + '917e1208b42fdce63511e401067677ffee3a5c7d', + 'url': Var('chromium_url') + '/chromium/src/third_party/google_benchmark.git' + '@' + '29e4389fdc1eeb9137eb464b7f34e07c01c2731e', }, 'third_party/google_benchmark_chrome/src': { 'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + '761305ec3b33abf30e08d50eb829e19a802581cc', }, 'third_party/fuzztest': - Var('chromium_url') + '/chromium/src/third_party/fuzztest.git' + '@' + 'df29ed1355d06c486e17fc421767ff01af050ca4', + Var('chromium_url') + '/chromium/src/third_party/fuzztest.git' + '@' + '4a7e9c055e63f4d67e04229ab491eaefe409addf', 'third_party/fuzztest/src': - Var('chromium_url') + '/external/github.com/google/fuzztest.git' + '@' + '3c7bc855a4938c5d0d1d07303aa0697c88d33e6c', + Var('chromium_url') + '/external/github.com/google/fuzztest.git' + '@' + 'b10387fdbbca18192f85eaa5323a59f44bf9c468', 'third_party/googletest/src': - Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + '52204f78f94d7512df1f0f3bea1d47437a2c3a58', + Var('chromium_url') + '/external/github.com/google/googletest.git' + '@' + 'cd430b47a54841ec45d64d2377d7cabaf0eba610', 'third_party/highway/src': Var('chromium_url') + '/external/github.com/google/highway.git' + '@' + '00fe003dac355b979f36157f9407c7c46448958e', 'third_party/icu': - Var('chromium_url') + '/chromium/deps/icu.git' + '@' + 'c9fb4b3a6fb54aa8c20a03bbcaa0a4a985ffd34b', + Var('chromium_url') + '/chromium/deps/icu.git' + '@' + '4c8cc4b365a505ce35be1e0bd488476c5f79805d', 'third_party/instrumented_libs': { 'url': Var('chromium_url') + '/chromium/third_party/instrumented_libraries.git' + '@' + '69015643b3f68dbd438c010439c59adc52cac808', 'condition': 'checkout_instrumented_libraries', @@ -299,155 +299,155 @@ deps = { 'third_party/jsoncpp/source': Var('chromium_url') + '/external/github.com/open-source-parsers/jsoncpp.git'+ '@' + '42e892d96e47b1f6e29844cc705e148ec4856448', 'third_party/libc++/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '449310fe2e37834a7e62972d2a690cade2ef596b', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '917609c669e43edc850eeb192a342434a54e1dfd', 'third_party/libc++abi/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '94c5d7a8edc09f0680aee57548c0b5d400c2840d', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + 'f2a7f2987f9dcdf8b04c2d8cd4dcb186641a7c3e', 'third_party/libunwind/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'e2e6f2a67e9420e770b014ce9bba476fa2ab9874', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + '81e2cb40a70de2b6978e6d8658891ded9a77f7e3', 'third_party/llvm-libc/src': - Var('chromium_url') + '/external/github.com/llvm/llvm-project/libc.git' + '@' + '188329a7f2118a957efbb3e6219c255e7dba997c', + Var('chromium_url') + '/external/github.com/llvm/llvm-project/libc.git' + '@' + '912274164f0877ca917c06e8484ad3be1784833a', 'third_party/llvm-build/Release+Asserts': { 'dep_type': 'gcs', 'bucket': 'chromium-browser-clang', 'objects': [ { - 'object_name': 'Linux_x64/clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '790fcc5b04e96882e8227ba7994161ab945c0e096057fc165a0f71e32a7cb061', - 'size_bytes': 54517328, - 'generation': 1742541959624765, + 'object_name': 'Linux_x64/clang-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '2cccd3a5b04461f17a2e78d2f8bd18b448443a9dd4d6dfac50e8e84b4d5176f1', + 'size_bytes': 54914604, + 'generation': 1745271343199398, 'condition': 'host_os == "linux"', }, { - 'object_name': 'Linux_x64/clang-tidy-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '6e325d9f62e831bfbae23413a75535a851fd2cdf2f7cf06a5b724e86f72b2df0', - 'size_bytes': 13206280, - 'generation': 1742541959572183, + 'object_name': 'Linux_x64/clang-tidy-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'f0e7dae567266055c9cfa2fba5b3dafa311dc86955f5a3f7a4047ce3096e7b27', + 'size_bytes': 13559360, + 'generation': 1745271343282399, 'condition': 'host_os == "linux" and checkout_clang_tidy', }, { - 'object_name': 'Linux_x64/clangd-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '95d4146cb0b892db68c55bbb523b30301e538d0f4dc71517612fdee62664b81a', - 'size_bytes': 13566616, - 'generation': 1742541959718102, + 'object_name': 'Linux_x64/clangd-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'd87ec8e9cd959cf5d12e0de2970f4a88a67f9884467dac5285813d02bbe50bcb', + 'size_bytes': 13767836, + 'generation': 1745271343386108, 'condition': 'host_os == "linux" and checkout_clangd', }, { - 'object_name': 'Linux_x64/llvm-code-coverage-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'a10c2831ad30275a72f2955e65e62f6af78542f380661443dab4d20c65f203a4', - 'size_bytes': 2299292, - 'generation': 1742541960157221, + 'object_name': 'Linux_x64/llvm-code-coverage-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '08f9cdbdc1e3f78dfb11aa9815727e8af0cf8f2b9c9a0e3749ceb4d3584fc900', + 'size_bytes': 2293720, + 'generation': 1745271343569971, 'condition': 'host_os == "linux" and checkout_clang_coverage_tools', }, { - 'object_name': 'Linux_x64/llvmobjdump-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '56a5bb654a4550d332f86a23e38a0495c6187092868af817ecb999bd9de9c8a0', - 'size_bytes': 5429676, - 'generation': 1742541959869492, + 'object_name': 'Linux_x64/llvmobjdump-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '4b9c20478c015a03a44842d0bc24a9bd01a87890c76c4496577843ea31a21ed1', + 'size_bytes': 5702536, + 'generation': 1745271343407073, 'condition': '(checkout_linux or checkout_mac or checkout_android and host_os != "mac")', }, { - 'object_name': 'Mac/clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '330f8c4cdde3095ac54aff772dbf9bbd96a753df58525546931cbd9bb615f793', - 'size_bytes': 51652432, - 'generation': 1742541961981004, + 'object_name': 'Mac/clang-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '159cc811ee2882098086a426e83cb6744ff59d422d005a54630bc519e782d154', + 'size_bytes': 51986012, + 'generation': 1745271345031799, 'condition': 'host_os == "mac" and host_cpu == "x64"', }, { - 'object_name': 'Mac/clang-mac-runtime-library-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '013f468c65fae6f736cd380791fef892a0fc9fc107516fcae34d1f998eeb081f', - 'size_bytes': 978248, - 'generation': 1742541983231339, + 'object_name': 'Mac/clang-mac-runtime-library-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'ef380bc751dc8b137e294ac1aca295f3e49eb57b938ab011c38c70271d8582fc', + 'size_bytes': 988872, + 'generation': 1745271352425938, 'condition': 'checkout_mac and not host_os == "mac"', }, { - 'object_name': 'Mac/clang-tidy-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'f29391d18e9fa40774e0386224235890933a8b9eddb9b7eb93d2a4a0867241a1', - 'size_bytes': 13468608, - 'generation': 1742541962672221, + 'object_name': 'Mac/clang-tidy-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '75907ac8d2ab310fd7272715c5d98cd4382dbd0b867872aa9216cede48c274d5', + 'size_bytes': 13609872, + 'generation': 1745271345094426, 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_tidy', }, { - 'object_name': 'Mac/clangd-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '06c48661d55a7b465d8fb02be56f8550c34d3962a9d0f8ce19b17bdd37127691', - 'size_bytes': 15012228, - 'generation': 1742541962463652, + 'object_name': 'Mac/clangd-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'e2bcab0b3961fdc7a63286cf7a98397026ff1b5143d34c8a50844b26a7b023c6', + 'size_bytes': 14998604, + 'generation': 1745271345196743, 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clangd', }, { - 'object_name': 'Mac/llvm-code-coverage-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '12f3accae43fa9591bbf28a8e0785b99ff75ed2c84f89518bd5ef5119a2525f0', - 'size_bytes': 2255296, - 'generation': 1742541963013464, + 'object_name': 'Mac/llvm-code-coverage-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '6e4c8ed691948981d799f4af747288cdd5e90ae873dc36ada66726ad3e6caef1', + 'size_bytes': 2262400, + 'generation': 1745271345385127, 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_coverage_tools', }, { - 'object_name': 'Mac_arm64/clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '49967dab3fa4c5f1ff1fe235059be71727c190ff4ccc80f08d39e1bba4dfed58', - 'size_bytes': 43810156, - 'generation': 1742541984650930, + 'object_name': 'Mac_arm64/clang-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '3d437a643cc5838963254a39ab0528f49f2b65cd4dba2c80e628ad88eb419536', + 'size_bytes': 43999512, + 'generation': 1745271353863965, 'condition': 'host_os == "mac" and host_cpu == "arm64"', }, { - 'object_name': 'Mac_arm64/clang-tidy-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '4f5326253ed3736ec262e8e69d93befadf9473419865240673a2ec883c3614b6', - 'size_bytes': 11607236, - 'generation': 1742541984970894, + 'object_name': 'Mac_arm64/clang-tidy-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '0b4150c9e699e1e904495807aff48d2e5396527bf775d6597818dd4f73a9c38f', + 'size_bytes': 11776260, + 'generation': 1745271353927359, 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_tidy', }, { - 'object_name': 'Mac_arm64/clangd-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'b3da417d27ba5afe6c9f612d5808c416a17ed1b28f2acd745e0cd2962a5eeac1', - 'size_bytes': 12000852, - 'generation': 1742541985144552, + 'object_name': 'Mac_arm64/clangd-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '9fcd151cfffa01e6befe3760b9bc91d645135c79449dc378af4cb2fe0187150c', + 'size_bytes': 12041956, + 'generation': 1745271354010497, 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clangd', }, { - 'object_name': 'Mac_arm64/llvm-code-coverage-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '78139b473cdf4d43da880b573661a5d28d94a8bcb4dea41607d324301745f28c', - 'size_bytes': 1976480, - 'generation': 1742541985608174, + 'object_name': 'Mac_arm64/llvm-code-coverage-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '1e62752ef5fd9d425699ed44098d5a0eec3be3f827990470aa9f9199d34a2fb8', + 'size_bytes': 1975116, + 'generation': 1745271354276821, 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_coverage_tools', }, { - 'object_name': 'Win/clang-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'b46fb4a5cbf9c52d0b345fc2d77ad4ac15dfbb45aa494fb49261786c679af44a', - 'size_bytes': 46813332, - 'generation': 1742542010902044, + 'object_name': 'Win/clang-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'd53230dbb7db57ddcda5a8377b5dd8388deee9ff2766617d54c6159c51e806be', + 'size_bytes': 47036964, + 'generation': 1745271363166454, 'condition': 'host_os == "win"', }, { - 'object_name': 'Win/clang-tidy-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '50d527e811ae8543effa2bb5734a1d424d9c497fbf1d96c76d44b6b5ee7f240b', - 'size_bytes': 13233236, - 'generation': 1742542011983982, + 'object_name': 'Win/clang-tidy-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'c6022f5923be5afc1685723a2383fcd8f9334cc6ee097ce3c71963de6ded0764', + 'size_bytes': 13415856, + 'generation': 1745271363272778, 'condition': 'host_os == "win" and checkout_clang_tidy', }, { - 'object_name': 'Win/clang-win-runtime-library-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'bd2ad1930c0ba7d00364dd344886fd57e16aa070ff1b6a1aade72b58d28e8275', - 'size_bytes': 2474048, - 'generation': 1742542035740788, + 'object_name': 'Win/clang-win-runtime-library-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '555a34dd110a5fe3f7578745e9f0074cc341e550bed4ec5888accffb0200a7bb', + 'size_bytes': 2483656, + 'generation': 1745271370423782, 'condition': 'checkout_win and not host_os == "win"', }, { - 'object_name': 'Win/clangd-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '06563cfcb24d7196717551dfcda13ed0b97fb9e795dba06007c55ae563e824b0', - 'size_bytes': 13759668, - 'generation': 1742542011820938, + 'object_name': 'Win/clangd-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '66aafde760608c4c0de94a3947a179db8c8f93c8e474e3081b4401287abe4ee4', + 'size_bytes': 13838692, + 'generation': 1745271363368641, 'condition': 'host_os == "win" and checkout_clangd', }, { - 'object_name': 'Win/llvm-code-coverage-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': '7c2fe8784910dc05445cd7f16742e0b2a09a45fb2ba96ddd5f1d8c895ac65d44', - 'size_bytes': 2365956, - 'generation': 1742542013491786, + 'object_name': 'Win/llvm-code-coverage-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': '6944dc39b33dca3bb8f219ffb221e3f345fe56a5fa0447c60ea6a2894ae72687', + 'size_bytes': 2373032, + 'generation': 1745271363562596, 'condition': 'host_os == "win" and checkout_clang_coverage_tools', }, { - 'object_name': 'Win/llvmobjdump-llvmorg-21-init-5118-g52cd27e6-5.tar.xz', - 'sha256sum': 'a07be25cb4d565422b10001ca3595111d40bd42c47b37b41e2fff5708fe82302', - 'size_bytes': 5527784, - 'generation': 1742542012678160, + 'object_name': 'Win/llvmobjdump-llvmorg-21-init-9266-g09006611-1.tar.xz', + 'sha256sum': 'e8b3e9f7cd7512edc7c05a12e818386cdb8d43bea9affbf0bf4db83a553092a5', + 'size_bytes': 5684140, + 'generation': 1745271363450942, 'condition': 'checkout_linux or checkout_mac or checkout_android and host_os == "win"', }, ], @@ -473,7 +473,7 @@ deps = { 'third_party/perfetto': Var('android_url') + '/platform/external/perfetto.git' + '@' + '40b529923598b739b2892a536a7692eedbed5685', 'third_party/protobuf': - Var('chromium_url') + '/chromium/src/third_party/protobuf.git' + '@' + 'b714f7890b8b6ad3ff3471d3148b28c2c7bbff90', + Var('chromium_url') + '/chromium/src/third_party/protobuf.git' + '@' + '56b98941c7a305f54fc6c1c0a082fcb232f92954', 'third_party/re2/src': Var('chromium_url') + '/external/github.com/google/re2.git' + '@' + 'c84a140c93352cdabbfb547c531be34515b12228', 'third_party/requests': { @@ -481,39 +481,39 @@ deps = { 'condition': 'checkout_android', }, 'tools/rust': - Var('chromium_url') + '/chromium/src/tools/rust' + '@' + '7cdd3d9540f3ab428dbcc9ab83c2896c100bcdc5', + Var('chromium_url') + '/chromium/src/tools/rust' + '@' + 'fa679ed68ee49fb99a7e924f57e4d2b6444103d6', 'third_party/rust': - Var('chromium_url') + '/chromium/src/third_party/rust' + '@' + 'ed577320339cd175171e9c96d3d73452ddbcbd98', + Var('chromium_url') + '/chromium/src/third_party/rust' + '@' + '926ec544992cad0ac638f3594fe6195ed493ebff', 'third_party/rust-toolchain': { 'dep_type': 'gcs', 'bucket': 'chromium-browser-clang', 'objects': [ { - 'object_name': 'Linux_x64/rust-toolchain-f7b43542838f0a4a6cfdb17fbeadf45002042a77-1-llvmorg-21-init-5118-g52cd27e6.tar.xz', - 'sha256sum': '213ffcc751ba5f5a4e15fc0dbcbdb94aa7dbc4b6cddd3605121cd26ff8a8b359', - 'size_bytes': 118223072, - 'generation': 1741985831167267, + 'object_name': 'Linux_x64/rust-toolchain-c8f94230282a8e8c1148f3e657f0199aad909228-1-llvmorg-21-init-9266-g09006611.tar.xz', + 'sha256sum': '378c432f7739bb5da11aad7b3a2687f8252565eae5f0dcfc55c39a15382c519c', + 'size_bytes': 118598336, + 'generation': 1745271335898717, 'condition': 'host_os == "linux"', }, { - 'object_name': 'Mac/rust-toolchain-f7b43542838f0a4a6cfdb17fbeadf45002042a77-1-llvmorg-21-init-5118-g52cd27e6.tar.xz', - 'sha256sum': 'f5ad2fe26336a87713ffcad9e06ae4c1ecb4773ae496a33450a7091c5eec560c', - 'size_bytes': 111168208, - 'generation': 1741985832885972, + 'object_name': 'Mac/rust-toolchain-c8f94230282a8e8c1148f3e657f0199aad909228-1-llvmorg-21-init-9266-g09006611.tar.xz', + 'sha256sum': 'bf05c8b5e90d6904de02dca9b3e4cb5e45a1a56207e7af1fbb3a10707704a26a', + 'size_bytes': 111932536, + 'generation': 1745271337336068, 'condition': 'host_os == "mac" and host_cpu == "x64"', }, { - 'object_name': 'Mac_arm64/rust-toolchain-f7b43542838f0a4a6cfdb17fbeadf45002042a77-1-llvmorg-21-init-5118-g52cd27e6.tar.xz', - 'sha256sum': 'fac3586c08239bbb8fd192a7ba5deaa9ae62f6fde2c1d665953f87176467a156', - 'size_bytes': 100534232, - 'generation': 1741985834191792, + 'object_name': 'Mac_arm64/rust-toolchain-c8f94230282a8e8c1148f3e657f0199aad909228-1-llvmorg-21-init-9266-g09006611.tar.xz', + 'sha256sum': '1aec99f479ff28cefe44ed739844833e016a1da255cf3c17d79e59a273246615', + 'size_bytes': 101605468, + 'generation': 1745271339727037, 'condition': 'host_os == "mac" and host_cpu == "arm64"', }, { - 'object_name': 'Win/rust-toolchain-f7b43542838f0a4a6cfdb17fbeadf45002042a77-1-llvmorg-21-init-5118-g52cd27e6.tar.xz', - 'sha256sum': '7b41e74c9b45ca97ca65279c605e6af878de5682fe574d1f1860d9da9b3a5909', - 'size_bytes': 180896336, - 'generation': 1741985835535129, + 'object_name': 'Win/rust-toolchain-c8f94230282a8e8c1148f3e657f0199aad909228-1-llvmorg-21-init-9266-g09006611.tar.xz', + 'sha256sum': 'b291520613a3ebc415e4576a7fa31d840a5ebf4ab9be6e9dc5d90062dc001c1e', + 'size_bytes': 193280372, + 'generation': 1745271341223097, 'condition': 'host_os == "win"', }, ], @@ -529,13 +529,13 @@ deps = { 'condition': 'not build_with_chromium and host_cpu != "s390" and host_os != "zos" and host_cpu != "ppc"', }, 'third_party/zlib': - Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '788cb3c270e8700b425c7bdca1f9ce6b0c1400a9', + Var('chromium_url') + '/chromium/src/third_party/zlib.git'+ '@' + '1e85c01b15363d11fab81c46fe2b5c2179113f70', 'tools/clang': - Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '0078c27c43cae91e96bb28d8a4407045966e0542', + Var('chromium_url') + '/chromium/src/tools/clang.git' + '@' + '6c4f037a983abf14a4c8bf00e44db73cdf330a97', 'tools/protoc_wrapper': - Var('chromium_url') + '/chromium/src/tools/protoc_wrapper.git' + '@' + 'dbcbea90c20ae1ece442d8ef64e61c7b10e2b013', + Var('chromium_url') + '/chromium/src/tools/protoc_wrapper.git' + '@' + '8ad6d21544b14c7f753852328d71861b363cc512', 'third_party/abseil-cpp': { - 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '3fbb10e80d80e3430224b75add53c47c7a711612', + 'url': Var('chromium_url') + '/chromium/src/third_party/abseil-cpp.git' + '@' + '91f1a3775e4c509c3eadd4870fc9929c0021e6e3', 'condition': 'not build_with_chromium', }, 'third_party/zoslib': { diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 8ec4e97bf0dbfc..0c821c628e610e 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -136,6 +136,7 @@ def FilterJSFile(affected_file): input_api, output_api, bot_allowlist=[ 'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com', 'v8-ci-test262-import-export@chops-service-accounts.iam.gserviceaccount.com', + 'chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com', ])) return results @@ -385,7 +386,7 @@ def FilterFile(affected_file): for f in input_api.AffectedSourceFiles(FilterFile): if not os.path.isfile(to_non_inl(f.AbsoluteLocalPath())): continue - non_inl_header = to_non_inl(f.LocalPath()) + non_inl_header = to_non_inl(f.LocalPath()).replace(os.sep, '/') first_include = None for line in f.NewContents(): if line.startswith('#include '): diff --git a/deps/v8/build_overrides/protobuf.gni b/deps/v8/build_overrides/protobuf.gni new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/deps/v8/gni/snapshot_toolchain.gni b/deps/v8/gni/snapshot_toolchain.gni index c7faa8ca5897a6..37ed262640d048 100644 --- a/deps/v8/gni/snapshot_toolchain.gni +++ b/deps/v8/gni/snapshot_toolchain.gni @@ -104,9 +104,10 @@ if (v8_snapshot_toolchain == "") { # cross compile Windows arm64 with host toolchain. v8_snapshot_toolchain = host_toolchain } - } else if (host_cpu == "arm64" && current_cpu == "arm64" && + } else if (host_cpu == "arm64" && + (current_cpu == "arm64" || current_cpu == "arm64e") && host_os == "mac") { - # cross compile iOS arm64 with host_toolchain + # cross compile iOS arm64/arm64e with host_toolchain v8_snapshot_toolchain = host_toolchain } } diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index bf265b293d8147..e137c84b00b5d5 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -83,9 +83,9 @@ declare_args() { # (is_ios is based on host_os). if (target_os == "ios") { if (target_platform == "iphoneos") { - # iOS executable code pages is in 17.4 SDK. + # iOS executable code pages is in 18.4 SDK. # TODO(dtapuska): Change this to an assert. - v8_enable_lite_mode = ios_deployment_target != "17.4" + v8_enable_lite_mode = ios_deployment_target != "18.4" } else if (target_platform == "tvos") { # tvOS runs in single process mode and is not allowed to use JIT. # TODO(crbug.com/394710095): Enable the v8 lite mode to run v8 with the @@ -123,11 +123,8 @@ declare_args() { !(defined(build_with_node) && build_with_node) && !(is_win && is_component_build) && is_clang - # Scan the call stack conservatively during garbage collection. - v8_enable_conservative_stack_scanning = false - # Use direct pointers in handles (v8::internal::Handle and v8::Local). - v8_enable_direct_handle = "" + v8_enable_direct_handle = false # Check for off-stack allocated local handles. v8_enable_local_off_stack_check = false @@ -193,6 +190,10 @@ declare_args() { # Sets -DV8_ENABLE_ETW_STACK_WALKING. Enables ETW Stack Walking v8_enable_etw_stack_walking = is_win + + # Specifies if the target build is a simulator build. By default it is set to + # true if the host and target do not match and we are not cross-compiling. + v8_target_is_simulator = "" } if (v8_use_external_startup_data == "") { @@ -250,10 +251,12 @@ if (v8_enable_turbofan == "") { assert(v8_enable_turbofan || !v8_enable_webassembly, "Webassembly is not available when Turbofan is disabled.") -# Direct internal handles and direct locals are enabled by default if -# conservative stack scanning is enabled. -if (v8_enable_direct_handle == "") { - v8_enable_direct_handle = v8_enable_conservative_stack_scanning +if (v8_target_is_simulator == "") { + # We compare target cpu with v8 target cpu to not affect simulator builds for + # making cross-compile snapshots. + v8_target_is_simulator = + (target_cpu != v8_target_cpu && !v8_multi_arch_build) || + (current_cpu != v8_current_cpu && v8_multi_arch_build) } # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute diff --git a/deps/v8/include/DEPS b/deps/v8/include/DEPS index cf5c54a1f3407f..c6d10cd4d7b01d 100644 --- a/deps/v8/include/DEPS +++ b/deps/v8/include/DEPS @@ -7,6 +7,7 @@ include_rules = [ "+cppgc/heap-statistics.h", "+cppgc/internal/conditional-stack-allocated.h", "+cppgc/internal/write-barrier.h", + "+cppgc/type-traits.h", "+cppgc/visitor.h", "+perfetto", ] diff --git a/deps/v8/include/cppgc/tagged-member.h b/deps/v8/include/cppgc/tagged-member.h new file mode 100644 index 00000000000000..7a2dfbb4c790c0 --- /dev/null +++ b/deps/v8/include/cppgc/tagged-member.h @@ -0,0 +1,111 @@ +// Copyright 2025 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_CPPGC_TAGGED_MEMBER_H_ +#define INCLUDE_CPPGC_TAGGED_MEMBER_H_ + +#include +#include +#include + +#include "cppgc/internal/api-constants.h" +#include "cppgc/macros.h" +#include "cppgc/member.h" +#include "cppgc/visitor.h" + +namespace cppgc::subtle { + +// The class allows to store a Member along with a single bit tag. It uses +// distinct tag types, Tag1 and Tag2, to represent the two states of the tag. +// The tag is stored in the least significant bit of the pointer. +// +// Example usage: +// struct ParentTag {}; +// struct ShadowHostTag {}; +// +// /* Constructs a member with the pointer to parent tag: */ +// TaggedUncompressedMember +// m(ParentTag{}, parent); +template +struct TaggedUncompressedMember final { + CPPGC_DISALLOW_NEW(); + static constexpr uintptr_t kTagBit = 0b1; + static_assert(kTagBit < internal::api_constants::kAllocationGranularity, + "The tag must live in the alignment bits of the pointer."); + + public: + TaggedUncompressedMember(Tag1, Pointee* ptr) : ptr_(ptr) {} + TaggedUncompressedMember(Tag2, Pointee* ptr) + : ptr_(reinterpret_cast(reinterpret_cast(ptr) | + kTagBit)) {} + + template + Pointee* GetAs() const { + auto* raw = ptr_.Get(); + if constexpr (std::same_as) { + CPPGC_DCHECK(Is()); + return raw; + } else { + static_assert(std::same_as); + CPPGC_DCHECK(Is()); + return GetUntagged(); + } + } + + template + Pointee* TryGetAs() const { + auto* raw = ptr_.Get(); + if constexpr (std::same_as) { + return (reinterpret_cast(raw) & kTagBit) ? nullptr : raw; + } else { + static_assert(std::same_as); + return (reinterpret_cast(raw) & kTagBit) + ? reinterpret_cast(reinterpret_cast(raw) & + ~kTagBit) + : nullptr; + } + } + + Pointee* GetUntagged() const { + return reinterpret_cast(reinterpret_cast(ptr_.Get()) & + ~kTagBit); + } + + template + void SetAs(Pointee* pointee) { + if constexpr (std::same_as) { + ptr_ = pointee; + } else { + static_assert(std::same_as); + ptr_ = reinterpret_cast(reinterpret_cast(pointee) | + kTagBit); + } + } + + template + bool Is() const { + const bool tag_set = reinterpret_cast(ptr_.Get()) & kTagBit; + if constexpr (std::same_as) { + return !tag_set; + } else { + static_assert(std::same_as); + return tag_set; + } + } + + void Trace(Visitor* v) const { + // Construct an untagged pointer and pass it to Visitor::Trace(). The plugin + // would warn that ptr_ is untraced, which is why CPPGC_PLUGIN_IGNORE is + // used. + UncompressedMember temp(GetUntagged()); + v->Trace(temp); + } + + private: + CPPGC_PLUGIN_IGNORE("See Trace()") UncompressedMember ptr_; +}; + +} // namespace cppgc::subtle + +#endif // INCLUDE_CPPGC_TAGGED_MEMBER_H_ diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl index e33cdae701a128..73da9149b5d8bc 100644 --- a/deps/v8/include/js_protocol.pdl +++ b/deps/v8/include/js_protocol.pdl @@ -649,7 +649,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # For Wasm modules, the content of the `build_id` custom section. + # For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment. string buildId # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData @@ -690,7 +690,7 @@ domain Debugger Runtime.ExecutionContextId executionContextId # Content hash of the script, SHA-256. string hash - # For Wasm modules, the content of the `build_id` custom section. + # For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment. string buildId # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} optional object executionContextAuxData diff --git a/deps/v8/include/v8-callbacks.h b/deps/v8/include/v8-callbacks.h index db5ec8304092b6..a9f380e38abdde 100644 --- a/deps/v8/include/v8-callbacks.h +++ b/deps/v8/include/v8-callbacks.h @@ -328,10 +328,6 @@ using WasmImportedStringsEnabledCallback = bool (*)(Local context); using SharedArrayBufferConstructorEnabledCallback = bool (*)(Local context); -// --- Callback for checking if the compile hints magic comments are enabled --- -using JavaScriptCompileHintsMagicEnabledCallback = - bool (*)(Local context); - // --- Callback for checking if WebAssembly JSPI is enabled --- using WasmJSPIEnabledCallback = bool (*)(Local context); diff --git a/deps/v8/include/v8-cpp-heap-external.h b/deps/v8/include/v8-cpp-heap-external.h new file mode 100644 index 00000000000000..92a89c45546378 --- /dev/null +++ b/deps/v8/include/v8-cpp-heap-external.h @@ -0,0 +1,56 @@ +// Copyright 2025 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef INCLUDE_V8_HEAP_EXTERNAL_H_ +#define INCLUDE_V8_HEAP_EXTERNAL_H_ + +#include "cppgc/type-traits.h" // NOLINT(build/include_directory) +#include "v8-sandbox.h" // NOLINT(build/include_directory) +#include "v8-value.h" // NOLINT(build/include_directory) +#include "v8config.h" // NOLINT(build/include_directory) + +namespace v8 { + +class Isolate; + +/** + * A JavaScript value that wraps a `cppgc::GarbageCollected` object allocated + * on the managed C++ heap (CppHeap). This type of value is mainly used to + * associate C++ data structures which aren't exposed to JavaScript with + * JavaScript objects. + */ +class V8_EXPORT CppHeapExternal : public Data { + public: + template + static Local New(Isolate* isolate, T* value, + CppHeapPointerTag tag) { + static_assert(cppgc::IsGarbageCollectedTypeV, + "Object must be of type GarbageCollected."); + return NewImpl(isolate, value, tag); + } + + V8_INLINE static CppHeapExternal* Cast(Data* data) { +#ifdef V8_ENABLE_CHECKS + CheckCast(data); +#endif + return static_cast(data); + } + + template + T* Value(Isolate* isolate, CppHeapPointerTagRange tag_range) const { + static_assert(cppgc::IsGarbageCollectedTypeV, + "Object must be of type GarbageCollected."); + return static_cast(ValueImpl(isolate, tag_range)); + } + + private: + static void CheckCast(v8::Data* obj); + static Local NewImpl(Isolate* isolate, void* value, + CppHeapPointerTag tag); + void* ValueImpl(Isolate*, CppHeapPointerTagRange tag_range) const; +}; + +} // namespace v8 + +#endif // INCLUDE_V8_HEAP_EXTERNAL_H_ diff --git a/deps/v8/include/v8-data.h b/deps/v8/include/v8-data.h index 3093d7f34d146d..f9c60f4dc6068b 100644 --- a/deps/v8/include/v8-data.h +++ b/deps/v8/include/v8-data.h @@ -57,6 +57,11 @@ class V8_EXPORT Data { */ bool IsContext() const; + /** + * Returns true if this value is a `CppHeapExternal` object. + */ + bool IsCppHeapExternal() const; + private: Data() = delete; }; diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h index 7236a372342c04..0992cb1c3cb599 100644 --- a/deps/v8/include/v8-inspector.h +++ b/deps/v8/include/v8-inspector.h @@ -408,12 +408,20 @@ class V8_EXPORT V8Inspector { enum ClientTrustLevel { kUntrusted, kFullyTrusted }; enum SessionPauseState { kWaitingForDebugger, kNotWaitingForDebugger }; // TODO(chromium:1352175): remove default value once downstream change lands. + // Deprecated: Use `connectShared` instead. virtual std::unique_ptr connect( int contextGroupId, Channel*, StringView state, ClientTrustLevel client_trust_level, - SessionPauseState = kNotWaitingForDebugger) { - return nullptr; - } + SessionPauseState = kNotWaitingForDebugger) = 0; + + // Same as `connect` but returns a std::shared_ptr instead. + // Embedders should not deconstruct V8 sessions while the nested run loop + // (V8InspectorClient::runMessageLoopOnPause) is running. To partially ensure + // this, we defer session deconstruction until no "dispatchProtocolMessages" + // remains on the stack. + virtual std::shared_ptr connectShared( + int contextGroupId, Channel* channel, StringView state, + ClientTrustLevel clientTrustLevel, SessionPauseState pauseState) = 0; // API methods. virtual std::unique_ptr createStackTrace( diff --git a/deps/v8/include/v8-internal.h b/deps/v8/include/v8-internal.h index 5ff16cdabf9f42..66bb4b7d233cc2 100644 --- a/deps/v8/include/v8-internal.h +++ b/deps/v8/include/v8-internal.h @@ -560,22 +560,16 @@ enum ExternalPointerTag : uint16_t { kFunctionTemplateInfoCallbackTag = kFirstMaybeReadOnlyExternalPointerTag, kAccessorInfoGetterTag, kAccessorInfoSetterTag, - kLastMaybeReadOnlyExternalPointerTag = kAccessorInfoSetterTag, - kWasmInternalFunctionCallTargetTag, - kWasmTypeInfoNativeTypeTag, - kWasmExportedFunctionDataSignatureTag, - kWasmStackMemoryTag, - kWasmIndirectFunctionTargetTag, - // Foreigns - kFirstForeignExternalPointerTag, - kGenericForeignTag = kFirstForeignExternalPointerTag, - kApiNamedPropertyQueryCallbackTag, + // InterceptorInfo external pointers. + kFirstInterceptorInfoExternalPointerTag, + kApiNamedPropertyQueryCallbackTag = kFirstInterceptorInfoExternalPointerTag, kApiNamedPropertyGetterCallbackTag, kApiNamedPropertySetterCallbackTag, kApiNamedPropertyDescriptorCallbackTag, kApiNamedPropertyDefinerCallbackTag, kApiNamedPropertyDeleterCallbackTag, + kApiNamedPropertyEnumeratorCallbackTag, kApiIndexedPropertyQueryCallbackTag, kApiIndexedPropertyGetterCallbackTag, kApiIndexedPropertySetterCallbackTag, @@ -583,6 +577,21 @@ enum ExternalPointerTag : uint16_t { kApiIndexedPropertyDefinerCallbackTag, kApiIndexedPropertyDeleterCallbackTag, kApiIndexedPropertyEnumeratorCallbackTag, + kLastInterceptorInfoExternalPointerTag = + kApiIndexedPropertyEnumeratorCallbackTag, + + kLastMaybeReadOnlyExternalPointerTag = kLastInterceptorInfoExternalPointerTag, + + kWasmInternalFunctionCallTargetTag, + kWasmTypeInfoNativeTypeTag, + kWasmExportedFunctionDataSignatureTag, + kWasmStackMemoryTag, + kWasmIndirectFunctionTargetTag, + + // Foreigns + kFirstForeignExternalPointerTag, + kGenericForeignTag = kFirstForeignExternalPointerTag, + kApiAccessCheckCallbackTag, kApiAbortScriptExecutionCallbackTag, kSyntheticModuleTag, @@ -636,6 +645,9 @@ constexpr ExternalPointerTagRange kAnySharedExternalPointerTagRange( kFirstSharedExternalPointerTag, kLastSharedExternalPointerTag); constexpr ExternalPointerTagRange kAnyForeignExternalPointerTagRange( kFirstForeignExternalPointerTag, kLastForeignExternalPointerTag); +constexpr ExternalPointerTagRange kAnyInterceptorInfoExternalPointerTagRange( + kFirstInterceptorInfoExternalPointerTag, + kLastInterceptorInfoExternalPointerTag); constexpr ExternalPointerTagRange kAnyManagedExternalPointerTagRange( kFirstManagedExternalPointerTag, kLastManagedExternalPointerTag); constexpr ExternalPointerTagRange kAnyMaybeReadOnlyExternalPointerTagRange( @@ -678,7 +690,8 @@ V8_INLINE static constexpr bool IsManagedExternalPointerType( V8_INLINE static constexpr bool ExternalPointerCanBeEmpty( ExternalPointerTagRange tag_range) { return tag_range.Contains(kArrayBufferExtensionTag) || - tag_range.Contains(kEmbedderDataSlotPayloadTag); + tag_range.Contains(kEmbedderDataSlotPayloadTag) || + kAnyInterceptorInfoExternalPointerTagRange.Contains(tag_range); } // Indirect Pointers. @@ -1331,7 +1344,7 @@ class BackingStoreBase {}; // The maximum value in enum GarbageCollectionReason, defined in heap.h. // This is needed for histograms sampling garbage collection reasons. -constexpr int kGarbageCollectionReasonMaxValue = 29; +constexpr int kGarbageCollectionReasonMaxValue = 30; // Base class for the address block allocator compatible with standard // containers, which registers its allocated range as strong roots. diff --git a/deps/v8/include/v8-isolate.h b/deps/v8/include/v8-isolate.h index 332688e77b48e6..280c09729f8cb4 100644 --- a/deps/v8/include/v8-isolate.h +++ b/deps/v8/include/v8-isolate.h @@ -1665,16 +1665,6 @@ class V8_EXPORT Isolate { void SetWasmJSPIEnabledCallback(WasmJSPIEnabledCallback callback); - /** - * Register callback to control whether compile hints magic comments are - * enabled. - */ - V8_DEPRECATED( - "Will be removed, use ScriptCompiler::CompileOptions for enabling the " - "compile hints magic comments") - void SetJavaScriptCompileHintsMagicEnabledCallback( - JavaScriptCompileHintsMagicEnabledCallback callback); - /** * This function can be called by the embedder to signal V8 that the dynamic * enabling of features has finished. V8 can now set up dynamically added @@ -1697,7 +1687,7 @@ class V8_EXPORT Isolate { * If data is specified, it will be passed to the callback when it is called. * Otherwise, the exception object will be passed to the callback instead. */ - bool AddMessageListener(MessageCallback that, + bool AddMessageListener(MessageCallback callback, Local data = Local()); /** @@ -1711,14 +1701,14 @@ class V8_EXPORT Isolate { * * A listener can listen for particular error levels by providing a mask. */ - bool AddMessageListenerWithErrorLevel(MessageCallback that, + bool AddMessageListenerWithErrorLevel(MessageCallback callback, int message_levels, Local data = Local()); /** * Remove all message listeners from the specified callback function. */ - void RemoveMessageListeners(MessageCallback that); + void RemoveMessageListeners(MessageCallback callback); /** Callback function for reporting failed access checks.*/ void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback); @@ -1789,6 +1779,21 @@ class V8_EXPORT Isolate { */ std::string GetDefaultLocale(); + /** + * Returns a canonical and case-regularized form of locale if Intl support is + * enabled. If the locale is not syntactically well-formed, throws a + * RangeError. + * + * If Intl support is not enabled, returns Nothing(). + * + * Corresponds to the combination of the abstract operations + * IsStructurallyValidLanguageTag and CanonicalizeUnicodeLocaleId. See: + * https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag + * https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid + */ + V8_WARN_UNUSED_RESULT Maybe + ValidateAndCanonicalizeUnicodeLocaleId(std::string_view locale); + /** * Returns the hash seed for that isolate, for testing purposes. */ diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h index cecc217a62bbdb..43ffeb57d708d3 100644 --- a/deps/v8/include/v8-platform.h +++ b/deps/v8/include/v8-platform.h @@ -505,6 +505,16 @@ class PageAllocator { virtual void* AllocatePages(void* address, size_t length, size_t alignment, Permission permissions) = 0; + /** + * Resizes the previously allocated memory at the given address. Returns true + * if the allocation could be resized. Returns false if this operation is + * either not supported or the object could not be resized in-place. + */ + virtual bool ResizeAllocationAt(void* address, size_t old_length, + size_t new_length, Permission permissions) { + return false; + } + /** * Frees memory in a range that was allocated by a call to AllocatePages. */ diff --git a/deps/v8/include/v8-primitive.h b/deps/v8/include/v8-primitive.h index f966ed55674841..50b07d9c10a7bb 100644 --- a/deps/v8/include/v8-primitive.h +++ b/deps/v8/include/v8-primitive.h @@ -819,6 +819,8 @@ class V8_EXPORT Symbol : public Name { static Local GetToPrimitive(Isolate* isolate); static Local GetToStringTag(Isolate* isolate); static Local GetUnscopables(Isolate* isolate); + static Local GetDispose(Isolate* isolate); + static Local GetAsyncDispose(Isolate* isolate); V8_INLINE static Symbol* Cast(Data* data) { #ifdef V8_ENABLE_CHECKS diff --git a/deps/v8/include/v8-template.h b/deps/v8/include/v8-template.h index 297a45d1fe64c7..3ae4a957ed21df 100644 --- a/deps/v8/include/v8-template.h +++ b/deps/v8/include/v8-template.h @@ -188,7 +188,8 @@ using NamedPropertyGetterCallback = Intercepted (*)( // Use `info.GetReturnValue().Set()` to set the return value of the // intercepted get request. If the property does not exist the callback should // not set the result and must not produce side effects. -using GenericNamedPropertyGetterCallback = +using GenericNamedPropertyGetterCallback V8_DEPRECATE_SOON( + "Use NamedPropertyGetterCallback instead") = void (*)(Local property, const PropertyCallbackInfo& info); /** @@ -221,7 +222,8 @@ using NamedPropertySetterCallback = // `info.GetReturnValue().Set(value)`. If the setter did not intercept the // request, i.e., if the request should be handled as if no interceptor is // present, do not not call `Set()` and do not produce side effects. -using GenericNamedPropertySetterCallback = +using GenericNamedPropertySetterCallback V8_DEPRECATE_SOON( + "Use NamedPropertySetterCallback instead") = void (*)(Local property, Local value, const PropertyCallbackInfo& info); @@ -259,7 +261,8 @@ using NamedPropertyQueryCallback = Intercepted (*)( // value is an integer encoding a `v8::PropertyAttribute`. If the property does // not exist the callback should not set the result and must not produce side // effects. -using GenericNamedPropertyQueryCallback = +using GenericNamedPropertyQueryCallback V8_DEPRECATE_SOON( + "Use NamedPropertyQueryCallback instead") = void (*)(Local property, const PropertyCallbackInfo& info); /** @@ -296,7 +299,8 @@ using NamedPropertyDeleterCallback = Intercepted (*)( // `info.GetReturnValue().Set(value)` with a boolean `value`. The `value` is // used as the return value of `delete`. If the deleter does not intercept the // request then it should not set the result and must not produce side effects. -using GenericNamedPropertyDeleterCallback = +using GenericNamedPropertyDeleterCallback V8_DEPRECATE_SOON( + "Use NamedPropertyDeleterCallback instead") = void (*)(Local property, const PropertyCallbackInfo& info); /** @@ -309,7 +313,9 @@ using NamedPropertyEnumeratorCallback = void (*)(const PropertyCallbackInfo& info); // This variant will be deprecated soon. // This is just a renaming of the typedef. -using GenericNamedPropertyEnumeratorCallback = NamedPropertyEnumeratorCallback; +using GenericNamedPropertyEnumeratorCallback V8_DEPRECATE_SOON( + "Use NamedPropertyEnumeratorCallback instead") = + NamedPropertyEnumeratorCallback; /** * Interceptor for defineProperty requests on an object. @@ -341,7 +347,8 @@ using NamedPropertyDefinerCallback = // `info.GetReturnValue().Set(value)`. If the definer did not intercept the // request, i.e., if the request should be handled as if no interceptor is // present, do not not call `Set()` and do not produce side effects. -using GenericNamedPropertyDefinerCallback = +using GenericNamedPropertyDefinerCallback V8_DEPRECATE_SOON( + "Use NamedPropertyDefinerCallback instead") = void (*)(Local property, const PropertyDescriptor& desc, const PropertyCallbackInfo& info); @@ -377,7 +384,8 @@ using NamedPropertyDescriptorCallback = Intercepted (*)( // intercepted request. The return value must be an object that // can be converted to a PropertyDescriptor, e.g., a `v8::Value` returned from // `v8::Object::getOwnPropertyDescriptor`. -using GenericNamedPropertyDescriptorCallback = +using GenericNamedPropertyDescriptorCallback V8_DEPRECATE_SOON( + "Use NamedPropertyDescriptorCallback instead") = void (*)(Local property, const PropertyCallbackInfo& info); // TODO(ishell): Rename IndexedPropertyXxxCallbackV2 back to @@ -390,7 +398,8 @@ using GenericNamedPropertyDescriptorCallback = using IndexedPropertyGetterCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertyGetterCallback = +using IndexedPropertyGetterCallback V8_DEPRECATE_SOON( + "Use IndexedPropertyGetterCallbackV2 instead") = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** @@ -399,7 +408,8 @@ using IndexedPropertyGetterCallback = using IndexedPropertySetterCallbackV2 = Intercepted (*)( uint32_t index, Local value, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertySetterCallback = +using IndexedPropertySetterCallback V8_DEPRECATE_SOON( + "Use IndexedPropertySetterCallbackV2 instead") = void (*)(uint32_t index, Local value, const PropertyCallbackInfo& info); @@ -409,7 +419,8 @@ using IndexedPropertySetterCallback = using IndexedPropertyQueryCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertyQueryCallback = +using IndexedPropertyQueryCallback V8_DEPRECATE_SOON( + "Use IndexedPropertyQueryCallbackV2 instead") = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** @@ -418,7 +429,8 @@ using IndexedPropertyQueryCallback = using IndexedPropertyDeleterCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertyDeleterCallback = +using IndexedPropertyDeleterCallback V8_DEPRECATE_SOON( + "Use IndexedPropertyDeleterCallbackV2 instead") = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** @@ -437,7 +449,8 @@ using IndexedPropertyDefinerCallbackV2 = Intercepted (*)(uint32_t index, const PropertyDescriptor& desc, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertyDefinerCallback = +using IndexedPropertyDefinerCallback V8_DEPRECATE_SOON( + "Use IndexedPropertyDefinerCallbackV2 instead") = void (*)(uint32_t index, const PropertyDescriptor& desc, const PropertyCallbackInfo& info); @@ -447,7 +460,8 @@ using IndexedPropertyDefinerCallback = using IndexedPropertyDescriptorCallbackV2 = Intercepted (*)(uint32_t index, const PropertyCallbackInfo& info); // This variant will be deprecated soon. -using IndexedPropertyDescriptorCallback = +using IndexedPropertyDescriptorCallback V8_DEPRECATE_SOON( + "Use IndexedPropertyDescriptorCallbackV2 instead") = void (*)(uint32_t index, const PropertyCallbackInfo& info); /** @@ -702,8 +716,8 @@ class V8_EXPORT FunctionTemplate : public Template { bool IsLeafTemplateForApiObject(v8::Local value) const; /** - * Checks if the object can be promoted to read only space, seals it and - * prepares for promotion. + * Seal the object and mark it for promotion to read only space during + * context snapshot creation. * * This is an experimental feature and may still change significantly. */ @@ -1037,6 +1051,14 @@ class V8_EXPORT ObjectTemplate : public Template { void SetCodeLike(); bool IsCodeLike() const; + /** + * Seal the object and mark it for promotion to read only space during + * context snapshot creation. + * + * This is an experimental feature and may still change significantly. + */ + void SealAndPrepareForPromotionToReadOnly(); + V8_INLINE static ObjectTemplate* Cast(Data* data); private: diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index ef65881ed91063..aaa9c389178051 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 13 -#define V8_MINOR_VERSION 6 -#define V8_BUILD_NUMBER 233 -#define V8_PATCH_LEVEL 10 +#define V8_MINOR_VERSION 7 +#define V8_BUILD_NUMBER 152 +#define V8_PATCH_LEVEL 9 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index c80bacd91c586e..f787dd9a0751d0 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -853,7 +853,7 @@ }, 'conservative_stack_scanning': { - 'gn_args': 'v8_enable_conservative_stack_scanning=true', + 'gn_args': 'v8_enable_direct_handle=true', }, 'dcheck_always_on': { diff --git a/deps/v8/infra/testing/builders.pyl b/deps/v8/infra/testing/builders.pyl index 21d290d8b1f2d1..787c43b1d5f95b 100644 --- a/deps/v8/infra/testing/builders.pyl +++ b/deps/v8/infra/testing/builders.pyl @@ -109,7 +109,7 @@ 'os': 'Ubuntu-22.04', }, 'tests': [ - {'name': 'v8testing', 'variant': 'default', 'shards': 6}, + {'name': 'v8testing', 'variant': 'default', 'shards': 8}, ], }, 'v8_linux_gc_stress_dbg': { @@ -1375,7 +1375,7 @@ 'os': 'Ubuntu-22.04', }, 'tests': [ - {'name': 'v8testing', 'variant': 'default', 'shards': 7}, + {'name': 'v8testing', 'variant': 'default', 'shards': 8}, ], }, 'V8 Linux - gc stress': { diff --git a/deps/v8/infra/whitespace.txt b/deps/v8/infra/whitespace.txt new file mode 100644 index 00000000000000..7692b0d582ff77 --- /dev/null +++ b/deps/v8/infra/whitespace.txt @@ -0,0 +1 @@ +Some infra-owned whitespace to test the cherry-picker. \ No newline at end of file diff --git a/deps/v8/src/api/api-arguments-inl.h b/deps/v8/src/api/api-arguments-inl.h index 86b1c75d15612d..2f9c0faab2ee33 100644 --- a/deps/v8/src/api/api-arguments-inl.h +++ b/deps/v8/src/api/api-arguments-inl.h @@ -163,9 +163,8 @@ DirectHandle PropertyCallbackArguments::CallNamedQuery( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedQueryCallback); slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(Smi::FromInt(v8::None)); - NamedPropertyQueryCallback f = - ToCData( - isolate, interceptor->query()); + NamedPropertyQueryCallback f = reinterpret_cast( + interceptor->named_query(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor, ExceptionContext::kNamedQuery); v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); @@ -180,9 +179,8 @@ DirectHandle PropertyCallbackArguments::CallNamedGetter( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedGetterCallback); slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); - NamedPropertyGetterCallback f = - ToCData( - isolate, interceptor->getter()); + NamedPropertyGetterCallback f = reinterpret_cast( + interceptor->named_getter(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, ExceptionContext::kNamedGetter); v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); @@ -198,9 +196,8 @@ Handle PropertyCallbackArguments::CallNamedDescriptor( slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); NamedPropertyDescriptorCallback f = - ToCData( - isolate, interceptor->descriptor()); + reinterpret_cast( + interceptor->named_descriptor(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, ExceptionContext::kNamedDescriptor); v8::Intercepted intercepted = f(v8::Utils::ToLocal(name), callback_info); @@ -216,9 +213,8 @@ v8::Intercepted PropertyCallbackArguments::CallNamedSetter( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedSetterCallback); slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); - NamedPropertySetterCallback f = - ToCData( - isolate, interceptor->setter()); + NamedPropertySetterCallback f = reinterpret_cast( + interceptor->named_setter(isolate)); DirectHandle has_side_effects; PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, ExceptionContext::kNamedSetter); @@ -235,9 +231,9 @@ v8::Intercepted PropertyCallbackArguments::CallNamedDefiner( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDefinerCallback); slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); - NamedPropertyDefinerCallback f = ToCData( - isolate, interceptor->definer()); + NamedPropertyDefinerCallback f = + reinterpret_cast( + interceptor->named_definer(isolate)); DirectHandle has_side_effects; PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, ExceptionContext::kNamedDefiner); @@ -253,9 +249,9 @@ v8::Intercepted PropertyCallbackArguments::CallNamedDeleter( RCS_SCOPE(isolate, RuntimeCallCounterId::kNamedDeleterCallback); slot_at(kPropertyKeyIndex).store(*name); slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); - NamedPropertyDeleterCallback f = ToCData( - isolate, interceptor->deleter()); + NamedPropertyDeleterCallback f = + reinterpret_cast( + interceptor->named_deleter(isolate)); DirectHandle has_side_effects; PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, has_side_effects, ExceptionContext::kNamedDeleter); @@ -284,9 +280,8 @@ DirectHandle PropertyCallbackArguments::CallIndexedQuery( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(Smi::FromInt(v8::None)); IndexedPropertyQueryCallbackV2 f = - ToCData(isolate, - interceptor->query()); + reinterpret_cast( + interceptor->indexed_query(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Integer, interceptor, ExceptionContext::kIndexedQuery); v8::Intercepted intercepted = f(index, callback_info); @@ -303,9 +298,8 @@ DirectHandle PropertyCallbackArguments::CallIndexedGetter( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); IndexedPropertyGetterCallbackV2 f = - ToCData(isolate, - interceptor->getter()); + reinterpret_cast( + interceptor->indexed_getter(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, ExceptionContext::kIndexedGetter); v8::Intercepted intercepted = f(index, callback_info); @@ -322,9 +316,8 @@ Handle PropertyCallbackArguments::CallIndexedDescriptor( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); IndexedPropertyDescriptorCallbackV2 f = - ToCData( - isolate, interceptor->descriptor()); + reinterpret_cast( + interceptor->indexed_descriptor(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Value, interceptor, ExceptionContext::kIndexedDescriptor); v8::Intercepted intercepted = f(index, callback_info); @@ -342,9 +335,8 @@ v8::Intercepted PropertyCallbackArguments::CallIndexedSetter( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); IndexedPropertySetterCallbackV2 f = - ToCData(isolate, - interceptor->setter()); + reinterpret_cast( + interceptor->indexed_setter(isolate)); DirectHandle has_side_effects; PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, ExceptionContext::kIndexedSetter); @@ -363,9 +355,8 @@ v8::Intercepted PropertyCallbackArguments::CallIndexedDefiner( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); IndexedPropertyDefinerCallbackV2 f = - ToCData(isolate, - interceptor->definer()); + reinterpret_cast( + interceptor->indexed_definer(isolate)); DirectHandle has_side_effects; PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, void, has_side_effects, ExceptionContext::kIndexedDefiner); @@ -382,9 +373,8 @@ v8::Intercepted PropertyCallbackArguments::CallIndexedDeleter( slot_at(kPropertyKeyIndex).store(Smi::zero()); // indexed callback marker slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).true_value()); IndexedPropertyDeleterCallbackV2 f = - ToCData(isolate, - interceptor->deleter()); + reinterpret_cast( + interceptor->indexed_deleter(isolate)); PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Boolean, interceptor, ExceptionContext::kIndexedDeleter); v8::Intercepted intercepted = f(index, callback_info); @@ -395,8 +385,8 @@ DirectHandle PropertyCallbackArguments::CallPropertyEnumerator( DirectHandle interceptor) { // Named and indexed enumerator callbacks have same signatures. - static_assert(std::is_same::value); + static_assert(std::is_same_v); Isolate* isolate = this->isolate(); slot_at(kPropertyKeyIndex).store(Smi::zero()); // not relevant // Enumerator callback's return value is initialized with undefined even @@ -404,10 +394,14 @@ PropertyCallbackArguments::CallPropertyEnumerator( slot_at(kReturnValueIndex).store(ReadOnlyRoots(isolate).undefined_value()); // TODO(ishell): consider making it return v8::Intercepted to indicate // whether the result was set or not. - IndexedPropertyEnumeratorCallback f = - v8::ToCData( - isolate, interceptor->enumerator()); + IndexedPropertyEnumeratorCallback f; + if (interceptor->is_named()) { + f = reinterpret_cast( + interceptor->named_enumerator(isolate)); + } else { + f = reinterpret_cast( + interceptor->indexed_enumerator(isolate)); + } PREPARE_CALLBACK_INFO_INTERCEPTOR(isolate, f, v8::Array, interceptor, ExceptionContext::kNamedEnumerator); f(callback_info); diff --git a/deps/v8/src/api/api-natives.cc b/deps/v8/src/api/api-natives.cc index 33eab94465d2f5..06fee8ec4cf69b 100644 --- a/deps/v8/src/api/api-natives.cc +++ b/deps/v8/src/api/api-natives.cc @@ -83,7 +83,7 @@ MaybeDirectHandle DefineAccessorProperty( isolate, getter, InstantiateFunction(isolate, Cast(getter))); DirectHandle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); - Cast(getter)->UpdateCode(*trampoline); + Cast(getter)->UpdateCode(isolate, *trampoline); } if (IsFunctionTemplateInfo(*setter) && Cast(*setter)->BreakAtEntry(isolate)) { @@ -91,7 +91,7 @@ MaybeDirectHandle DefineAccessorProperty( isolate, setter, InstantiateFunction(isolate, Cast(setter))); DirectHandle trampoline = BUILTIN_CODE(isolate, DebugBreakTrampoline); - Cast(setter)->UpdateCode(*trampoline); + Cast(setter)->UpdateCode(isolate, *trampoline); } RETURN_ON_EXCEPTION(isolate, JSObject::DefineOwnAccessorIgnoreAttributes( object, name, getter, setter, attributes)); @@ -330,7 +330,7 @@ MaybeHandle InstantiateObject(Isolate* isolate, const auto new_js_object_type = constructor->has_initial_map() && - IsJSApiWrapperObject(constructor->initial_map()) + IsJSApiWrapperObjectMap(constructor->initial_map()) ? NewJSObjectType::kAPIWrapper : NewJSObjectType::kNoAPIWrapper; Handle object; diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 0f2a526b2b3453..43e9000bf15dee 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -36,10 +36,10 @@ #include "src/api/api-natives.h" #include "src/base/hashing.h" #include "src/base/logging.h" +#include "src/base/numerics/safe_conversions.h" #include "src/base/platform/memory.h" #include "src/base/platform/platform.h" #include "src/base/platform/time.h" -#include "src/base/safe_conversions.h" #include "src/base/utils/random-number-generator.h" #include "src/base/vector.h" #include "src/builtins/accessors.h" @@ -86,6 +86,7 @@ #include "src/objects/api-callbacks.h" #include "src/objects/backing-store.h" #include "src/objects/contexts.h" +#include "src/objects/cpp-heap-object-wrapper-inl.h" #include "src/objects/embedder-data-array-inl.h" #include "src/objects/embedder-data-slot-inl.h" #include "src/objects/hash-table-inl.h" @@ -153,6 +154,10 @@ #include "src/wasm/wasm-serialization.h" #endif // V8_ENABLE_WEBASSEMBLY +#ifdef V8_INTL_SUPPORT +#include "src/objects/intl-objects.h" +#endif // V8_INTL_SUPPORT + #if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD #include #include @@ -815,6 +820,10 @@ bool Data::IsContext() const { return i::IsContext(*Utils::OpenDirectHandle(this)); } +bool Data::IsCppHeapExternal() const { + return IsCppHeapExternalObject(*Utils::OpenDirectHandle(this)); +} + void Context::Enter() { i::DisallowGarbageCollection no_gc; i::Tagged env = *Utils::OpenDirectHandle(this); @@ -1470,52 +1479,26 @@ template i::DirectHandle CreateInterceptorInfo( i::Isolate* i_isolate, Getter getter, Setter setter, Query query, - Descriptor descriptor, Deleter remover, Enumerator enumerator, + Descriptor descriptor, Deleter deleter, Enumerator enumerator, Definer definer, Local data, base::Flags flags) { // TODO(saelo): instead of an in-sandbox struct with a lot of external // pointers (with different tags), consider creating an object in trusted // space instead. That way, only a single reference going out of the sandbox // would be required. - auto obj = i::Cast(i_isolate->factory()->NewStruct( - i::INTERCEPTOR_INFO_TYPE, i::AllocationType::kOld)); - obj->set_flags(0); - -#define CALLBACK_TAG(NAME) \ - property_type == PropertyType::kNamed \ - ? internal::kApiNamedProperty##NAME##CallbackTag \ - : internal::kApiIndexedProperty##NAME##CallbackTag; - - if (getter != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Getter); - SET_FIELD_WRAPPED(i_isolate, obj, set_getter, getter, tag); - } - if (setter != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Setter); - SET_FIELD_WRAPPED(i_isolate, obj, set_setter, setter, tag); - } - if (query != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Query); - SET_FIELD_WRAPPED(i_isolate, obj, set_query, query, tag); - } - if (descriptor != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Descriptor); - SET_FIELD_WRAPPED(i_isolate, obj, set_descriptor, descriptor, tag); - } - if (remover != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Deleter); - SET_FIELD_WRAPPED(i_isolate, obj, set_deleter, remover, tag); - } - if (enumerator != nullptr) { - SET_FIELD_WRAPPED(i_isolate, obj, set_enumerator, enumerator, - internal::kApiIndexedPropertyEnumeratorCallbackTag); - } - if (definer != nullptr) { - constexpr internal::ExternalPointerTag tag = CALLBACK_TAG(Definer); - SET_FIELD_WRAPPED(i_isolate, obj, set_definer, definer, tag); + auto obj = i_isolate->factory()->NewInterceptorInfo(); + obj->set_is_named(property_type == PropertyType::kNamed); + +#define SET_CALLBACK_FIELD(Name, name) \ + if (name != nullptr) { \ + if constexpr (property_type == PropertyType::kNamed) { \ + obj->set_named_##name(i_isolate, reinterpret_cast(name)); \ + } else { \ + obj->set_indexed_##name(i_isolate, reinterpret_cast(name)); \ + } \ } - -#undef CALLBACK_TAG + INTERCEPTOR_INFO_CALLBACK_LIST(SET_CALLBACK_FIELD) +#undef SET_CALLBACK_FIELD obj->set_can_intercept_symbols( !(flags & PropertyHandlerFlags::kOnlyInterceptStrings)); @@ -1539,7 +1522,6 @@ i::DirectHandle CreateNamedInterceptorInfo( auto interceptor = CreateInterceptorInfo( i_isolate, getter, setter, query, descriptor, remover, enumerator, definer, data, flags); - interceptor->set_is_named(true); return interceptor; } @@ -1553,7 +1535,6 @@ i::DirectHandle CreateIndexedInterceptorInfo( auto interceptor = CreateInterceptorInfo( i_isolate, getter, setter, query, descriptor, remover, enumerator, definer, data, flags); - interceptor->set_is_named(false); return interceptor; } @@ -2553,8 +2534,8 @@ V8_WARN_UNUSED_RESULT MaybeLocal ScriptCompiler::CompileFunction( i::DirectHandle result; has_exception = !i::Compiler::GetWrappedFunction( - Utils::OpenHandle(*source->source_string), context, script_details, - cached_data.get(), options, no_cache_reason) + i_isolate, Utils::OpenHandle(*source->source_string), context, + script_details, cached_data.get(), options, no_cache_reason) .ToHandle(&result); if (options & kConsumeCodeCache) { source->cached_data->rejected = cached_data->rejected(); @@ -2649,8 +2630,10 @@ i::MaybeDirectHandle CompileStreamedSource( origin.ColumnOffset(), origin.SourceMapUrl(), origin.GetHostDefinedOptions(), origin.Options()); i::ScriptStreamingData* data = v8_source->impl(); + i::IsCompiledScope is_compiled_scope; return i::Compiler::GetSharedFunctionInfoForStreamedScript( - i_isolate, str, script_details, data, &v8_source->compilation_details()); + i_isolate, str, script_details, data, &is_compiled_scope, + &v8_source->compilation_details()); } } // namespace @@ -4022,6 +4005,11 @@ void v8::WasmModuleObject::CheckCast(Value* that) { "Value is not a WasmModuleObject"); } +void v8::CppHeapExternal::CheckCast(v8::Data* that) { + Utils::ApiCheck(that->IsCppHeapExternal(), "v8::CppHeapExternal::Cast", + "Value is not a CppHeapExternal"); +} + v8::BackingStore::~BackingStore() { auto i_this = reinterpret_cast(this); i_this->~BackingStore(); // manually call internal destructor @@ -5498,7 +5486,8 @@ Local Function::GetDebugName() const { return ToApiHandle(i_isolate->factory()->undefined_value()); } auto func = i::Cast(self); - i::DirectHandle name = i::JSFunction::GetDebugName(func); + i::DirectHandle name = + i::JSFunction::GetDebugName(i_isolate, func); return Utils::ToLocal(i::direct_handle(*name, i_isolate)); } @@ -6394,7 +6383,7 @@ void v8::Object::SetAlignedPointerInInternalFields(int argc, int indices[], void* v8::Object::Unwrap(v8::Isolate* isolate, i::Address wrapper_obj, CppHeapPointerTagRange tag_range) { DCHECK_LE(tag_range.lower_bound, tag_range.upper_bound); - return i::JSApiWrapper( + return i::CppHeapObjectWrapper( i::Cast(i::Tagged(wrapper_obj))) .GetCppHeapWrappable(reinterpret_cast(isolate), tag_range); } @@ -6402,7 +6391,7 @@ void* v8::Object::Unwrap(v8::Isolate* isolate, i::Address wrapper_obj, // static void v8::Object::Wrap(v8::Isolate* isolate, i::Address wrapper_obj, CppHeapPointerTag tag, void* wrappable) { - return i::JSApiWrapper( + return i::CppHeapObjectWrapper( i::Cast(i::Tagged(wrapper_obj))) .SetCppHeapWrappable(reinterpret_cast(isolate), wrappable, tag); @@ -6904,7 +6893,8 @@ bool RequiresEmbedderSupportToFreeze(i::InstanceType obj_type) { return (i::InstanceTypeChecker::IsJSApiObject(obj_type) || i::InstanceTypeChecker::IsJSExternalObject(obj_type) || - i::InstanceTypeChecker::IsJSAPIObjectWithEmbedderSlots(obj_type)); + i::InstanceTypeChecker::IsJSAPIObjectWithEmbedderSlots(obj_type) || + i::InstanceTypeChecker::IsCppHeapExternalObject(obj_type)); } bool IsJSReceiverSafeToFreeze(i::InstanceType obj_type) { @@ -7501,6 +7491,12 @@ bool FunctionTemplate::IsLeafTemplateForApiObject( return self->IsLeafTemplateForApiObject(object); } +void ObjectTemplate::SealAndPrepareForPromotionToReadOnly() { + auto self = Utils::OpenDirectHandle(this); + i::Isolate* i_isolate = self->GetIsolateChecked(); + i::ObjectTemplateInfo::SealAndPrepareForPromotionToReadOnly(i_isolate, self); +} + void FunctionTemplate::SealAndPrepareForPromotionToReadOnly() { auto self = Utils::OpenDirectHandle(this); i::Isolate* i_isolate = self->GetIsolateChecked(); @@ -7529,6 +7525,26 @@ void* External::Value() const { ->value(isolate); } +Local v8::CppHeapExternal::NewImpl(Isolate* v8_isolate, + void* value, + CppHeapPointerTag tag) { + i::Isolate* i_isolate = reinterpret_cast(v8_isolate); + API_RCS_SCOPE(i_isolate, CppHeapExternal, New); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + i::DirectHandle external = + i_isolate->factory()->NewCppHeapExternal(); + i::CppHeapObjectWrapper(*external).SetCppHeapWrappable(i_isolate, value, tag); + return Utils::CppHeapExternalToLocal(external); +} + +void* CppHeapExternal::ValueImpl(v8::Isolate* isolate, + CppHeapPointerTagRange tag_range) const { + DCHECK_LE(tag_range.lower_bound, tag_range.upper_bound); + auto self = Utils::OpenDirectHandle(this); + return i::CppHeapObjectWrapper(*self).GetCppHeapWrappable( + reinterpret_cast(isolate), tag_range); +} + // anonymous namespace for string creation helper functions namespace { @@ -8906,9 +8922,9 @@ MaybeLocal WasmModuleObject::Compile( #if V8_ENABLE_WEBASSEMBLY base::OwnedVector bytes = base::OwnedCopyOf(wire_bytes); i::Isolate* i_isolate = reinterpret_cast(v8_isolate); - if (!i::wasm::IsWasmCodegenAllowed(i_isolate, i_isolate->native_context())) { - return MaybeLocal(); - } + // We don't check for `IsWasmCodegenAllowed` here, because this function is + // used for ESM integration, which in terms of security is equivalent to + //