mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 897322 - Match up the script global and compile-and-go global when cloning function scripts. r=jimb
This commit is contained in:
parent
3b5f7c3277
commit
b7694118ca
@ -2519,10 +2519,9 @@ js::CloneFunctionScript(JSContext *cx, HandleFunction original, HandleFunction c
|
||||
clone->setScript(cscript);
|
||||
cscript->setFunction(clone);
|
||||
|
||||
RootedGlobalObject global(cx, script->compileAndGo ? &script->global() : NULL);
|
||||
|
||||
script = clone->nonLazyScript();
|
||||
CallNewScriptHook(cx, script, clone);
|
||||
RootedGlobalObject global(cx, script->compileAndGo ? &script->global() : NULL);
|
||||
Debugger::onNewScript(cx, script, global);
|
||||
|
||||
return true;
|
||||
|
@ -676,6 +676,7 @@ void
|
||||
Debugger::onNewScript(JSContext *cx, HandleScript script, GlobalObject *compileAndGoGlobal)
|
||||
{
|
||||
JS_ASSERT_IF(script->compileAndGo, compileAndGoGlobal);
|
||||
JS_ASSERT_IF(script->compileAndGo, compileAndGoGlobal == &script->global());
|
||||
JS_ASSERT_IF(!script->compileAndGo, !compileAndGoGlobal);
|
||||
if (!script->compartment()->getDebuggees().empty())
|
||||
slowPathOnNewScript(cx, script, compileAndGoGlobal);
|
||||
|
Loading…
Reference in New Issue
Block a user