mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 08:48:07 +00:00
Bug 899827 - Allow AutoObjectObjectHashMap to store Nursery GC things; r=jonco
--HG-- extra : rebase_source : 9c528adf006c021fb519013f3265edfa10803714
This commit is contained in:
parent
93a57a5bf7
commit
0310984563
@ -482,10 +482,12 @@ AutoGCRooter::trace(JSTracer *trc)
|
||||
case OBJOBJHASHMAP: {
|
||||
AutoObjectObjectHashMap::HashMapImpl &map = static_cast<AutoObjectObjectHashMap *>(this)->map;
|
||||
for (AutoObjectObjectHashMap::Enum e(map); !e.empty(); e.popFront()) {
|
||||
mozilla::DebugOnly<JSObject *> key = e.front().key;
|
||||
MarkObjectRoot(trc, const_cast<JSObject **>(&e.front().key), "AutoObjectObjectHashMap key");
|
||||
JS_ASSERT(key == e.front().key); // Needs rewriting for moving GC, see bug 726687.
|
||||
MarkObjectRoot(trc, &e.front().value, "AutoObjectObjectHashMap value");
|
||||
JS_SET_TRACING_LOCATION(trc, (void *)&e.front().key);
|
||||
JSObject *key = e.front().key;
|
||||
MarkObjectRoot(trc, &key, "AutoObjectObjectHashMap key");
|
||||
if (key != e.front().key)
|
||||
e.rekeyFront(key);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user