Backed out changeset 0411363a0dc7 (bug 1334047) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 30 Jan 2017 15:36:09 +0100
changeset 375739 dacf10cb5b872db5f5b0ed87ed96014a2b61952c
parent 375738 0411363a0dc7d350ac731edc047e3c6f3ef51c1d
child 375740 e72aaa3b621e51a2563cf72335813b1a05bd7c23
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1334047
milestone53.0a2
backs out0411363a0dc7d350ac731edc047e3c6f3ef51c1d
Backed out changeset 0411363a0dc7 (bug 1334047) for bustage
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -4396,17 +4396,21 @@ nsDocument::SetScopeObject(nsIGlobalObje
       // We want to get the tabgroup unconditionally, such that we can make
       // certain that it is cached in the inner window early enough.
       mozilla::dom::TabGroup* tabgroup = window->TabGroup();
       // We should already have the principal, and now that we have been added to a
       // window, we should be able to join a DocGroup!
       nsAutoCString docGroupKey;
       nsresult rv =
         mozilla::dom::DocGroup::GetKey(NodePrincipal(), docGroupKey);
-      if (!mDocGroup) {
+      if (mDocGroup) {
+        if (NS_SUCCEEDED(rv)) {
+          MOZ_RELEASE_ASSERT(mDocGroup->MatchesKey(docGroupKey));
+        }
+      } else {
         mDocGroup = tabgroup->AddDocument(docGroupKey, this);
         MOZ_ASSERT(mDocGroup);
       }
     }
   }
 }
 
 static void