mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 959334 - Invoking js_InitTypedObjectModuleObject or js_InitSIMDClass in GlobalObject::initStandardClasses causes mochitest-plain to fail. r=Waldo
This commit is contained in:
parent
015263fe87
commit
d2eaa5a6b6
@ -386,14 +386,17 @@ TypeRepresentation::addToTableOrFree(JSContext *cx,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RootedObject objectProto(cx, global->getOrCreateObjectPrototype(cx));
|
||||
if (!objectProto)
|
||||
return nullptr;
|
||||
|
||||
// Now that the object is in the table, try to make the owner
|
||||
// object. If this succeeds, then the owner will remove from the
|
||||
// table once it is finalized. Otherwise, if this fails, we must
|
||||
// remove ourselves from the table ourselves and report an error.
|
||||
RootedObject ownerObject(cx,
|
||||
NewBuiltinClassInstance(cx,
|
||||
&class_,
|
||||
gc::GetGCObjectKind(&class_)));
|
||||
RootedObject ownerObject(cx);
|
||||
ownerObject = NewObjectWithGivenProto(cx, &class_, objectProto,
|
||||
cx->global());
|
||||
if (!ownerObject) {
|
||||
comp->typeReprs.remove(this);
|
||||
js_free(this);
|
||||
|
@ -510,6 +510,9 @@ GlobalObject::initStandardClasses(JSContext *cx, Handle<GlobalObject*> global)
|
||||
GlobalObject::initSetIteratorProto(cx, global) &&
|
||||
#if EXPOSE_INTL_API
|
||||
js_InitIntlClass(cx, global) &&
|
||||
#endif
|
||||
#ifdef ENABLE_BINARYDATA
|
||||
js_InitTypedObjectModuleObject(cx, global) &&
|
||||
#endif
|
||||
true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user