mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 722028 - Need write barrier for SuppressDeletedPropertyHelper (r=bhackett)
This commit is contained in:
parent
5578343c66
commit
f6419d58f3
13
js/src/jit-test/tests/basic/bug722028.js
Normal file
13
js/src/jit-test/tests/basic/bug722028.js
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
gczeal(4);
|
||||
var BUGNUMBER = 668024;
|
||||
var summary =
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
var arr = [0, 1, 2, 3, 4, 5, , 7];
|
||||
var seen = [];
|
||||
for (var p in arr) {
|
||||
if (seen.indexOf(unescape) >= 0) {}
|
||||
arr.splice(2, 3);
|
||||
seen.push(p);
|
||||
}
|
||||
|
@ -1029,6 +1029,12 @@ SuppressDeletedPropertyHelper(JSContext *cx, JSObject *obj, StringPredicate pred
|
||||
for (HeapPtr<JSFlatString> *p = idp; p + 1 != props_end; p++)
|
||||
*p = *(p + 1);
|
||||
ni->props_end = ni->end() - 1;
|
||||
|
||||
/*
|
||||
* Invoke the write barrier on this element, since it's
|
||||
* no longer going to be marked.
|
||||
*/
|
||||
ni->props_end->HeapPtr<JSFlatString>::~HeapPtr<JSFlatString>();
|
||||
}
|
||||
|
||||
/* Don't reuse modified native iterators. */
|
||||
|
Loading…
Reference in New Issue
Block a user