Bug 889614 - Followup, don't erroneously cancel other events. r=josh, a=bajaj
authorJohn Schoenick <jschoenick@mozilla.com>
Fri, 26 Jul 2013 11:34:47 -0700
changeset 148215 17b59850715a4e8c4f622ff05669dd10151d3a86
parent 148214 8c006f1d7055fb7d1c943cb05295a3bd4f059016
child 148216 7e1add37886ac9099b85dc145bb7524fa442f041
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, bajaj
bugs889614
milestone24.0a2
Bug 889614 - Followup, don't erroneously cancel other events. r=josh, a=bajaj
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));