From a186e075ef355768b623475bf120944415c32c61 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Mon, 5 May 2025 10:35:01 -0700 Subject: [PATCH] deps: V8: cherry-pick 4f38995c8295 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [explicit-resource-management] Turn flag on by default This feature has shipped since M134 on the blink side, and is highly unlikely to be unshipped now, so flip the flag on. Bug: 42203506 Change-Id: I9554cea721983464b150c0de70b58a4b50fd477b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6513391 Reviewed-by: Rezvan Mahdavi Hezaveh Commit-Queue: Shu-yu Guo Cr-Commit-Position: refs/heads/main@{#100069} Refs: https://github.com/v8/v8/commit/4f38995c8295ec71815083c9d8946606994ab0ce PR-URL: https://github.com/nodejs/node/pull/58230 Reviewed-By: Joyee Cheung Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Marco Ippolito Reviewed-By: Juan José Arboleda Reviewed-By: Chengzhong Wu --- common.gypi | 2 +- deps/v8/src/flags/flag-definitions.h | 6 +++--- deps/v8/test/mjsunit/es6/iterator-prototype.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.gypi b/common.gypi index cb46e33f8b8..318663c8295 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.14', + 'v8_embedder_string': '-node.15', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h index dd713090c67..1cb6f5d6e1e 100644 --- a/deps/v8/src/flags/flag-definitions.h +++ b/deps/v8/src/flags/flag-definitions.h @@ -295,7 +295,6 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") // Features that are complete (but still behind the --harmony flag). #define HARMONY_STAGED_BASE(V) #define JAVASCRIPT_STAGED_FEATURES_BASE(V) \ - V(js_explicit_resource_management, "explicit resource management") \ V(js_float16array, \ "Float16Array, Math.f16round, DataView.getFloat16, DataView.setFloat16") @@ -311,7 +310,7 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") #endif // Features that are shipping (turned on by default, but internal flag remains). -#define HARMONY_SHIPPING_BASE(V) \ +#define HARMONY_SHIPPING_BASE(V) \ V(harmony_import_attributes, "harmony import attributes") #define JAVASCRIPT_SHIPPING_FEATURES_BASE(V) \ @@ -320,7 +319,8 @@ DEFINE_BOOL(js_shipping, true, "enable all shipped JavaScript features") V(js_promise_try, "Promise.try") \ V(js_atomics_pause, "Atomics.pause") \ V(js_error_iserror, "Error.isError") \ - V(js_regexp_escape, "RegExp.escape") + V(js_regexp_escape, "RegExp.escape") \ + V(js_explicit_resource_management, "explicit resource management") #ifdef V8_INTL_SUPPORT #define HARMONY_SHIPPING(V) HARMONY_SHIPPING_BASE(V) diff --git a/deps/v8/test/mjsunit/es6/iterator-prototype.js b/deps/v8/test/mjsunit/es6/iterator-prototype.js index 68cbafe3dab..1bb60c6e366 100644 --- a/deps/v8/test/mjsunit/es6/iterator-prototype.js +++ b/deps/v8/test/mjsunit/es6/iterator-prototype.js @@ -9,7 +9,7 @@ var iteratorPrototype = arrayIteratorPrototype.__proto__; assertSame(Object.prototype, Object.getPrototypeOf(iteratorPrototype)); assertTrue(Object.isExtensible(iteratorPrototype)); assertSame(12, Object.getOwnPropertyNames(iteratorPrototype).length); -assertSame(2, Object.getOwnPropertySymbols(iteratorPrototype).length); +assertSame(3, Object.getOwnPropertySymbols(iteratorPrototype).length); assertSame(Symbol.iterator, Object.getOwnPropertySymbols(iteratorPrototype)[0]);