mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out bug 475396. Suspected of causing Linux orange-ness.
This commit is contained in:
parent
db79b857e5
commit
71d9ce93bc
@ -1242,29 +1242,36 @@ JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
|
||||
jsval *rval)
|
||||
{
|
||||
JSObject *scobj;
|
||||
JSScript *script;
|
||||
JSScript *script, *oldscript;
|
||||
JSStackFrame **disp, *displaySave;
|
||||
JSBool ok;
|
||||
|
||||
scobj = JS_GetFrameScopeChain(cx, fp);
|
||||
if (!scobj)
|
||||
return JS_FALSE;
|
||||
|
||||
/*
|
||||
* NB: This function breaks the assumption that the compiler can see all
|
||||
* calls and properly compute a static depth. In order to get around this,
|
||||
* we use a static depth that will cause us not to attempt to optimize
|
||||
* variable references made by this frame.
|
||||
*/
|
||||
oldscript = fp->script;
|
||||
script = js_CompileScript(cx, scobj, fp, JS_StackFramePrincipals(cx, fp),
|
||||
TCF_COMPILE_N_GO |
|
||||
TCF_PUT_STATIC_DEPTH(JS_DISPLAY_SIZE),
|
||||
TCF_PUT_STATIC_DEPTH(oldscript->staticDepth + 1),
|
||||
chars, length, NULL,
|
||||
filename, lineno);
|
||||
if (!script)
|
||||
return JS_FALSE;
|
||||
|
||||
/* Ensure that the display is up to date for this particular stack frame. */
|
||||
if (oldscript->staticDepth < JS_DISPLAY_SIZE) {
|
||||
disp = &cx->display[oldscript->staticDepth];
|
||||
displaySave = *disp;
|
||||
*disp = fp;
|
||||
} else {
|
||||
disp = NULL;
|
||||
displaySave = NULL;
|
||||
}
|
||||
ok = js_Execute(cx, scobj, script, fp, JSFRAME_DEBUGGER | JSFRAME_EVAL,
|
||||
rval);
|
||||
if (disp)
|
||||
*disp = displaySave;
|
||||
js_DestroyScript(cx, script);
|
||||
return ok;
|
||||
}
|
||||
|
@ -1892,7 +1892,7 @@ BindNameToSlot(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
|
||||
* Optimize access to function's arguments and variable and the
|
||||
* arguments object.
|
||||
*/
|
||||
if (PN_OP(pn) != JSOP_NAME || cg->staticDepth >= JS_DISPLAY_SIZE)
|
||||
if (PN_OP(pn) != JSOP_NAME || cg->staticDepth > JS_DISPLAY_SIZE)
|
||||
goto arguments_check;
|
||||
localKind = js_LookupLocal(cx, caller->fun, atom, &index);
|
||||
if (localKind == JSLOCAL_NONE)
|
||||
|
Loading…
Reference in New Issue
Block a user