зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322107 - Scope local presshell variable in less error prone way. r=mccr8
--HG-- extra : rebase_source : 3ff847f0edde69facf963b5e82bad0510bbf756e
This commit is contained in:
Родитель
b7bda6c6b1
Коммит
98b7134a01
|
@ -4061,10 +4061,11 @@ PresShell::FlushPendingNotifications(mozilla::ChangesToFlush aFlush)
|
|||
RefPtr<nsViewManager> viewManager = mViewManager;
|
||||
bool didStyleFlush = false;
|
||||
bool didLayoutFlush = false;
|
||||
nsCOMPtr<nsIPresShell> kungFuDeathGrip;
|
||||
if (isSafeToFlush && viewManager) {
|
||||
// Processing pending notifications can kill us, and some callers only
|
||||
// hold weak refs when calling FlushPendingNotifications(). :(
|
||||
nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
|
||||
kungFuDeathGrip = this;
|
||||
|
||||
if (mResizeEvent.IsPending()) {
|
||||
FireResizeEvent();
|
||||
|
|
Загрузка…
Ссылка в новой задаче