mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 574990 - cx->globalObject needs to be innerized before it can be used. r=gal
--HG-- extra : rebase_source : 6e31e65d2e265da850b871b78ec9af984350b08c
This commit is contained in:
parent
b3c8c97bf8
commit
50cdb5d92b
@ -699,7 +699,15 @@ NewBuiltinClassInstance(JSContext *cx, JSClass *clasp)
|
||||
JS_ASSERT(protoKey != JSProto_Null);
|
||||
|
||||
/* NB: inline-expanded and specialized version of js_GetClassPrototype. */
|
||||
JSObject *global = cx->fp ? cx->fp->scopeChain->getGlobal() : cx->globalObject;
|
||||
JSObject *global;
|
||||
if (!cx->fp) {
|
||||
global = cx->globalObject;
|
||||
OBJ_TO_INNER_OBJECT(cx, global);
|
||||
if (!global)
|
||||
return NULL;
|
||||
} else {
|
||||
global = cx->fp->scopeChain->getGlobal();
|
||||
}
|
||||
JS_ASSERT(global->getClass()->flags & JSCLASS_IS_GLOBAL);
|
||||
|
||||
jsval v = global->getReservedSlot(JSProto_LIMIT + protoKey);
|
||||
|
Loading…
Reference in New Issue
Block a user