mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 720848 - Trace through watchpoints from TraceRuntime (r=jorendorff)
This commit is contained in:
parent
3b16857c51
commit
5432dc90b6
@ -2125,6 +2125,12 @@ MarkRuntime(JSTracer *trc)
|
||||
if (c->activeAnalysis)
|
||||
c->markTypes(trc);
|
||||
|
||||
/* During a GC, these are treated as weak pointers. */
|
||||
if (!IS_GC_MARKING_TRACER(trc)) {
|
||||
if (c->watchpointMap)
|
||||
c->watchpointMap->markAll(trc);
|
||||
}
|
||||
|
||||
/* Do not discard scripts with counters while profiling. */
|
||||
if (rt->profilingScripts) {
|
||||
for (CellIterUnderGC i(c, FINALIZE_SCRIPT); !i.done(); i.next()) {
|
||||
|
@ -220,6 +220,21 @@ WatchpointMap::markIteratively(JSTracer *trc)
|
||||
return marked;
|
||||
}
|
||||
|
||||
void
|
||||
WatchpointMap::markAll(JSTracer *trc)
|
||||
{
|
||||
for (Map::Range r = map.all(); !r.empty(); r.popFront()) {
|
||||
Map::Entry &e = r.front();
|
||||
MarkObject(trc, e.key.object, "held Watchpoint object");
|
||||
|
||||
const HeapId &id = e.key.id;
|
||||
JS_ASSERT(JSID_IS_STRING(id) || JSID_IS_INT(id));
|
||||
MarkId(trc, id, "WatchKey::id");
|
||||
|
||||
MarkObject(trc, e.value.closure, "Watchpoint::closure");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WatchpointMap::sweepAll(JSContext *cx)
|
||||
{
|
||||
|
@ -89,6 +89,7 @@ class WatchpointMap {
|
||||
|
||||
static bool markAllIteratively(JSTracer *trc);
|
||||
bool markIteratively(JSTracer *trc);
|
||||
void markAll(JSTracer *trc);
|
||||
static void sweepAll(JSContext *cx);
|
||||
void sweep(JSContext *cx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user