Backed out changeset 7f63be4e0e59 (bug 1952249) for causing build bustages @ ErrorObject.cpp CLOSED TREE
This commit is contained in:
@@ -12956,9 +12956,6 @@ bool SetGlobalOptionsPreJSInit(const OptionParser& op) {
|
|||||||
if (op.getBoolOption("enable-atomics-pause")) {
|
if (op.getBoolOption("enable-atomics-pause")) {
|
||||||
JS::Prefs::setAtStartup_experimental_atomics_pause(true);
|
JS::Prefs::setAtStartup_experimental_atomics_pause(true);
|
||||||
}
|
}
|
||||||
if (op.getBoolOption("enable-error-iserror")) {
|
|
||||||
JS::Prefs::set_experimental_error_iserror(true);
|
|
||||||
}
|
|
||||||
#ifdef NIGHTLY_BUILD
|
#ifdef NIGHTLY_BUILD
|
||||||
if (op.getBoolOption("enable-async-iterator-helpers")) {
|
if (op.getBoolOption("enable-async-iterator-helpers")) {
|
||||||
JS::Prefs::setAtStartup_experimental_async_iterator_helpers(true);
|
JS::Prefs::setAtStartup_experimental_async_iterator_helpers(true);
|
||||||
@@ -12966,6 +12963,9 @@ bool SetGlobalOptionsPreJSInit(const OptionParser& op) {
|
|||||||
if (op.getBoolOption("enable-symbols-as-weakmap-keys")) {
|
if (op.getBoolOption("enable-symbols-as-weakmap-keys")) {
|
||||||
JS::Prefs::setAtStartup_experimental_symbols_as_weakmap_keys(true);
|
JS::Prefs::setAtStartup_experimental_symbols_as_weakmap_keys(true);
|
||||||
}
|
}
|
||||||
|
if (op.getBoolOption("enable-error-iserror")) {
|
||||||
|
JS::Prefs::set_experimental_error_iserror(true);
|
||||||
|
}
|
||||||
if (op.getBoolOption("enable-iterator-sequencing")) {
|
if (op.getBoolOption("enable-iterator-sequencing")) {
|
||||||
JS::Prefs::setAtStartup_experimental_iterator_sequencing(true);
|
JS::Prefs::setAtStartup_experimental_iterator_sequencing(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -979,6 +979,8 @@ static bool exn_toSource(JSContext* cx, unsigned argc, Value* vp) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NIGHTLY_BUILD
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error.isError Proposal
|
* Error.isError Proposal
|
||||||
* Error.isError ( arg )
|
* Error.isError ( arg )
|
||||||
@@ -1026,6 +1028,7 @@ static bool exn_isError(JSContext* cx, unsigned argc, Value* vp) {
|
|||||||
args.rval().setBoolean(false);
|
args.rval().setBoolean(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// The below is the "documentation" from https://v8.dev/docs/stack-trace-api
|
// The below is the "documentation" from https://v8.dev/docs/stack-trace-api
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -2259,10 +2259,6 @@ JS_PUBLIC_API bool js::ShouldIgnorePropertyDefinition(JSContext* cx,
|
|||||||
id == NameToId(cx->names().try_)) {
|
id == NameToId(cx->names().try_)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!JS::Prefs::experimental_error_iserror() &&
|
|
||||||
id == NameToId(cx->names().isError)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JS_HAS_TEMPORAL_API
|
#ifdef JS_HAS_TEMPORAL_API
|
||||||
@@ -2277,6 +2273,10 @@ JS_PUBLIC_API bool js::ShouldIgnorePropertyDefinition(JSContext* cx,
|
|||||||
// to realize is that this is a -constructor function-, not a function
|
// to realize is that this is a -constructor function-, not a function
|
||||||
// on the prototype; and the proto of the constructor is JSProto_Function.
|
// on the prototype; and the proto of the constructor is JSProto_Function.
|
||||||
if (key == JSProto_Function) {
|
if (key == JSProto_Function) {
|
||||||
|
if (!JS::Prefs::experimental_error_iserror() &&
|
||||||
|
id == NameToId(cx->names().isError)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!JS::Prefs::experimental_iterator_range() &&
|
if (!JS::Prefs::experimental_iterator_range() &&
|
||||||
(id == NameToId(cx->names().range))) {
|
(id == NameToId(cx->names().range))) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -8512,18 +8512,11 @@
|
|||||||
set_spidermonkey_pref: startup
|
set_spidermonkey_pref: startup
|
||||||
|
|
||||||
# Experimental support for Atomics.pause in JavaScript.
|
# Experimental support for Atomics.pause in JavaScript.
|
||||||
- name: javascript.options.experimental.atomics_pause
|
- name: javascript.options.experimental.atomics_pause
|
||||||
type: bool
|
type: bool
|
||||||
value: true
|
value: true
|
||||||
mirror: always
|
mirror: always
|
||||||
set_spidermonkey_pref: startup
|
set_spidermonkey_pref: startup
|
||||||
|
|
||||||
# Experimental support for Error.isError in JavaScript.
|
|
||||||
- name: javascript.options.experimental.error_iserror
|
|
||||||
type: bool
|
|
||||||
value: true
|
|
||||||
mirror: always
|
|
||||||
set_spidermonkey_pref: always
|
|
||||||
|
|
||||||
#ifdef NIGHTLY_BUILD
|
#ifdef NIGHTLY_BUILD
|
||||||
# Experimental support for Async Iterator Helpers in JavaScript.
|
# Experimental support for Async Iterator Helpers in JavaScript.
|
||||||
@@ -8540,6 +8533,13 @@
|
|||||||
mirror: always
|
mirror: always
|
||||||
set_spidermonkey_pref: startup
|
set_spidermonkey_pref: startup
|
||||||
|
|
||||||
|
# Experimental support for Error.isError in JavaScript.
|
||||||
|
- name: javascript.options.experimental.error_iserror
|
||||||
|
type: bool
|
||||||
|
value: false
|
||||||
|
mirror: always
|
||||||
|
set_spidermonkey_pref: always
|
||||||
|
|
||||||
# Experimental support for Iterator.range in JavaScript.
|
# Experimental support for Iterator.range in JavaScript.
|
||||||
- name: javascript.options.experimental.iterator_range
|
- name: javascript.options.experimental.iterator_range
|
||||||
type: bool
|
type: bool
|
||||||
|
|||||||
Reference in New Issue
Block a user