зеркало из https://github.com/mozilla/gecko-dev.git
Bug 690970, part 2: unmark gray read barrier for watchpoints. r=billm
This commit is contained in:
Родитель
f35a0a52f1
Коммит
2e37bd40a8
|
@ -93,8 +93,12 @@ WatchpointMap::unwatch(JSObject *obj, jsid id,
|
|||
if (Map::Ptr p = map.lookup(WatchKey(obj, id))) {
|
||||
if (handlerp)
|
||||
*handlerp = p->value.handler;
|
||||
if (closurep)
|
||||
if (closurep) {
|
||||
// Read barrier to prevent an incorrectly gray closure from escaping the
|
||||
// watchpoint. See the comment before UnmarkGrayChildren in gc/Marking.cpp
|
||||
ExposeGCThingToActiveJS(p->value.closure, JSTRACE_OBJECT);
|
||||
*closurep = p->value.closure;
|
||||
}
|
||||
map.remove(p);
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +142,10 @@ WatchpointMap::triggerWatchpoint(JSContext *cx, HandleObject obj, HandleId id, M
|
|||
}
|
||||
}
|
||||
|
||||
// Read barrier to prevent an incorrectly gray closure from escaping the
|
||||
// watchpoint. See the comment before UnmarkGrayChildren in gc/Marking.cpp
|
||||
ExposeGCThingToActiveJS(closure, JSTRACE_OBJECT);
|
||||
|
||||
/* Call the handler. */
|
||||
return handler(cx, obj, id, old, vp.address(), closure);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче