Bug 1250033 - DocShell shouldn't have any child when setting userContextId. r=sicking
authorYoshi Huang <allstars.chh@mozilla.com>
Fri, 06 May 2016 11:09:44 +0800
changeset 297649 abf706cbf6a2012e4133bf6ca5b89d6159d995e1
parent 297648 ae939276dc4e4d0e261030b7d3ae9e9e642956a9
child 297650 c637546f5eba53bb32de94a61980950a3d4800e4
push id76843
push useryhuang@mozilla.com
push dateTue, 17 May 2016 11:49:34 +0000
treeherdermozilla-inbound@abf706cbf6a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs1250033
milestone49.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 1250033 - DocShell shouldn't have any child when setting userContextId. r=sicking
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -14087,16 +14087,18 @@ nsDocShell::GetOriginAttributes(JSContex
   bool ok = ToJSValue(aCx, mOriginAttributes, aVal);
   NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
   return NS_OK;
 }
 
 void
 nsDocShell::SetOriginAttributes(const DocShellOriginAttributes& aAttrs)
 {
+  MOZ_ASSERT(mChildList.Length() == 0);
+
   // TODO: Bug 1273058 - mContentViewer should be null when setting origin
   // attributes.
   if (mContentViewer) {
     nsIDocument* doc = mContentViewer->GetDocument();
     if (doc) {
       nsIURI* uri = doc->GetDocumentURI();
       MOZ_ASSERT(uri);
       if (uri) {