Bug 1131796. Don't parent the DOM proxy expando object to the proxy. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 13 Feb 2015 14:34:53 -0500
changeset 256324 1765edeb13797708645b2cbf1ba52a17be10e5d3
parent 256323 fbf882d57a13e0c04d3cf472c04e69b09bcf0479
child 256325 109959c7beed4f31095f031b9ae41077798d056f
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1131796
milestone38.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 1131796. Don't parent the DOM proxy expando object to the proxy. r=peterv
dom/bindings/DOMJSProxyHandler.cpp
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -107,19 +107,18 @@ DOMProxyHandler::EnsureExpandoObject(JSC
     expandoAndGeneration = static_cast<js::ExpandoAndGeneration*>(v.toPrivate());
     if (expandoAndGeneration->expando.isObject()) {
       return &expandoAndGeneration->expando.toObject();
     }
   } else {
     expandoAndGeneration = nullptr;
   }
 
-  JS::Rooted<JSObject*> parent(cx, js::GetObjectParent(obj));
   JS::Rooted<JSObject*> expando(cx,
-    JS_NewObjectWithGivenProto(cx, nullptr, JS::NullPtr(), parent));
+    JS_NewObjectWithGivenProto(cx, nullptr, JS::NullPtr()));
   if (!expando) {
     return nullptr;
   }
 
   nsISupports* native = UnwrapDOMObject<nsISupports>(obj);
   nsWrapperCache* cache;
   CallQueryInterface(native, &cache);
   if (expandoAndGeneration) {