mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
bug 561539 - renaming AutoSaveRestoreWealRoots into AutoPreserveWeakRoots. r=brendan
This commit is contained in:
parent
a4a60c36c5
commit
8998564be0
@ -1656,17 +1656,17 @@ class AutoGCRooter {
|
||||
void operator=(AutoGCRooter &ida);
|
||||
};
|
||||
|
||||
class AutoSaveRestoreWeakRoots : private AutoGCRooter
|
||||
class AutoPreserveWeakRoots : private AutoGCRooter
|
||||
{
|
||||
public:
|
||||
explicit AutoSaveRestoreWeakRoots(JSContext *cx
|
||||
JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
explicit AutoPreserveWeakRoots(JSContext *cx
|
||||
JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: AutoGCRooter(cx, WEAKROOTS), savedRoots(cx->weakRoots)
|
||||
{
|
||||
JS_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
}
|
||||
|
||||
~AutoSaveRestoreWeakRoots()
|
||||
~AutoPreserveWeakRoots()
|
||||
{
|
||||
context->weakRoots = savedRoots;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ AutoGCRooter::trace(JSTracer *trc)
|
||||
return;
|
||||
|
||||
case WEAKROOTS:
|
||||
static_cast<AutoSaveRestoreWeakRoots *>(this)->savedRoots.mark(trc);
|
||||
static_cast<AutoPreserveWeakRoots *>(this)->savedRoots.mark(trc);
|
||||
return;
|
||||
|
||||
case PARSER:
|
||||
|
@ -1416,7 +1416,7 @@ LastDitchGC(JSContext *cx)
|
||||
JS_ASSERT(!JS_ON_TRACE(cx));
|
||||
|
||||
/* The last ditch GC preserves weak roots and all atoms. */
|
||||
AutoSaveRestoreWeakRoots save(cx);
|
||||
AutoPreserveWeakRoots save(cx);
|
||||
AutoKeepAtoms keep(cx->runtime);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user