Bug 987007, part 3 - Remove the last use of JSRESOLVE_ASSIGNING from nsWindowSH. r=bz.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 25 Apr 2014 15:07:18 -0500
changeset 198838 d13dd65b4d04253587132162137923d1e1377206
parent 198837 cfe98fe62a8fb5138ed80d8d1024cb66687e6f8a
child 198839 96ed2ff9305d491bff11043641aa837e2078f6a7
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs987007
milestone31.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 987007, part 3 - Remove the last use of JSRESOLVE_ASSIGNING from nsWindowSH. r=bz.
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3250,21 +3250,16 @@ nsWindowSH::NewResolve(nsIXPConnectWrapp
       return NS_OK;
     }
   }
 
   // WebIDL quickstubs handle location for us, but Xrays don't see those.  So if
   // we're an Xray, we have to resolve stuff here to make "window.location =
   // someString" work.
   if (sLocation_id == id && isXray) {
-    // This must be done even if we're just getting the value of
-    // window.location (i.e. no checking flags & JSRESOLVE_ASSIGNING
-    // here) since we must define window.location to prevent the
-    // getter from being overriden (for security reasons).
-
     nsCOMPtr<nsIDOMLocation> location;
     nsresult rv = win->GetLocation(getter_AddRefs(location));
     NS_ENSURE_SUCCESS(rv, rv);
 
     JS::Rooted<JS::Value> v(cx);
     rv = WrapNative(cx, location, &NS_GET_IID(nsIDOMLocation), true, &v);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -3349,17 +3344,17 @@ nsWindowSH::NewResolve(nsIXPConnectWrapp
                                desc.attributes())) {
       return NS_ERROR_FAILURE;
     }
 
     *objp = obj;
     return NS_OK;
   }
 
-  if (!(flags & JSRESOLVE_ASSIGNING) && sDocument_id == id) {
+  if (sDocument_id == id) {
     nsCOMPtr<nsIDocument> document = win->GetDoc();
     JS::Rooted<JS::Value> v(cx);
     nsresult rv = WrapNative(cx, document, document,
                              &NS_GET_IID(nsIDOMDocument), &v, false);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // nsIDocument::WrapObject will handle defining the property.
     *objp = obj;