Backed out changeset c46147974f79 (bug 1940342) for causing btime failures CLOSED TREE
This commit is contained in:
@@ -77,7 +77,9 @@ enum JSExnType {
|
||||
JSEXN_EVALERR,
|
||||
JSEXN_RANGEERR,
|
||||
JSEXN_REFERENCEERR,
|
||||
#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT
|
||||
JSEXN_SUPPRESSEDERR,
|
||||
#endif
|
||||
JSEXN_SYNTAXERR,
|
||||
JSEXN_TYPEERR,
|
||||
JSEXN_URIERR,
|
||||
|
||||
@@ -59,135 +59,118 @@
|
||||
# define IF_WASM_JSPI(REAL, IMAGINARY) IMAGINARY
|
||||
#endif
|
||||
|
||||
// IF_EXPLICIT_RESOURCE_MANAGEMENT is already used elsewhere.
|
||||
#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT
|
||||
# define IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY) REAL
|
||||
#else
|
||||
# define IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY) IMAGINARY
|
||||
#endif
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
# define IF_NIGHTLY(REAL, IMAGINARY) REAL
|
||||
#else
|
||||
# define IF_NIGHTLY(REAL, IMAGINARY) IMAGINARY
|
||||
#endif
|
||||
|
||||
#define JS_FOR_PROTOTYPES_( \
|
||||
REAL, IMAGINARY, REAL_IF_INTL, REAL_IF_TEMPORAL, REAL_IF_WASM_TYPE, \
|
||||
REAL_IF_WASM_JSPI, REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT, REAL_IF_NIGHTLY) \
|
||||
IMAGINARY(Null, dummy) \
|
||||
REAL(Object, OCLASP(Plain)) \
|
||||
REAL(Function, &FunctionClass) \
|
||||
IMAGINARY(BoundFunction, OCLASP(BoundFunction)) \
|
||||
REAL(Array, OCLASP(Array)) \
|
||||
REAL(Boolean, OCLASP(Boolean)) \
|
||||
REAL(JSON, CLASP(JSON)) \
|
||||
REAL(Date, OCLASP(Date)) \
|
||||
REAL(Math, CLASP(Math)) \
|
||||
REAL(Number, OCLASP(Number)) \
|
||||
REAL(String, OCLASP(String)) \
|
||||
REAL(RegExp, OCLASP(RegExp)) \
|
||||
REAL(Error, ERROR_CLASP(JSEXN_ERR)) \
|
||||
REAL(InternalError, ERROR_CLASP(JSEXN_INTERNALERR)) \
|
||||
REAL(AggregateError, ERROR_CLASP(JSEXN_AGGREGATEERR)) \
|
||||
REAL(EvalError, ERROR_CLASP(JSEXN_EVALERR)) \
|
||||
REAL(RangeError, ERROR_CLASP(JSEXN_RANGEERR)) \
|
||||
REAL(ReferenceError, ERROR_CLASP(JSEXN_REFERENCEERR)) \
|
||||
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(SuppressedError, \
|
||||
ERROR_CLASP(JSEXN_SUPPRESSEDERR)) \
|
||||
REAL(SyntaxError, ERROR_CLASP(JSEXN_SYNTAXERR)) \
|
||||
REAL(TypeError, ERROR_CLASP(JSEXN_TYPEERR)) \
|
||||
REAL(URIError, ERROR_CLASP(JSEXN_URIERR)) \
|
||||
REAL(DebuggeeWouldRun, ERROR_CLASP(JSEXN_DEBUGGEEWOULDRUN)) \
|
||||
REAL(CompileError, ERROR_CLASP(JSEXN_WASMCOMPILEERROR)) \
|
||||
REAL(LinkError, ERROR_CLASP(JSEXN_WASMLINKERROR)) \
|
||||
REAL(RuntimeError, ERROR_CLASP(JSEXN_WASMRUNTIMEERROR)) \
|
||||
REAL_IF_WASM_JSPI(SuspendError, ERROR_CLASP(JSEXN_WASMSUSPENDERROR)) \
|
||||
REAL(ArrayBuffer, OCLASP(FixedLengthArrayBuffer)) \
|
||||
REAL(Int8Array, TYPED_ARRAY_CLASP(Int8)) \
|
||||
REAL(Uint8Array, TYPED_ARRAY_CLASP(Uint8)) \
|
||||
REAL(Int16Array, TYPED_ARRAY_CLASP(Int16)) \
|
||||
REAL(Uint16Array, TYPED_ARRAY_CLASP(Uint16)) \
|
||||
REAL(Int32Array, TYPED_ARRAY_CLASP(Int32)) \
|
||||
REAL(Uint32Array, TYPED_ARRAY_CLASP(Uint32)) \
|
||||
REAL(Float32Array, TYPED_ARRAY_CLASP(Float32)) \
|
||||
REAL(Float64Array, TYPED_ARRAY_CLASP(Float64)) \
|
||||
REAL(Uint8ClampedArray, TYPED_ARRAY_CLASP(Uint8Clamped)) \
|
||||
REAL(BigInt64Array, TYPED_ARRAY_CLASP(BigInt64)) \
|
||||
REAL(BigUint64Array, TYPED_ARRAY_CLASP(BigUint64)) \
|
||||
REAL(Float16Array, TYPED_ARRAY_CLASP(Float16)) \
|
||||
REAL(BigInt, OCLASP(BigInt)) \
|
||||
REAL(Proxy, CLASP(Proxy)) \
|
||||
REAL(WeakMap, OCLASP(WeakMap)) \
|
||||
REAL(Map, OCLASP(Map)) \
|
||||
REAL(Set, OCLASP(Set)) \
|
||||
REAL(DataView, OCLASP(FixedLengthDataView)) \
|
||||
REAL(Symbol, OCLASP(Symbol)) \
|
||||
REAL(ShadowRealm, OCLASP(ShadowRealm)) \
|
||||
REAL(SharedArrayBuffer, OCLASP(FixedLengthSharedArrayBuffer)) \
|
||||
REAL_IF_INTL(Intl, CLASP(Intl)) \
|
||||
REAL_IF_INTL(Collator, OCLASP(Collator)) \
|
||||
REAL_IF_INTL(DateTimeFormat, OCLASP(DateTimeFormat)) \
|
||||
REAL_IF_INTL(DisplayNames, OCLASP(DisplayNames)) \
|
||||
REAL_IF_INTL(DurationFormat, OCLASP(DurationFormat)) \
|
||||
REAL_IF_INTL(ListFormat, OCLASP(ListFormat)) \
|
||||
REAL_IF_INTL(Locale, OCLASP(Locale)) \
|
||||
REAL_IF_INTL(NumberFormat, OCLASP(NumberFormat)) \
|
||||
REAL_IF_INTL(PluralRules, OCLASP(PluralRules)) \
|
||||
REAL_IF_INTL(RelativeTimeFormat, OCLASP(RelativeTimeFormat)) \
|
||||
REAL_IF_INTL(Segmenter, OCLASP(Segmenter)) \
|
||||
REAL(Reflect, CLASP(Reflect)) \
|
||||
REAL(WeakSet, OCLASP(WeakSet)) \
|
||||
REAL(TypedArray, &js::TypedArrayObject::sharedTypedArrayPrototypeClass) \
|
||||
REAL(Atomics, OCLASP(Atomics)) \
|
||||
REAL(SavedFrame, &js::SavedFrame::class_) \
|
||||
REAL(Promise, OCLASP(Promise)) \
|
||||
REAL(AsyncFunction, CLASP(AsyncFunction)) \
|
||||
REAL(GeneratorFunction, CLASP(GeneratorFunction)) \
|
||||
REAL(AsyncGeneratorFunction, CLASP(AsyncGeneratorFunction)) \
|
||||
REAL(WebAssembly, OCLASP(WasmNamespace)) \
|
||||
REAL(WasmModule, OCLASP(WasmModule)) \
|
||||
REAL(WasmInstance, OCLASP(WasmInstance)) \
|
||||
REAL(WasmMemory, OCLASP(WasmMemory)) \
|
||||
REAL(WasmTable, OCLASP(WasmTable)) \
|
||||
REAL(WasmGlobal, OCLASP(WasmGlobal)) \
|
||||
REAL(WasmTag, OCLASP(WasmTag)) \
|
||||
REAL_IF_WASM_TYPE(WasmFunction, CLASP(WasmFunction)) \
|
||||
REAL_IF_WASM_JSPI(WasmSuspending, OCLASP(WasmSuspending)) \
|
||||
REAL(WasmException, OCLASP(WasmException)) \
|
||||
REAL(FinalizationRegistry, OCLASP(FinalizationRegistry)) \
|
||||
REAL(WeakRef, OCLASP(WeakRef)) \
|
||||
REAL(Iterator, OCLASP(Iterator)) \
|
||||
REAL(AsyncIterator, OCLASP(AsyncIterator)) \
|
||||
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(DisposableStack, \
|
||||
OCLASP(DisposableStack)) \
|
||||
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(AsyncDisposableStack, \
|
||||
OCLASP(AsyncDisposableStack)) \
|
||||
REAL_IF_TEMPORAL(Temporal, OCLASP(temporal::Temporal)) \
|
||||
REAL_IF_TEMPORAL(Duration, OCLASP(temporal::Duration)) \
|
||||
REAL_IF_TEMPORAL(Instant, OCLASP(temporal::Instant)) \
|
||||
REAL_IF_TEMPORAL(PlainDate, OCLASP(temporal::PlainDate)) \
|
||||
REAL_IF_TEMPORAL(PlainDateTime, OCLASP(temporal::PlainDateTime)) \
|
||||
REAL_IF_TEMPORAL(PlainMonthDay, OCLASP(temporal::PlainMonthDay)) \
|
||||
REAL_IF_TEMPORAL(PlainYearMonth, OCLASP(temporal::PlainYearMonth)) \
|
||||
REAL_IF_TEMPORAL(PlainTime, OCLASP(temporal::PlainTime)) \
|
||||
REAL_IF_TEMPORAL(TemporalNow, OCLASP(temporal::TemporalNow)) \
|
||||
#define JS_FOR_PROTOTYPES_(REAL, IMAGINARY, REAL_IF_INTL, REAL_IF_TEMPORAL, \
|
||||
REAL_IF_WASM_TYPE, REAL_IF_WASM_JSPI, \
|
||||
REAL_IF_NIGHTLY) \
|
||||
IMAGINARY(Null, dummy) \
|
||||
REAL(Object, OCLASP(Plain)) \
|
||||
REAL(Function, &FunctionClass) \
|
||||
IMAGINARY(BoundFunction, OCLASP(BoundFunction)) \
|
||||
REAL(Array, OCLASP(Array)) \
|
||||
REAL(Boolean, OCLASP(Boolean)) \
|
||||
REAL(JSON, CLASP(JSON)) \
|
||||
REAL(Date, OCLASP(Date)) \
|
||||
REAL(Math, CLASP(Math)) \
|
||||
REAL(Number, OCLASP(Number)) \
|
||||
REAL(String, OCLASP(String)) \
|
||||
REAL(RegExp, OCLASP(RegExp)) \
|
||||
REAL(Error, ERROR_CLASP(JSEXN_ERR)) \
|
||||
REAL(InternalError, ERROR_CLASP(JSEXN_INTERNALERR)) \
|
||||
REAL(AggregateError, ERROR_CLASP(JSEXN_AGGREGATEERR)) \
|
||||
REAL(EvalError, ERROR_CLASP(JSEXN_EVALERR)) \
|
||||
REAL(RangeError, ERROR_CLASP(JSEXN_RANGEERR)) \
|
||||
REAL(ReferenceError, ERROR_CLASP(JSEXN_REFERENCEERR)) \
|
||||
IF_EXPLICIT_RESOURCE_MANAGEMENT( \
|
||||
REAL(SuppressedError, ERROR_CLASP(JSEXN_SUPPRESSEDERR))) \
|
||||
REAL(SyntaxError, ERROR_CLASP(JSEXN_SYNTAXERR)) \
|
||||
REAL(TypeError, ERROR_CLASP(JSEXN_TYPEERR)) \
|
||||
REAL(URIError, ERROR_CLASP(JSEXN_URIERR)) \
|
||||
REAL(DebuggeeWouldRun, ERROR_CLASP(JSEXN_DEBUGGEEWOULDRUN)) \
|
||||
REAL(CompileError, ERROR_CLASP(JSEXN_WASMCOMPILEERROR)) \
|
||||
REAL(LinkError, ERROR_CLASP(JSEXN_WASMLINKERROR)) \
|
||||
REAL(RuntimeError, ERROR_CLASP(JSEXN_WASMRUNTIMEERROR)) \
|
||||
REAL_IF_WASM_JSPI(SuspendError, ERROR_CLASP(JSEXN_WASMSUSPENDERROR)) \
|
||||
REAL(ArrayBuffer, OCLASP(FixedLengthArrayBuffer)) \
|
||||
REAL(Int8Array, TYPED_ARRAY_CLASP(Int8)) \
|
||||
REAL(Uint8Array, TYPED_ARRAY_CLASP(Uint8)) \
|
||||
REAL(Int16Array, TYPED_ARRAY_CLASP(Int16)) \
|
||||
REAL(Uint16Array, TYPED_ARRAY_CLASP(Uint16)) \
|
||||
REAL(Int32Array, TYPED_ARRAY_CLASP(Int32)) \
|
||||
REAL(Uint32Array, TYPED_ARRAY_CLASP(Uint32)) \
|
||||
REAL(Float32Array, TYPED_ARRAY_CLASP(Float32)) \
|
||||
REAL(Float64Array, TYPED_ARRAY_CLASP(Float64)) \
|
||||
REAL(Uint8ClampedArray, TYPED_ARRAY_CLASP(Uint8Clamped)) \
|
||||
REAL(BigInt64Array, TYPED_ARRAY_CLASP(BigInt64)) \
|
||||
REAL(BigUint64Array, TYPED_ARRAY_CLASP(BigUint64)) \
|
||||
REAL(Float16Array, TYPED_ARRAY_CLASP(Float16)) \
|
||||
REAL(BigInt, OCLASP(BigInt)) \
|
||||
REAL(Proxy, CLASP(Proxy)) \
|
||||
REAL(WeakMap, OCLASP(WeakMap)) \
|
||||
REAL(Map, OCLASP(Map)) \
|
||||
REAL(Set, OCLASP(Set)) \
|
||||
REAL(DataView, OCLASP(FixedLengthDataView)) \
|
||||
REAL(Symbol, OCLASP(Symbol)) \
|
||||
REAL(ShadowRealm, OCLASP(ShadowRealm)) \
|
||||
REAL(SharedArrayBuffer, OCLASP(FixedLengthSharedArrayBuffer)) \
|
||||
REAL_IF_INTL(Intl, CLASP(Intl)) \
|
||||
REAL_IF_INTL(Collator, OCLASP(Collator)) \
|
||||
REAL_IF_INTL(DateTimeFormat, OCLASP(DateTimeFormat)) \
|
||||
REAL_IF_INTL(DisplayNames, OCLASP(DisplayNames)) \
|
||||
REAL_IF_INTL(DurationFormat, OCLASP(DurationFormat)) \
|
||||
REAL_IF_INTL(ListFormat, OCLASP(ListFormat)) \
|
||||
REAL_IF_INTL(Locale, OCLASP(Locale)) \
|
||||
REAL_IF_INTL(NumberFormat, OCLASP(NumberFormat)) \
|
||||
REAL_IF_INTL(PluralRules, OCLASP(PluralRules)) \
|
||||
REAL_IF_INTL(RelativeTimeFormat, OCLASP(RelativeTimeFormat)) \
|
||||
REAL_IF_INTL(Segmenter, OCLASP(Segmenter)) \
|
||||
REAL(Reflect, CLASP(Reflect)) \
|
||||
REAL(WeakSet, OCLASP(WeakSet)) \
|
||||
REAL(TypedArray, &js::TypedArrayObject::sharedTypedArrayPrototypeClass) \
|
||||
REAL(Atomics, OCLASP(Atomics)) \
|
||||
REAL(SavedFrame, &js::SavedFrame::class_) \
|
||||
REAL(Promise, OCLASP(Promise)) \
|
||||
REAL(AsyncFunction, CLASP(AsyncFunction)) \
|
||||
REAL(GeneratorFunction, CLASP(GeneratorFunction)) \
|
||||
REAL(AsyncGeneratorFunction, CLASP(AsyncGeneratorFunction)) \
|
||||
REAL(WebAssembly, OCLASP(WasmNamespace)) \
|
||||
REAL(WasmModule, OCLASP(WasmModule)) \
|
||||
REAL(WasmInstance, OCLASP(WasmInstance)) \
|
||||
REAL(WasmMemory, OCLASP(WasmMemory)) \
|
||||
REAL(WasmTable, OCLASP(WasmTable)) \
|
||||
REAL(WasmGlobal, OCLASP(WasmGlobal)) \
|
||||
REAL(WasmTag, OCLASP(WasmTag)) \
|
||||
REAL_IF_WASM_TYPE(WasmFunction, CLASP(WasmFunction)) \
|
||||
REAL_IF_WASM_JSPI(WasmSuspending, OCLASP(WasmSuspending)) \
|
||||
REAL(WasmException, OCLASP(WasmException)) \
|
||||
REAL(FinalizationRegistry, OCLASP(FinalizationRegistry)) \
|
||||
REAL(WeakRef, OCLASP(WeakRef)) \
|
||||
REAL(Iterator, OCLASP(Iterator)) \
|
||||
REAL(AsyncIterator, OCLASP(AsyncIterator)) \
|
||||
IF_EXPLICIT_RESOURCE_MANAGEMENT( \
|
||||
REAL(DisposableStack, OCLASP(DisposableStack))) \
|
||||
IF_EXPLICIT_RESOURCE_MANAGEMENT( \
|
||||
REAL(AsyncDisposableStack, OCLASP(AsyncDisposableStack))) \
|
||||
REAL_IF_TEMPORAL(Temporal, OCLASP(temporal::Temporal)) \
|
||||
REAL_IF_TEMPORAL(Duration, OCLASP(temporal::Duration)) \
|
||||
REAL_IF_TEMPORAL(Instant, OCLASP(temporal::Instant)) \
|
||||
REAL_IF_TEMPORAL(PlainDate, OCLASP(temporal::PlainDate)) \
|
||||
REAL_IF_TEMPORAL(PlainDateTime, OCLASP(temporal::PlainDateTime)) \
|
||||
REAL_IF_TEMPORAL(PlainMonthDay, OCLASP(temporal::PlainMonthDay)) \
|
||||
REAL_IF_TEMPORAL(PlainYearMonth, OCLASP(temporal::PlainYearMonth)) \
|
||||
REAL_IF_TEMPORAL(PlainTime, OCLASP(temporal::PlainTime)) \
|
||||
REAL_IF_TEMPORAL(TemporalNow, OCLASP(temporal::TemporalNow)) \
|
||||
REAL_IF_TEMPORAL(ZonedDateTime, OCLASP(temporal::ZonedDateTime))
|
||||
// DO NOT ADD CONDITIONAL ENTRIES TO THIS LIST! (As in, do not add entries that
|
||||
// are only present in some configurations.) It will break binary compatibility.
|
||||
// Instead, create an IF_<feature> macro and add it to the parameter list below
|
||||
// and add a corresponding parameter to JS_FOR_PROTOTYPES_ above.
|
||||
//
|
||||
// Note that entries may be freely added to or removed from this list, even in
|
||||
// the middle. The only invariant that must be upheld is that the offsets in the
|
||||
// list do not change depending on configuration settings of the same version of
|
||||
// the source.
|
||||
|
||||
#define JS_FOR_PROTOTYPES(REAL, IMAGINARY) \
|
||||
JS_FOR_PROTOTYPES_( \
|
||||
REAL, IMAGINARY, IF_INTL(REAL, IMAGINARY), IF_TEMPORAL(REAL, IMAGINARY), \
|
||||
IF_WASM_TYPE(REAL, IMAGINARY), IF_WASM_JSPI(REAL, IMAGINARY), \
|
||||
IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY), \
|
||||
IF_NIGHTLY(REAL, IMAGINARY))
|
||||
|
||||
#define JS_FOR_EACH_PROTOTYPE(MACRO) JS_FOR_PROTOTYPES(MACRO, MACRO)
|
||||
|
||||
@@ -48,8 +48,13 @@ namespace xpc {
|
||||
|
||||
#define Between(x, a, b) (a <= x && x <= b)
|
||||
|
||||
#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT
|
||||
static_assert(JSProto_URIError - JSProto_Error == 9,
|
||||
"New prototype added in error object range");
|
||||
#else
|
||||
static_assert(JSProto_URIError - JSProto_Error == 8,
|
||||
"New prototype added in error object range");
|
||||
#endif
|
||||
#define AssertErrorObjectKeyInBounds(key) \
|
||||
static_assert(Between(key, JSProto_Error, JSProto_URIError), \
|
||||
"We depend on js/ProtoKey.h ordering here");
|
||||
|
||||
Reference in New Issue
Block a user