mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 815010 - Create lazy interpreted function's script in the jsdbg API's JS_GetFunctionScript. r=luke
--HG-- extra : rebase_source : 3f326115a955bdb99789bf17a6ba1631c6ea3440
This commit is contained in:
parent
4616ea75b7
commit
cea46cd79a
@ -448,7 +448,18 @@ JS_ReleaseFunctionLocalNameArray(JSContext *cx, void *mark)
|
||||
JS_PUBLIC_API(JSScript *)
|
||||
JS_GetFunctionScript(JSContext *cx, JSFunction *fun)
|
||||
{
|
||||
return fun->maybeNonLazyScript();
|
||||
if (fun->isNative())
|
||||
return NULL;
|
||||
RawScript script;
|
||||
if (fun->isInterpretedLazy()) {
|
||||
AutoCompartment funCompartment(cx, fun);
|
||||
script = fun->getOrCreateScript(cx);
|
||||
if (!script)
|
||||
MOZ_CRASH();
|
||||
} else {
|
||||
script = fun->nonLazyScript();
|
||||
}
|
||||
return script;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSNative)
|
||||
|
Loading…
Reference in New Issue
Block a user