mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Don't use shell bindMethod function on non-compileAndGo scripts, bug 654710.
This commit is contained in:
parent
4955efb887
commit
aae52a8f74
@ -285,6 +285,9 @@ LoopState::clearLoopRegisters()
|
||||
bool
|
||||
LoopState::loopInvariantEntry(uint32 slot)
|
||||
{
|
||||
if (slot == UNASSIGNED)
|
||||
return true;
|
||||
|
||||
/* Watch for loop temporaries. :XXX: this is really gross. */
|
||||
if (slot - analyze::LocalSlot(outerScript, 0) >= outerScript->nslots)
|
||||
return true;
|
||||
|
@ -5177,6 +5177,15 @@ its_bindMethod(JSContext *cx, uintN argc, jsval *vp)
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
if (method->getFunctionPrivate()->isInterpreted() &&
|
||||
method->getFunctionPrivate()->script()->compileAndGo) {
|
||||
/* Can't reparent compileAndGo scripts. */
|
||||
JSAutoByteString nameBytes(cx, name);
|
||||
if (!!nameBytes)
|
||||
JS_ReportError(cx, "can't bind method %s to compileAndGo script", nameBytes.ptr());
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
jsid id;
|
||||
if (!JS_ValueToId(cx, STRING_TO_JSVAL(name), &id))
|
||||
return JS_FALSE;
|
||||
|
@ -59,7 +59,7 @@ printStatus(inSection(2));
|
||||
|
||||
function getBoundMethod()
|
||||
{
|
||||
return it.bindMethod("boundMethod", function () { return this; });
|
||||
return it.bindMethod("boundMethod", Function("return this"));
|
||||
}
|
||||
|
||||
// it is a js shell only construction
|
||||
|
Loading…
Reference in New Issue
Block a user