Bug 982909 - Consistently use inner window when calling OpenJS. r=jst, r=mrbkap
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Thu, 13 Mar 2014 12:22:07 -0400
changeset 190620 e522b5f583eebf07c5ed560856250150f208b4f3
parent 190619 1fe2943ce1e3087eaccb5ce234fc240072ad0f31
child 190621 21ad5a22138200921bbb78e155c2a573974dfd57
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst, mrbkap
bugs982909
milestone30.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 982909 - Consistently use inner window when calling OpenJS. r=jst, r=mrbkap
content/html/document/src/nsHTMLDocument.cpp
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -1345,17 +1345,17 @@ nsHTMLDocument::Open(JSContext* /* unuse
                      const nsAString& aName,
                      const nsAString& aFeatures,
                      bool aReplace,
                      ErrorResult& rv)
 {
   NS_ASSERTION(nsContentUtils::CanCallerAccess(static_cast<nsIDOMHTMLDocument*>(this)),
                "XOW should have caught this!");
 
-  nsCOMPtr<nsIDOMWindow> window = GetWindow();
+  nsCOMPtr<nsIDOMWindow> window = GetInnerWindow();
   if (!window) {
     rv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
     return nullptr;
   }
   nsCOMPtr<nsIDOMJSWindow> win = do_QueryInterface(window);
   nsCOMPtr<nsIDOMWindow> newWindow;
   // XXXbz We ignore aReplace for now.
   rv = win->OpenJS(aURL, aName, aFeatures, getter_AddRefs(newWindow));