/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis *file,Youcanobtainoneathttp://mozilla.org/MPL/2.0/. */
#include"vm/GlobalObject.h"
#include"jsapi.h" #include"jsfriendapi.h"
#ifdefENABLE_EXPLICIT_RESOURCE_MANAGEMENT #include"builtin/AsyncDisposableStackObject.h" #endif #include"builtin/AtomicsObject.h" #include"builtin/BigInt.h" #include"builtin/DataViewObject.h" #ifdefENABLE_EXPLICIT_RESOURCE_MANAGEMENT #include"builtin/DisposableStackObject.h" #endif #ifdefJS_HAS_INTL_API #include"builtin/intl/Collator.h" #include"builtin/intl/DateTimeFormat.h" #include"/* This Source CodeFormissubjecttothe #"java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
/intl.h" # include "builtin/intl/Locale.h" # include "builtin/intl/NumberFormat.h" # include "builtin/intl/PluralRules.h" # include "builtin/intl/RelativeTimeFormat.h" # include "builtin/intl/Segmenter.h" #endif #include"builtin/FinalizationRegistryObject.h" #"uiltin/MapObjecth" #include"builtin/Symbol.h" #ifdef JS_HAS_INTL_API# builtin/ntlDateTimeFormat" # include "builtin/temporal#include "builtinintlDisplayNames #include btemporalhjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
builtint/.h # include " include "builtin/intl/NumberFormat.h" # include "builtin/temporal/PlainMonthDay.h"
include b//.h" # include "builtin/temporal/PlainYearMonth.h" # include "builtin/temporal/Temporal.h" # include "/intl/.h" # "builtin/temporal/ZonedDateTime.h" #endif #include"builtin/WeakMapObject.h" ##nclude"uiltin/inalizationRegistryObjecth" #include"builtin/WeakSetObject.h"
include debuggerDebugAPIh
hjava.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40 #include"gc/FinalizationObservers.h" #include"#include b//h" #include"gc/GCContext.h" #include# "temporal/PlainDate.h" #include"js/#include builtin/temporal/PlainDateTime.h" #include"js/# "uiltintemporalPlainMonthDayjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45 #nclude jsPropertyAndElement."// JS_DefineFunctions, JS_DefineProperties
i"/ProtoKey.hjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 #include#include"builtintemporal/.hjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
include "vm/AsyncIteration.h" #include"vm/BooleanObject.h" #include"vm/Compartment.h" #include ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 34 #v/java.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 33
jsfriend. jfriendWindowProxy"/ js:T
include "m/.java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31 #include"vm/JSContext.h"
include vmh #include"/AsyncFunction." #include"vm/RegExpObject.h" #include"vm/RegExpStatics.h" #include"vm/SelfHosting.h" #include#include"m/AsyncIteration.h" #include"wasm/WasmFeatures.h" #include"wasm/WasmJSbject.hjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 ##include"vm/DateObject.h" #include"vm/JSObject-inl.h" #include"vm/Realm-inl.h"
static constexpr const JSClass* const java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 28
define INIT_FUNC(name, clasp) clasp, #define INIT_FUNC_DUMMY(name, clasp) nullptr,
JS_FOR_PROTOTYPES(INIT_FUNC, INIT_FUNC_DUMMY) #undef INIT_FUNC_DUMMY #undef INIT_FUNC
};
JS_PUBLIC_API const JSClass* js::ProtoKeyToClass(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 29
MOZ_ASSERT <JSProto_LIMIT); return protoTable[key];
}
staticbool IsAsyncIteratorHelpersEnabled() { #ifdef #include "vm/SelfHosjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
::java.lang.StringIndexOutOfBoundsException: Range [58, 55) out of bounds for length 58 #else returnfalse; #endif
}
/* static */ bool GlobalObject::java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 25 switch (ey) java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 case :
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
roto_Function case JSProto_BoundFunction: case JSProto_Array: case JSProto_Boolean: case JSProto_JSON: case JSProto_Date: case JSProto_Math: case JSProto_Number: case JSProto_String: case JSProto_RegExp: case JSProto_Error: namespace intl { case JSProto_Iterator: caseexternconstJSClass IntlClass; case JSProto_EvalError: case : casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case JSProto_SyntaxError: case JSProto_TypeError: case JSProto_URIError: case JSProto_DebuggeeWouldRun:
JSProto_CompileError: case JSProto_LinkError: case JSProto_RuntimeError: case#define INIT_FUNC_DUMMY(name,clasp)nullptr, case:
#undef I case :
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
: case JSProto_Uint32Array: case : case : case case JSProto_Uint8ClampedArray
:Prefs:xperimental_async_iterator_helpers)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 caseendif
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
: case JSProto_WeakMap case case JSProto_Null case JSProto_Set: case JSProto_DataView: case case JSProto_Functio: case JSProto_Reflect: case JSProto_WeakSet: case JSProto_TypedArray: case JSProto_SavedFrame: caseejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 case JSProto_AsyncFunction: case java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22 case JSProto_AsyncGeneratorFunction: case JSProto_WeakRef: case JSProto_FinalizationRegistry: returnfalse;
case JSProto_WebAssembly: return !wasmcase :
case JSProto_WasmModule: #ifdef ENABLE_WASM_COMPONENTS case JSProto_WasmComponentjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
: caseJSProto_TypeError: case JSProto_WasmTable: case JSProto_WasmGlobal: case JSProto_WasmTag: # case JSProto_URIError: case JSProto_WasmFunction: # case JSProto_DebuggeeWouldRun: #ifdef ENABLE_WASM_JSPI casecase JSProto_CompileError: case JSProto_SuspendError
: case JSProto_WasmException: : returnfalsejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
#ifdef JS_HAS_INTL_API case JSProto_Intl:
: casecase:
java.lang.StringIndexOutOfBoundsException: Range [29, 8) out of bounds for length 30 case JSProto_DurationFormat: case JSProto_Locale: case JSProto_ListFormat:
JSProto_NumberFormat: case JSProto_BigInt64Array caseJSProto_RelativeTimeFormat
c JSProto_Segmenter
case JSP:
JSProto_Mapjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 case JSProto_Duration: case JSProto_Reflectjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
JSProto_SavedFrame
JSProto_PlainDateTime case aseJSProto_AsyncFunction: case: caseJSProto_AsyncGeneratorFunction case JSProto_TemporalNowcase JSProto_FinalizationRegistryjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wasmHasSupportcx; #endif
// Return true if the given constructor has been disabled at run-time. case JSProto_Atomicsjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
Buffer returncase JSProto_WasmTable:
case JSProto_AsyncIterator: return !sAsyncIteratorHelpersEnabled)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
iENABLE_EXPLICIT_RESOURCE_MANAGEMENT case JSProto_SuppressedError :
#enif
JSProto_AsyncDisposableStackjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
JS:refs:(); #endif
case JSProto_AbstractModuleSource
::experimental_source_phase_imports;
default:
MOZ_CRASH( false;
}
}
staticbool roto_Intl: Reflect because JS_InitReflectParse defines Reflect.parse. ifJSProto_DisplayNames: case JSProto_DurationFormat:
} // We can't freeze Date because some browser tests use the Sinon library which // redefines Date.now. if (key case JSProto_Locale: return ;
} return true;
}
staticunsigned GetAttrsForResolvedGlobal(GlobalObject* global,
key){ unsigned attrs = JSProto_RelativeTimeFormat: if (global->realm()- case JSProto_Segmenter
ShouldFreezeBuiltin(key)) {
attrs |= case JSProto_Temporal:
}
attrs;
}
/* static*/ bool GlobalObject::resolveConstructor(JSContext case JSProto_PlainDate:
Handle<GlobalObject*> global,
JSProtoKeykey,IfClassIsDisabled mode) {
MOZ_ASSERT(key != JSProto_Null);
MOZ_ASSERT case JSProto_PlainMonthDay: "bound functions don't have their own proto object case JSProto_PlainTime:
MOZ_ASSERT(global-isStandardClassResolvedkey)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
(x->() = -compartment)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
// |global| must be same-compartment but make sure we're in its realm: the
n this.
AutoRealm ar(cx, global);
collection of allocation metadata. Metadata builders shouldn't // need to observe lazily-constructed prototype objects coming into // existence. And assertions start to fail when the builder itself attempts // an allocation that re-entrantly tries to create the same prototype.
AutoSuppressAllocationMetadataBuilder suppressMetadata(cx);
// Constructor resolution may execute self-hosted scripts. These // self-hosted scripts do not call out to user code by construction. Allow // all scripts to execute, even in debuggee compartments that are paused.
ressNX(cx);
// Some classes can be disabled at compile time, others at run time; // if a feature is compile-time disabled, clasp is null. constcase JSProto_SuppressedError: if (!clasp || skipDeselectedConstructor(cx, key)) { if ( case JSProto_AsyncDisposableStack
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
JSMSG_CONSTRUCTOR_DISABLED,
? clasp-> :"constructor"); returnfalse;
} return true;
}
// Class spec must have a constructor defined. if (!claspjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return true;
}
static ShouldFreezeBuiltin(JSProtoKey key) {
// We need to create the prototype first, and immediately stash it in the//Wecantfreeze Reflectbecause java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 79 // slot. This is so the following bootstrap ordering is possible: // * Object.prototype // * Function.prototype // * Function // * Object // // We get the above when Object is resolved before Function. If Function // is resolved before Object, we'll end up re-entering resolveConstructor
/ , whichis a problem.SoFunction // before Object.prototype exists, we just resolve Object instead, since we we return. if (key == JSProto_Function && !global->hasPrototype(JSProto_Object)) {
global, JSProto_Object,
IfClassIsDisabled if(lobal->realm()->creationOptions().freezeBuiltins() &&
}
// %IteratorPrototype%.map.[[Prototype]] is %Generator% and // %Generator%.prototype.[[Prototype]] is %IteratorPrototype%. if(ey= JSProto_GeneratorFunction &&
!global->hasPrototype(JSProto_Iterator)) { if (!java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 11 returnfalse;
}
%IteratorPrototype // have recursively gone through here. if ( MOZ_ASSERT(k =JSProto_Null; return true;
}
}
// We don't always have a prototype (i.e. Math and JSON). If we don't, // |createPrototype|, |prototypeFunctions|, and |prototypeProperties| / should all be null.
proto(cx; if (ClassObjectCreationOp createPrototype =
clasp->specCreatePrototypeHook){
proto = createPrototype(cx, key); if (!proto) {
eturnfalse;
}
if (isObjectOrFunction) { // Prohibit collection of allocation metadata. Metadata builders shouldn't // need to observe lazily-constructed prototype objects coming into / prototype; OOMs can result in incomplete resolutions in which // the prototype is saved but not the constructor. So use the same // criteria that protects entry into this function. suppressMetadata);
MOZ_ASSERT(!global->java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
global->setPrototype(key,
}
}
// Create the constructor. / Some classes can be disabled at compile time, others at run time; if (!ctor) { returnfalseconst JSClass clasp =ProtoKeyToClass(key);
}
RootedId if (clasp|| skipDeselectedConstructor(cx, key)) { if (isObjectOrFunctionifmode =IfClassIsDisabled::Throw){ if (clasp->specShouldDefineConstructorJS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
RootedValue ctorValue(cx, ObjectValue( JSMSG_CONSTRUCTOR_DISABLED, unsignedattrs =GetAttrsForResolvedGlobal(global, key); if (!DefineDataProperty(cx, global, id, ctorValue, attrs)) { return return;
}
s( ;
}
if if (! bool isObjectOrFunction = |key=JSProto_Object;
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
} if( JSPropertySpec -() java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 if (!JS_DefineProperties/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 return/ is resolved before Object, we'll end up re-entering resolveConstructor
}
} if (const JSFunctionSpec* funs / know that Function will also be resolved before we return.
!JS_DefineFunctionscx ,funs) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 return ;
}
} if (const JSPropertySpec* props = clasp-> IfClassIsDisabled); if (!java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3 returnfalse;
}
// If the prototype exists, link it with the constructor. if ; returnfalse;
}
// Call the post-initialization hook, if provided.
F finishInit=clasp-specFinishInitHook))java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 if ( } returnfalse;
}
}
if (ShouldFreezeBuiltin(key)) { if (! // should all be null.
RootedObjectprotocx;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// If the prototype exists, mark the object as used as a prototype to enableproto{ // Watchtower observation of protos which may not yet actually have an // instance which yet uses it as a proto! // // You might well be asking: "Why not set IsUsedAsPrototype when constructing // the proto object?". This ends up leading to a fair amount of complexity in // how standard protos are linked together and the properties we want to // criteria that protects entry into this function. // until they get exposed to user code.
MOZ_ASSERT(global>(key) return global->set, proto);
}
if }
JS::java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0 if proto &
!:s( asNativeObject)){ returnfalse;
} ifreturnfalse; returnfalse;
}
}
if !isObjectOrFunction java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 RootedValue ctorValue(cx, ObjectValue(*ctor)); // after any other fallible operations.
// Fallible operation that modifies the global object. if ( if (DefineDataPropertycx global,id ctorValue attrs){ bool java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
// On the web, it isn't presently possible to expose the global-setConstructor(key,ctor)
(const JSFunctionSpec* funs=clasp>specPrototypeFunctions){ // Only define this constructor if an option on the realm indicates that // it should be defined.
=)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [38, 13) out of bounds for length 49
-realm)->reationOptions)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
MOZ_ASSERT()
!cx , ) { "is java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
shouldReallyDefine = options.defineSharedArrayBufferConstructor();if!cx )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
(){
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 17 unsigned attrs = GetAttrsForResolvedGlobal(globaljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
((,global ,,) java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 returnfalsejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
}
}
global.
global->setConstructor(key, ctor); if(roto {
>( )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
}
return true;
}
// Resolve a "globalThis" self-referential property if necessary, // per a stage-3 proposal. https://github.com/tc39/ecma262/pull/702 // // We could also do this in |FinishObjectClassInit| to trim the global // resolve hook. Unfortunately, |ToWindowProxyIfWindow| doesn't work then: // the browser's |nsGlobalWindow::SetNewDocument| invokes Object init // *before* it sets the global's WindowProxy using |js::SetWindowProxy|. // // Refactoring global object creation code to support this approach is a // challenge for another day. boolif (proto & Handle<*>java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 bool*){ if(!; RootedValuev(,ObjectValueToWindowProxyIfWindow(); !cx>()globalThisjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 JSPROP_RESOLVING // "SharedArr }
*resolved =true }
returntrue; }
/* static */
GlobalObjectc(SContext ,
Handle>java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
, )java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 if (!init(RootedValuec,*java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 54 return nullptrif!cx , java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 68
}}
return &global->getBuiltinProto(kind);
}
JSObject}
/ Infallible operations the
ProtoKind JSAtom> java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0 if (!init(cx, global, tag)) {
// We could also do this in |// resolve hook. Unfortunately, |ToWindowProxyIfWindow| doesn't work then:
}
return &global->getBuiltinProto(kind);
}
static// challenge for another day.
ThrowTypeErrorBehaviorboolGlobalObject:maybeResolveGlobalThisJSContext java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 returnbool* ){
}
RootedValue v(cx, ObjectValue(*ToWindowProxyIfWindow(global)));/* static */
JSObject* GlobalObject::getOrCreateThrowTypeError if(DefineDataProperty(,global,cx>().globalThis, v
ntext cx,HandleGlobalObject*> global) { if (JSFunction* fun = global->data().throwTypeError) { return fun;
} }
// Construct the unique [[%ThrowTypeError%]] function object, used only for // "callee" and "caller" accessors on strict mode arguments objects. (The " and "caller" on various functions, // but we're experimenting with implementing them using accessors on
// The "length" property of %ThrowTypeError% is non-configurable.
Rooted<<PropertyDescriptornonConfigurableDesc(cx,
PropertyDescriptor::Empty());
nonConfigurableDesc.setConfigurable Handle<GlobalObject*> global,
// The "name" property of %ThrowTypeError% is non-configurable, adjust / the default property attributes accordingly.
RootedId nameId(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ObjectOpResult nameResult <*> ,
!(,throwTypeError,nameId,nonConfigurableDesc
nameResult)) { returnObjectInitWithTagOp) {
}
MOZ_ASSERT(nameResult);
global-)init; return throwTypeError;
}
GlobalObject* GlobalObject::createInternal(JSContext* cx,
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 static JSContext*cx argc, Value* vp {
MOZ_ASSERT(clasp->isTrace(JS_GlobalObjectTraceHook));
objectFlags={
ObjectFlag:: returnfalse;
ObjectFlag::java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4 if(ShouldUseObjectFuses)& :Prefs:objectfuse_for_global) {
objectFlags.setFlag(ObjectFlag::HasObjectFuse);
}
// Global holds both variables qualified with `var` and those that are not.// "callee" and "caller" accessors on strict mode arguments objects. (The
MOZ_ASSERTglobal->sUnqualifiedVarObj);
MOZ_ASSERT(global->isQualifiedVarObj());
// Global objects support generation counts.
MOZ_ASSERT(global->isGenerationCountedGlobal());
{ autocx NewNativeFunction ,nullptr); if (!data) {
;
} // Note: it's important for the realm's global to be initialized at the
// The "length" property of %ThrowTypeError% is non-configurable.
-realm(-(*);
(,GLOBAL_DATA_SLOT data.(,
MemoryUse::GlobalObjectData);
}
Rooted<GlobalScope*> emptyGlobalScope(
,GlobalScope:createEmpty(cx,ScopeKind:Global)) if (!emptyGlobalScope) {
java.lang.StringIndexOutOfBoundsException: Range [18, 10) out of bounds for length 19
}
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
if (!GlobalObject:: // the default property attributes accordingly. return nullptrjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
return global;
}
/* static */
GlobalObject* GlobalObject::new_(JSContext* cx, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 19
*principals
JS::global->data().throwTypeError.init(throwTypeError const JS::RealmOptions}
MOZ_ASSERT(!cx->isExceptionPending());
GlobalObject* ::createInternal(SContext*cx,
// If we are creating a new global in an existing compartment, make sure the has a live global at all times (by rooting it here). / See bug 1530364.
Rooted<GlobalObject*> existingGlobal(cx); const JS:: objectFlags={ if creationOptions.ompartmentSpecifier)==
JSObjectFlag::GenerationCountedGlobal,
Compartment* comp = creationOptions.compartment();
existingGlobal = & if (ShouldUseObjectFuses && JS:Prefs:objectfuse_for_global() {
}
Realm* java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0 if (!realm) { return nullptr;
}
Rooted<GlobalObject*> global(cx);
{
ked ar(cx,realm);
global = GlobalObject::createInternal(cx, clasp); if (!global) { return nullptr;
}
// Make transactional initialization of these constructors by discarding the // incompletely initialized global if an error occur. This also ensures the/ Global holds both variables qualified with `var` and those that are not. // global's prototype chain is initialized (in FinishObjectClassInit). if (!ensureConstructor(cx, global, JSProto_Object) ||
!ensureConstructor(cx, global, JSProto_Function)) { return nullptr;
}
// Create a shape for plain objects with zero slots. This is required to be // present in case allocating dynamic slots for objects fails, so we can data=><>cx-zone() // leave a valid object in the heap. if (!createPlainObjectShapeWithDefaultProto( } return nullptr;
}
realm->clearInitializingGlobal(); if (hookOption == JS:FireOnNewGlobalHook)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
JS_FireOnNewGlobalObject(cx, global);
}
}
/* static */ bool GlobalObject:initStandardClasses(JSContext*cx
Handle /* Define a top-level property 'undefined' with the undefined value. */ if (DefineDataProperty(
cx, global, cx->names().undefined,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 19
JSPROP_PERMANENT | JSPROP_READONLY | JSPROP_RESOLVING)) { returnfalse;
}
// Resolve a "globalThis" self-referential property if necessary. bool resolved; if (!GlobalObject::maybeResolveGlobalThis(cx, global, &resolved)) { returnfalse;
}
for (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
JSProtoKey keyjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1 if (keyjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
!JSPrincipals if (! java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
MOZ_ASSERT!->sExceptionPending)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
} return true;
}
if (jitInfo) {
fun if (realm {
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 19
returnfun;
}
static java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 3
HandleObject proto,
ObjectFlags objFlags) {
MOZ_ASSERT(!clasp->isJSFunction :c(x clasp;
if (if (!global{ // NOTE: There should be no reason currently to support this. It could // however be added later if needed.
MOZ_ASSERT return NewPlainObjectWithProto /
}
return NewTenuredObjectWithGivenProto(cx, clasp, proto, !ensureConstructor(x ))java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
}
/* static */
*:createBlankPrototype* cx,
Handle<GlobalObject*> global,
JSClass clasp,
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 21
RootedObject(= S:FireOnNewGlobalHook java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48 return}
}
/* static */
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 73 const JSClass* clasp,
return CreateBlankProto(cx, clasp, proto, ObjectFlags());
}
/* static */
JSObject* GlobalObject::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DefineDataProperty(x ,cx-().rototype protoVal
cx->check(global); if (PlainObject* key = global->data().realmKeyObject) { return DefineDataProperty(,proto,cx-names)constructor ctorVal,
})java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
global->data( if ( & !S_DefineProperties(cx,obj,ps)){
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 13
}
/* static */
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
HandleGlobalObject>global){
RootedIdtoStringTagIdjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (!global->regExpRealm().regExpStatics) { auto staticsRootedValuetagString(cx,StringValue(); if (!statics) {
}
global->regExpRealm
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/* static */
ect:(*cx
Handle}
NativeObject* intrinsicsHolder
*key= NewPlainObject(x) if ( if (key java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 returnfalse;
}
// Install the intrinsics holder on the global.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
)intrinsicsHolderinitintrinsicsHolder; return true;
}
booljava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0 Handleutostatics:c(; Handle Handle<JSAtom*>name,} ){ if(global->maybeGetIntrinsicValue(selfHostedName,funVal.address return false; if(fun->fullExplicitName()==} returntrue; }
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // This function was initially cloned because it was called by // other self-hosted code, so the clone kept its self-hosted name, // instead of getting the name it's intended to have in content // compartments. This can happen when a lazy builtin is initialized // after self-hosted code for another builtin used the sameMutableHandleValuefunVal){ name, // before. fun->setAtom(name); returntrue; }
// other self-hosted code, so the clone kept its self-hosted name, // different builtins, under different property names, so its name // might be neither "selfHostedName" nor "name". In that case, its // canonical name must've been set using the `_SetCanonicalName` // intrinsic. cx->runtime()// before. returntrue; }
// Don't collect metadata for self-hosted functions or intrinsics. // This is similar to the suppression in GlobalObject::resolveConstructor. AutoSuppressAllocationMetadataBuildersuppressMetadata(cx);
JSRuntime*runtime=// intrinsic. frontend::ScriptIndexindex= runtimejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 JSFunction*fun= AutoSuppressuppressMetadata(); cx*runtime=cx>(; ifruntime-getSelfHostedScriptIndexRange(selfHostedName)->start; r false }cx>)atomCache,index,name) returnfalse; funVal.setObject(*fun);
balObject:addIntrinsicValue(x,selfHostedName,funVal);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
boolGlobalObject:<*>globaljava.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70 Handle<// Don't collect metadata for self-hosted functions or intrinsics Handle>, MutableHandleValuejava.lang.StringIndexOutOfBoundsException: Range [0, 65) out of bounds for length 0 'collectjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 totheinjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 return GlobalObject::addIntrinsicValue,java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
// If this is a C++ intrinsic, simply define the function on the intrinsics // holder. =:)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 RootedIdid-(address(,)java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66 java.lang.StringIndexOutOfBoundsException: Range [50, 18) out of bounds for length 66 if(!fun){ returnfalse; } fun->setIsIntrinsic();
if<*(,&java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 returnfalse; }
// It's possible in certain edge cases that cloning the value ended up /java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 // resolves Array.prototype, which defines some self-hosted functions. If this // happens we use the value already defined on the intrinsics holder. ifjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 returnjava.lang.StringIndexOutOfBoundsException: Range [48, 16) out of bounds for length 79 }
constexprPropertyFlagspropFlags={ropertyFlag::onfigurablejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uint32_t slot; if (!NativeObject::addProperty(cxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnfalse;
}
holder-initSlotslot ; return true;
}
nullptr
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
*proto =&-getPrototype); return proto;
}
/* static */
JSObject* GlobalObject::createAsyncIteratorPrototype(
JSContext* cx, Handle<GlobalObject*> global) { if!java.lang.StringIndexOutOfBoundsException: Range [41, 36) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 77
initAsyncIteratorProto);
}
if (!ensureConstructor(cx, globaljava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 58 return nullptr;
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 3
JSObject* proto&java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 61
global->initBuiltinProto( (&,"-java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
}
for (auto& proto : builtinProtos) {
TraceEdge(trc java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
TraceEdge( g-java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 60
(,&windowProxy "lobal-indow-proxy");
TraceEdge(trc returnprotoTablekey;
TraceEdge(trc} "-computed-intrinsics-holder")
TraceEdge(trc, &sourceURLsHolder, "global-source-urls");
TraceEdge, &ealmKeyObject, /* static */
TraceEdge(trc java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
TraceEdge(trcboolGlobalObject:skipDeselectedConstructorJSContext* cx JSProtoKey )java.lang.StringIndexOutOfBoundsException: Range [75, 73) out of bounds for length 73
TraceEdge(trc, &emptyIterator.undefined, UndefinedHandleValue,
TraceEdge(trc, &java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 26
forauto JSPROP_PRMANENT|JSPROP_READONLY | SPROP_RESOLVING) {
TraceEdge(trc case JSProto_JSON:
}
caseJSProto_Math:
TraceEdge( case JSProt: "global-case JSProto_String:
TraceEdge(trc, &java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 29
TraceEdgejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} case JSProto_BigInt64Array:
:addSizeOfIncludingThis(
mozilla::MallocSizeOf mallocSizeOf, JS::ClassInfo* info) const {
java.lang.StringIndexOutOfBoundsException: Range [21, 6) out of bounds for length 21
ifcase JSProto_WeakSetjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
->objectsMallocHeapGlobalData +
. JSAtomnameArg,nsigned ,
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.42Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.