Mark our saved setter in case we have the last reference to it. bug 361346, r=brendan

This commit is contained in:
mrbkap%gmail.com 2006-11-24 18:57:34 +00:00
Родитель 4f1af3f3d4
Коммит ba5d458bc6
3 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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);