Landing fix for bug 442708. JS_GC with GC_SET_SLOT_REQUEST doesn't loop until all threads are satisfied. Patch by brendan@mozilla.org, r=bent.mozilla@gmail.com
This commit is contained in:
@@ -301,8 +301,13 @@ js_SetProtoOrParent(JSContext *cx, JSObject *obj, uint32 slot, JSObject *pobj)
|
||||
JS_LOCK_GC(rt);
|
||||
ssr.next = rt->setSlotRequests;
|
||||
rt->setSlotRequests = &ssr;
|
||||
js_GC(cx, GC_SET_SLOT_REQUEST);
|
||||
JS_UNLOCK_GC(rt);
|
||||
for (;;) {
|
||||
js_GC(cx, GC_SET_SLOT_REQUEST);
|
||||
JS_UNLOCK_GC(rt);
|
||||
if (!rt->setSlotRequests)
|
||||
break;
|
||||
JS_LOCK_GC(rt);
|
||||
}
|
||||
|
||||
if (ssr.errnum != JSMSG_NOT_AN_ERROR) {
|
||||
if (ssr.errnum == JSMSG_OUT_OF_MEMORY) {
|
||||
|
||||
Reference in New Issue
Block a user