mirror of
http://git.mos6581.com/ManchildProductions/Male-Poon.git
synced 2026-05-26 15:10:59 +00:00
Scope local presshell variable in less error-prone way.
This commit is contained in:
@@ -4234,10 +4234,11 @@ PresShell::FlushPendingNotifications(mozilla::ChangesToFlush aFlush)
|
||||
nsRefPtr<nsViewManager> viewManagerDeathGrip = mViewManager;
|
||||
bool didStyleFlush = false;
|
||||
bool didLayoutFlush = false;
|
||||
nsCOMPtr<nsIPresShell> kungFuDeathGrip;
|
||||
if (isSafeToFlush && mViewManager) {
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user