mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix incorrect pcOffset computation in CloseLiveIterators (bug 746370, r=pierron).
This commit is contained in:
parent
b7398ec84b
commit
e325a2f35f
@ -335,10 +335,11 @@ CloseLiveIterators(JSContext *cx, const InlineFrameIterator &frame)
|
||||
JSTryNote *tn = script->trynotes()->vector;
|
||||
JSTryNote *tnEnd = tn + script->trynotes()->length;
|
||||
|
||||
uint32 pcOffset = uint32(pc - script->main());
|
||||
for (; tn != tnEnd; ++tn) {
|
||||
if (uint32(pc - script->code) < tn->start)
|
||||
if (pcOffset < tn->start)
|
||||
continue;
|
||||
if (uint32(pc - script->code) >= tn->start + tn->length)
|
||||
if (pcOffset >= tn->start + tn->length)
|
||||
continue;
|
||||
|
||||
if (tn->kind != JSTRY_ITER)
|
||||
|
7
js/src/jit-test/tests/ion/bug746370.js
Normal file
7
js/src/jit-test/tests/ion/bug746370.js
Normal file
@ -0,0 +1,7 @@
|
||||
var a = ['p', 'q', 'r', 's', 't'];
|
||||
var o = {p:1, q:2, r:(1), s:4, t:5};
|
||||
for (var i in o) {
|
||||
delete o.p;
|
||||
}
|
||||
for each (var i in a)
|
||||
assertEq(o.hasOwnProperty(i), i != 'p');
|
Loading…
Reference in New Issue
Block a user