зеркало из https://github.com/mozilla/pjs.git
Mark our saved setter in case we have the last reference to it. bug 361346, r=brendan
This commit is contained in:
Родитель
4f1af3f3d4
Коммит
ba5d458bc6
|
@ -279,14 +279,18 @@ DropWatchPoint(JSContext *cx, JSWatchPoint *wp)
|
|||
}
|
||||
|
||||
void
|
||||
js_MarkWatchPoints(JSRuntime *rt)
|
||||
js_MarkWatchPoints(JSContext *cx)
|
||||
{
|
||||
JSRuntime *rt;
|
||||
JSWatchPoint *wp;
|
||||
|
||||
rt = cx->runtime;
|
||||
for (wp = (JSWatchPoint *)rt->watchPointList.next;
|
||||
wp != (JSWatchPoint *)&rt->watchPointList;
|
||||
wp = (JSWatchPoint *)wp->links.next) {
|
||||
MARK_SCOPE_PROPERTY(wp->sprop);
|
||||
if (wp->sprop->attrs & JSPROP_SETTER)
|
||||
JS_MarkGCThing(cx, wp->setter, "wp->setter", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ JS_ClearAllWatchPoints(JSContext *cx);
|
|||
* header file "jsconfig.h" has been included.
|
||||
*/
|
||||
extern void
|
||||
js_MarkWatchPoints(JSRuntime *rt);
|
||||
js_MarkWatchPoints(JSContext *cx);
|
||||
|
||||
extern JSScopeProperty *
|
||||
js_FindWatchPoint(JSRuntime *rt, JSScope *scope, jsid id);
|
||||
|
|
|
@ -2849,7 +2849,7 @@ restart:
|
|||
if (rt->gcLocksHash)
|
||||
JS_DHashTableEnumerate(rt->gcLocksHash, gc_lock_marker, cx);
|
||||
js_MarkAtomState(&rt->atomState, keepAtoms, gc_mark_atom_key_thing, cx);
|
||||
js_MarkWatchPoints(rt);
|
||||
js_MarkWatchPoints(cx);
|
||||
js_MarkScriptFilenames(rt, keepAtoms);
|
||||
js_MarkNativeIteratorStates(cx);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче