Bug 824217 - Make ChromeObjectWrapper::getPropertyDescriptor not pretend no descriptor exists when the property exists along the prototype chain, when the property is being resolved just before an assignment. r=bholley
authorJeff Walden <jwalden@mit.edu>
Thu, 03 Jan 2013 17:55:58 -0600
changeset 126795 0c549b6038ef7d857ec7555c320810b0c3ee3f16
parent 126794 b2df7d0c61d1a6c8dde14ed4e8c4f6dde5328cb4
child 126796 c72d0bbb5571b2b8225808e53c4aa96be5f95758
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs824217
milestone20.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 824217 - Make ChromeObjectWrapper::getPropertyDescriptor not pretend no descriptor exists when the property exists along the prototype chain, when the property is being resolved just before an assignment. r=bholley
js/xpconnect/wrappers/ChromeObjectWrapper.cpp
--- a/js/xpconnect/wrappers/ChromeObjectWrapper.cpp
+++ b/js/xpconnect/wrappers/ChromeObjectWrapper.cpp
@@ -38,21 +38,21 @@ ChromeObjectWrapper::getPropertyDescript
     }
 
     // If the property is something that can be found on a standard prototype,
     // prefer the one we'll get via the prototype chain in the content
     // compartment.
     if (desc->obj && PropIsFromStandardPrototype(cx, desc))
         desc->obj = NULL;
 
-    // If we found something, were doing a set, or have no proto, we're done.
+    // If we found something or have no proto, we're done.
     JSObject *wrapperProto;
     if (!JS_GetPrototype(cx, wrapper, &wrapperProto))
       return false;
-    if (desc->obj || (flags & JSRESOLVE_ASSIGNING) || !wrapperProto)
+    if (desc->obj || !wrapperProto)
         return true;
 
     // If not, try doing the lookup on the prototype.
     MOZ_ASSERT(js::IsObjectInContextCompartment(wrapper, cx));
     return JS_GetPropertyDescriptorById(cx, wrapperProto, id, 0, desc);
 }
 
 bool