Skip to content

Commit f2dad10

Browse files
legendecastargos
authored andcommitted
deps: V8: cherry-pick 0f9ebbc672c7
Original commit message: [flags] Remove --harmony-string-is-well-formed The String.prototype.isWellFormed and toWellFormed have shipped since M111. Bug: v8:13557 Change-Id: I27e332d2fde0f9ea8ad649c016a84d2d3e0bf592 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4931269 Reviewed-by: Shu-yu Guo <[email protected]> Commit-Queue: Chengzhong Wu (legendecas) <[email protected]> Cr-Commit-Position: refs/heads/main@{#90398} Refs: v8/v8@0f9ebbc PR-URL: nodejs#50867 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 34715c4 commit f2dad10

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.9',
39+
'v8_embedder_string': '-node.10',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/flags/flag-definitions.h

-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ DEFINE_WEAK_IMPLICATION(harmony_rab_gsab_transfer, harmony_rab_gsab)
297297
#define HARMONY_SHIPPING_BASE(V) \
298298
V(harmony_import_assertions, "harmony import assertions") \
299299
V(harmony_change_array_by_copy, "harmony change-Array-by-copy") \
300-
V(harmony_string_is_well_formed, "harmony String#{is,to}WellFormed") \
301300
V(harmony_rab_gsab, \
302301
"harmony ResizableArrayBuffer / GrowableSharedArrayBuffer") \
303302
V(harmony_regexp_unicode_sets, "harmony RegExp Unicode Sets") \

deps/v8/src/init/bootstrapper.cc

+4-12
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
21582158
Builtin::kStringPrototypeIncludes, 1, false);
21592159
SimpleInstallFunction(isolate_, prototype, "indexOf",
21602160
Builtin::kStringPrototypeIndexOf, 1, false);
2161+
SimpleInstallFunction(isolate(), prototype, "isWellFormed",
2162+
Builtin::kStringPrototypeIsWellFormed, 0, false);
21612163
SimpleInstallFunction(isolate_, prototype, "italics",
21622164
Builtin::kStringPrototypeItalics, 0, false);
21632165
SimpleInstallFunction(isolate_, prototype, "lastIndexOf",
@@ -2214,6 +2216,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
22142216
Builtin::kStringPrototypeStartsWith, 1, false);
22152217
SimpleInstallFunction(isolate_, prototype, "toString",
22162218
Builtin::kStringPrototypeToString, 0, true);
2219+
SimpleInstallFunction(isolate(), prototype, "toWellFormed",
2220+
Builtin::kStringPrototypeToWellFormed, 0, false);
22172221
SimpleInstallFunction(isolate_, prototype, "trim",
22182222
Builtin::kStringPrototypeTrim, 0, false);
22192223

@@ -5068,18 +5072,6 @@ void Genesis::InitializeGlobal_harmony_rab_gsab() {
50685072
Builtin::kSharedArrayBufferPrototypeGrow, 1, true);
50695073
}
50705074

5071-
void Genesis::InitializeGlobal_harmony_string_is_well_formed() {
5072-
if (!v8_flags.harmony_string_is_well_formed) return;
5073-
Handle<JSFunction> string_function(native_context()->string_function(),
5074-
isolate());
5075-
Handle<JSObject> string_prototype(
5076-
JSObject::cast(string_function->initial_map()->prototype()), isolate());
5077-
SimpleInstallFunction(isolate(), string_prototype, "isWellFormed",
5078-
Builtin::kStringPrototypeIsWellFormed, 0, false);
5079-
SimpleInstallFunction(isolate(), string_prototype, "toWellFormed",
5080-
Builtin::kStringPrototypeToWellFormed, 0, false);
5081-
}
5082-
50835075
void Genesis::InitializeGlobal_harmony_temporal() {
50845076
if (!v8_flags.harmony_temporal) return;
50855077
// -- T e m p o r a l

0 commit comments

Comments
 (0)