Bug 1522084 - HighPriorityEventPendingForTopLevelDocumentBeforeContentfulPaint should return false for data documents, r=jesup
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 23 Jan 2019 16:07:21 +0200
changeset 515126 2d7c13dfec2dfc7f3300e767315db3518ab96676
parent 515125 00074091644d1aab8e83060c14f63e3104089f68
child 515127 cac13d592b66535ee7abbf05a71952f21654dc21
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1522084
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522084 - HighPriorityEventPendingForTopLevelDocumentBeforeContentfulPaint should return false for data documents, r=jesup
dom/base/nsContentUtils.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -10433,17 +10433,17 @@ static bool JSONCreator(const char16_t* 
                  false);
   aOutStr = serializedValue;
   return true;
 }
 
 /* static */
 bool nsContentUtils::HighPriorityEventPendingForTopLevelDocumentBeforeContentfulPaint(
     Document* aDocument) {
-  if (!aDocument) {
+  if (!aDocument || aDocument->IsLoadedAsData()) {
     return false;
   }
 
   Document* topLevel = aDocument->GetTopLevelContentDocument();
   return topLevel && topLevel->GetShell() &&
          topLevel->GetShell()->GetPresContext() &&
          !topLevel->GetShell()->GetPresContext()->HadContentfulPaint() &&
          nsThreadManager::MainThreadHasPendingHighPriorityEvents();