mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1322107 - Scope local presshell variable in less error prone way. r=mccr8
--HG-- extra : rebase_source : 3ff847f0edde69facf963b5e82bad0510bbf756e
This commit is contained in:
parent
b7bda6c6b1
commit
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();
|
||||
|
Loading…
Reference in New Issue
Block a user