deps: V8: cherry-pick 4f38995c8295

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: 6513391
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100069}

Refs: 4f38995c82
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Shu-yu Guo 2025-05-05 10:35:01 -07:00 committed by Node.js GitHub Bot
parent c8f82953bb
commit a186e075ef
3 changed files with 5 additions and 5 deletions

View file

@ -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 #####

View file

@ -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)

View file

@ -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]);