Bug 889614 - Followup, don't erroneously cancel other events. r=josh
authorJohn Schoenick <jschoenick@mozilla.com>
Fri, 26 Jul 2013 11:34:47 -0700
changeset 140763 3f5f81744326f9fd1437aefd04946e48ef785b6f
parent 140762 4c3a590491308991db5bacae3970c61b4c704dd9
child 140764 ebaafd980e78f654b8854a38e5274f4b4286b1eb
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersjosh
bugs889614
milestone25.0a1
Bug 889614 - Followup, don't erroneously cancel other events. r=josh
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -181,19 +181,22 @@ CheckPluginStopEvent::Run()
     return NS_OK;
   }
 
   if (!content->GetPrimaryFrame()) {
     LOG(("OBJLC [%p]: CheckPluginStopEvent - No frame, flushing layout", this));
     nsIDocument* currentDoc = content->GetCurrentDoc();
     if (currentDoc) {
       currentDoc->FlushPendingNotifications(Flush_Layout);
-      if (objLC->mPendingCheckPluginStopEvent != this ||
-          content->GetPrimaryFrame()) {
-        LOG(("OBJLC [%p]: Event superseded or frame gained during layout flush",
+      if (objLC->mPendingCheckPluginStopEvent != this) {
+        LOG(("OBJLC [%p]: CheckPluginStopEvent - superseded in layout flush",
+             this));
+        return NS_OK;
+      } else if (content->GetPrimaryFrame()) {
+        LOG(("OBJLC [%p]: CheckPluginStopEvent - frame gained in layout flush",
              this));
         objLC->mPendingCheckPluginStopEvent = nullptr;
         return NS_OK;
       }
     }
     // Still no frame, suspend plugin. HasNewFrame will restart us when we
     // become rendered again
     LOG(("OBJLC [%p]: Stopping plugin that lost frame", this));