mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 656490 - Fix direct-eval assert (r=dmandelin)
This commit is contained in:
parent
2299c54162
commit
bf3e38e9d2
4
js/src/jit-test/tests/basic/testTrapOnEval.js
Normal file
4
js/src/jit-test/tests/basic/testTrapOnEval.js
Normal file
@ -0,0 +1,4 @@
|
||||
// |jit-test| debug
|
||||
function f() { eval(''); }
|
||||
trap(f, 6, '');
|
||||
f();
|
@ -1285,7 +1285,7 @@ DirectEval(JSContext *cx, const CallArgs &call)
|
||||
StackFrame *caller = cx->fp();
|
||||
JS_ASSERT(caller->isScriptFrame());
|
||||
JS_ASSERT(IsBuiltinEvalForScope(&caller->scopeChain(), call.calleev()));
|
||||
JS_ASSERT(*cx->regs().pc == JSOP_EVAL);
|
||||
JS_ASSERT(js_GetOpcode(cx, cx->fp()->script(), cx->regs().pc) == JSOP_EVAL);
|
||||
|
||||
AutoFunctionCallProbe callProbe(cx, call.callee().getFunctionPrivate(), caller->script());
|
||||
|
||||
|
@ -102,7 +102,7 @@ inline const char *
|
||||
CurrentScriptFileAndLine(JSContext *cx, uintN *linenop, LineOption opt)
|
||||
{
|
||||
if (opt == CALLED_FROM_JSOP_EVAL) {
|
||||
JS_ASSERT(*cx->regs().pc == JSOP_EVAL);
|
||||
JS_ASSERT(js_GetOpcode(cx, cx->fp()->script(), cx->regs().pc) == JSOP_EVAL);
|
||||
JS_ASSERT(*(cx->regs().pc + JSOP_EVAL_LENGTH) == JSOP_LINENO);
|
||||
*linenop = GET_UINT16(cx->regs().pc + JSOP_EVAL_LENGTH);
|
||||
return cx->fp()->script()->filename;
|
||||
|
Loading…
Reference in New Issue
Block a user