Bug 1220827 - Replace question comment in nsHTMLDocument::Open with an explanatory comment to explain why we create a new Window. r=smaug
authorJonathan Watt <jwatt@jwatt.org>
Mon, 05 Oct 2015 18:34:46 +0100
changeset 270886 cba6ff5bd32b3a08b5e80c4eaea030b883249939
parent 270885 696ea2cdc032d1d031decb9c8f45d938c23757a4
child 270887 78deef26b16b3a97c43d4920b83acd05b06076a4
push id18459
push usercbook@mozilla.com
push dateTue, 03 Nov 2015 11:14:32 +0000
treeherderb2g-inbound@09173d8e6694 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1220827
milestone45.0a1
Bug 1220827 - Replace question comment in nsHTMLDocument::Open with an explanatory comment to explain why we create a new Window. r=smaug
dom/html/nsHTMLDocument.cpp
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -1605,18 +1605,19 @@ nsHTMLDocument::Open(JSContext* cx,
     nsDocument* templateContentsOwner =
       static_cast<nsDocument*>(mTemplateContentsOwner.get());
 
     if (templateContentsOwner) {
       templateContentsOwner->mWillReparent = true;
     }
 #endif
 
-    // Should this pass true for aForceReuseInnerWindow?
-    rv = window->SetNewDocument(this, nullptr, false);
+    // Per spec, we pass false here so that a new Window is created.
+    rv = window->SetNewDocument(this, nullptr,
+                                /* aForceReuseInnerWindow */ false);
     if (rv.Failed()) {
       return nullptr;
     }
 
 #ifdef DEBUG
     if (templateContentsOwner) {
       templateContentsOwner->mWillReparent = willReparent;
     }