mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 666292 - The decompiler does not deserve to use FrameRegsIter (it temporarily clobbers script->code) (r=waldo)
This commit is contained in:
parent
0a61156473
commit
a6f59ecb7d
14
js/src/jit-test/tests/basic/testBug666292.js
Normal file
14
js/src/jit-test/tests/basic/testBug666292.js
Normal file
@ -0,0 +1,14 @@
|
||||
// |jit-test| debug
|
||||
|
||||
function f(){
|
||||
this.zzz.zzz;
|
||||
for(let d in []);
|
||||
}
|
||||
trap(f, 18, '')
|
||||
try {
|
||||
f()
|
||||
} catch(e) {
|
||||
caught = true;
|
||||
assertEq(""+e, "TypeError: this.zzz is undefined");
|
||||
}
|
||||
assertEq(caught, true);
|
@ -2090,11 +2090,9 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
|
||||
* the bytecode at pc, so we don't decompile more than the error
|
||||
* expression.
|
||||
*/
|
||||
FrameRegsIter iter(cx);
|
||||
while (!iter.done() && !iter.fp()->isScriptFrame())
|
||||
++iter;
|
||||
StackFrame *fp = js_GetScriptedCaller(cx, NULL);
|
||||
uint32 format = cs->format;
|
||||
if (((!iter.done() && pc == iter.pc()) ||
|
||||
if (((fp && pc == fp->pcQuadratic(cx)) ||
|
||||
(pc == startpc && nuses != 0)) &&
|
||||
format & (JOF_SET|JOF_DEL|JOF_INCDEC|JOF_FOR|JOF_VARPROP)) {
|
||||
uint32 mode = JOF_MODE(format);
|
||||
|
Loading…
Reference in New Issue
Block a user