Bug 1507313 part 2: Convert PresShell::mReflowCountMgr into a UniquePtr (rather than an owning raw pointer). r=TYLin

Differential Revision: https://phabricator.services.mozilla.com/D11946

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daniel Holbert 2018-11-15 07:27:50 +00:00
parent 52166a8007
commit d7065b05db
2 changed files with 3 additions and 6 deletions

View File

@ -832,7 +832,7 @@ PresShell::PresShell()
MOZ_LOG(gLog, LogLevel::Debug, ("PresShell::PresShell this=%p", this));
#ifdef MOZ_REFLOW_PERF
mReflowCountMgr = new ReflowCountMgr();
mReflowCountMgr = MakeUnique<ReflowCountMgr>();
mReflowCountMgr->SetPresContext(mPresContext);
mReflowCountMgr->SetPresShell(this);
#endif
@ -1182,10 +1182,7 @@ PresShell::Destroy()
#ifdef MOZ_REFLOW_PERF
DumpReflows();
if (mReflowCountMgr) {
delete mReflowCountMgr;
mReflowCountMgr = nullptr;
}
mReflowCountMgr = nullptr;
#endif
if (mZoomConstraintsClient) {

View File

@ -761,7 +761,7 @@ private:
#endif
#ifdef MOZ_REFLOW_PERF
ReflowCountMgr* mReflowCountMgr;
UniquePtr<ReflowCountMgr> mReflowCountMgr;
#endif
// This is used for synthetic mouse events that are sent when what is under