зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1568950 - Part 1: Record use counters in Document::Destroy, instead of in ~Document; r=smaug
Recording use counters in ~Document doesn't work as expected for some cases, for instance, user closes tab right after using them: - In opt build, Document destructor isn't even reached given that we just kill the process without doing cleanup; - In debug build, we reach the recording code, but it doesn't report use counters successfully due to it is unable to send the IPC message. Document::Destroy is a better place that happens earlier and gives us more time to report the use counters. Differential Revision: https://phabricator.services.mozilla.com/D41511 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b511871ba6
Коммит
da423b7334
|
@ -1761,8 +1761,6 @@ Document::~Document() {
|
|||
}
|
||||
}
|
||||
|
||||
ReportUseCounters();
|
||||
|
||||
mInDestructor = true;
|
||||
mInUnlinkOrDeletion = true;
|
||||
|
||||
|
@ -10457,6 +10455,8 @@ void Document::Destroy() {
|
|||
}
|
||||
}
|
||||
|
||||
ReportUseCounters();
|
||||
|
||||
mIsGoingAway = true;
|
||||
|
||||
ScriptLoader()->Destroy();
|
||||
|
|
Загрузка…
Ссылка в новой задаче