Bug 1558758: narrow visibility from SnowWhiteKiller::MaybeKillObject to private.

Simplifies reasoning about the method.

Differential Revision: https://phabricator.services.mozilla.com/D34685
This commit is contained in:
Mirko Brodesser 2019-06-11 17:15:07 +02:00
parent c1c3acd11d
commit 20b754bf1d

View File

@ -2417,6 +2417,7 @@ class SnowWhiteKiller : public TraceCallbacks {
}
}
private:
void MaybeKillObject(SnowWhiteObject& aObject) {
if (!aObject.mRefCnt->get() && !aObject.mRefCnt->IsInPurpleBuffer()) {
mCollector->RemoveObjectFromGraph(aObject.mPointer);
@ -2429,6 +2430,7 @@ class SnowWhiteKiller : public TraceCallbacks {
}
}
public:
bool Visit(nsPurpleBuffer& aBuffer, nsPurpleBufferEntry* aEntry) {
// The cycle collector does not collect anything when recording/replaying.
if (recordreplay::IsRecordingOrReplaying()) {