Bug 823283 - Remove all remaining uses of JSRESOLVE_QUALIFIED, and the few remaining tests (which were pretty much purely diagnostic). r=luke
authorJeff Walden <jwalden@mit.edu>
Sat, 15 Sep 2012 11:19:55 -0700
changeset 117112 268fe9874d9dfc3f883237c288578032eca04aeb
parent 117111 f9f27086d5de4f6a1035abdfa8339ea3f58c5398
child 117113 422309d2a0724da8f47365c3d49fa981abe4ca6a
push id20315
push userjwalden@mit.edu
push dateThu, 27 Dec 2012 17:36:05 +0000
treeherdermozilla-inbound@268fe9874d9d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs823283
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 823283 - Remove all remaining uses of JSRESOLVE_QUALIFIED, and the few remaining tests (which were pretty much purely diagnostic). r=luke
dom/bindings/Codegen.py
dom/bindings/DOMJSProxyHandler.cpp
js/src/ion/IonBuilder.cpp
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsfun.cpp
js/src/jsobj.cpp
js/src/jsproxy.cpp
js/src/methodjit/FastOps.cpp
js/src/shell/js.cpp
js/src/vm/ScopeObject.cpp
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCQuickStubs.cpp
js/xpconnect/wrappers/AccessCheck.cpp
js/xpconnect/wrappers/XrayWrapper.cpp
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -5831,17 +5831,17 @@ class CGDOMJSProxyHandler_getOwnProperty
                         CGIfWrapper(CGProxyNamedGetter(self.descriptor, templateValues),
                                     condition).define() +
                         "\n")
         else:
             namedGet = ""
 
         return setOrIndexedGet + """JSObject* expando;
 if (!xpc::WrapperFactory::IsXrayWrapper(proxy) && (expando = GetExpandoObject(proxy))) {
-  unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED;
+  unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0);
   if (!JS_GetPropertyDescriptorById(cx, expando, id, flags, desc)) {
     return false;
   }
   if (desc->obj) {
     // Pretend the property lives on the wrapper.
     desc->obj = proxy;
     return true;
   }
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -90,17 +90,17 @@ DOMProxyHandler::getPropertyDescriptor(J
   if (!js::GetObjectProto(cx, proxy, &proto)) {
     return false;
   }
   if (!proto) {
     desc->obj = NULL;
     return true;
   }
 
-  return JS_GetPropertyDescriptorById(cx, proto, id, JSRESOLVE_QUALIFIED, desc);
+  return JS_GetPropertyDescriptorById(cx, proto, id, 0, desc);
 }
 
 bool
 DOMProxyHandler::defineProperty(JSContext* cx, JSObject* proxy, jsid id,
                                 JSPropertyDescriptor* desc)
 {
   if ((desc->attrs & JSPROP_GETTER) && desc->setter == JS_StrictPropertyStub) {
     return JS_ReportErrorFlagsAndNumber(cx,
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -4555,17 +4555,17 @@ IonBuilder::jsop_initprop(HandleProperty
 
     if (!CanEffectlesslyCallLookupGenericOnObject(templateObject))
         return abort("INITPROP template object is special");
 
     RootedObject holder(cx);
     RootedShape shape(cx);
     RootedId id(cx, NameToId(name));
     bool res = LookupPropertyWithFlags(cx, templateObject, id,
-                                       JSRESOLVE_QUALIFIED, &holder, &shape);
+                                       0, &holder, &shape);
     if (!res)
         return false;
 
     if (!shape || holder != templateObject) {
         // JSOP_NEWINIT becomes an MNewObject without preconfigured properties.
         MInitProp *init = MInitProp::New(obj, name, value);
         current->add(init);
         return resumeAfter(init);
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3345,17 +3345,17 @@ JS_GetConstructor(JSContext *cx, JSObjec
 {
     RootedObject proto(cx, protoArg);
     RootedValue cval(cx);
 
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, proto);
     {
-        JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+        JSAutoResolveFlags rf(cx, 0);
 
         if (!JSObject::getProperty(cx, proto, proto, cx->names().constructor, &cval))
             return NULL;
     }
     if (!IsFunctionObject(cval)) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_NO_CONSTRUCTOR,
                              proto->getClass()->name);
         return NULL;
@@ -3592,17 +3592,17 @@ LookupResult(JSContext *cx, HandleObject
 JS_PUBLIC_API(JSBool)
 JS_LookupPropertyById(JSContext *cx, JSObject *objArg, jsid idArg, jsval *vp)
 {
     RootedId id(cx, idArg);
     RootedObject obj(cx, objArg);
     RootedObject obj2(cx);
     RootedShape prop(cx);
 
-    return LookupPropertyById(cx, obj, id, JSRESOLVE_QUALIFIED, &obj2, &prop) &&
+    return LookupPropertyById(cx, obj, id, 0, &obj2, &prop) &&
            LookupResult(cx, obj, obj2, id, prop, vp);
 }
 
 JS_PUBLIC_API(JSBool)
 JS_LookupElement(JSContext *cx, JSObject *objArg, uint32_t index, jsval *vp)
 {
     RootedObject obj(cx, objArg);
     CHECK_REQUEST(cx);
@@ -3663,17 +3663,17 @@ JS_LookupPropertyWithFlags(JSContext *cx
 
 JS_PUBLIC_API(JSBool)
 JS_HasPropertyById(JSContext *cx, JSObject *objArg, jsid idArg, JSBool *foundp)
 {
     RootedObject obj(cx, objArg);
     RootedId id(cx, idArg);
     RootedObject obj2(cx);
     RootedShape prop(cx);
-    JSBool ok = LookupPropertyById(cx, obj, id, JSRESOLVE_QUALIFIED, &obj2, &prop);
+    JSBool ok = LookupPropertyById(cx, obj, id, 0, &obj2, &prop);
     *foundp = (prop != NULL);
     return ok;
 }
 
 JS_PUBLIC_API(JSBool)
 JS_HasElement(JSContext *cx, JSObject *objArg, uint32_t index, JSBool *foundp)
 {
     RootedObject obj(cx, objArg);
@@ -3709,17 +3709,17 @@ JS_AlreadyHasOwnPropertyById(JSContext *
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj, id);
 
     if (!obj->isNative()) {
         RootedObject obj2(cx);
         RootedShape prop(cx);
 
-        if (!LookupPropertyById(cx, obj, id, JSRESOLVE_QUALIFIED, &obj2, &prop))
+        if (!LookupPropertyById(cx, obj, id, 0, &obj2, &prop))
             return JS_FALSE;
         *foundp = (obj == obj2);
         return JS_TRUE;
     }
 
     *foundp = obj->nativeContains(cx, id);
     return JS_TRUE;
 }
@@ -3833,17 +3833,17 @@ DefinePropertyById(JSContext *cx, Handle
     assertSameCompartment(cx, obj, id, value,
                             (attrs & JSPROP_GETTER)
                             ? JS_FUNC_TO_DATA_PTR(JSObject *, getter)
                             : NULL,
                             (attrs & JSPROP_SETTER)
                             ? JS_FUNC_TO_DATA_PTR(JSObject *, setter)
                             : NULL);
 
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
     if (flags != 0 && obj->isNative()) {
         return DefineNativeProperty(cx, obj, id, value, getter, setter,
                                     attrs, flags, tinyid);
     }
     return JSObject::defineGeneric(cx, obj, id, value, getter, setter, attrs);
 }
 
 JS_PUBLIC_API(JSBool)
@@ -4087,17 +4087,17 @@ JS_GetPropertyDescriptorById(JSContext *
 JS_PUBLIC_API(JSBool)
 JS_GetPropertyAttrsGetterAndSetterById(JSContext *cx, JSObject *objArg, jsid idArg,
                                        unsigned *attrsp, JSBool *foundp,
                                        JSPropertyOp *getterp, JSStrictPropertyOp *setterp)
 {
     RootedObject obj(cx, objArg);
     RootedId id(cx, idArg);
     AutoPropertyDescriptorRooter desc(cx);
-    if (!GetPropertyDescriptorById(cx, obj, id, JSRESOLVE_QUALIFIED, JS_FALSE, &desc))
+    if (!GetPropertyDescriptorById(cx, obj, id, 0, JS_FALSE, &desc))
         return false;
 
     *attrsp = desc.attrs;
     *foundp = (desc.obj != NULL);
     if (getterp)
         *getterp = desc.getter;
     if (setterp)
         *setterp = desc.setter;
@@ -4159,17 +4159,17 @@ JS_GetOwnPropertyDescriptor(JSContext *c
 }
 
 static JSBool
 SetPropertyAttributesById(JSContext *cx, HandleObject obj, HandleId id, unsigned attrs, JSBool *foundp)
 {
     RootedObject obj2(cx);
     RootedShape shape(cx);
 
-    if (!LookupPropertyById(cx, obj, id, JSRESOLVE_QUALIFIED, &obj2, &shape))
+    if (!LookupPropertyById(cx, obj, id, 0, &obj2, &shape))
         return false;
     if (!shape || obj != obj2) {
         *foundp = false;
         return true;
     }
     JSBool ok = obj->isNative()
                 ? JSObject::changePropertyAttributes(cx, obj, shape, attrs)
                 : JSObject::setGenericAttributes(cx, obj, id, &attrs);
@@ -4210,17 +4210,17 @@ JS_ForwardGetPropertyTo(JSContext *cx, J
     RootedObject obj(cx, objArg);
     RootedObject onBehalfOf(cx, onBehalfOfArg);
     RootedId id(cx, idArg);
 
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj, id);
     assertSameCompartment(cx, onBehalfOf);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     RootedValue value(cx);
     if (!JSObject::getGeneric(cx, obj, onBehalfOf, id, &value))
         return false;
 
     *vp = value;
     return true;
 }
@@ -4249,17 +4249,17 @@ JS_GetElement(JSContext *cx, JSObject *o
 JS_PUBLIC_API(JSBool)
 JS_ForwardGetElementTo(JSContext *cx, JSObject *objArg, uint32_t index, JSObject *onBehalfOfArg, jsval *vp)
 {
     RootedObject obj(cx, objArg);
     RootedObject onBehalfOf(cx, onBehalfOfArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     RootedValue value(cx);
     if (!JSObject::getElement(cx, obj, onBehalfOf, index, &value))
         return false;
 
     *vp = value;
     return true;
 }
@@ -4267,17 +4267,17 @@ JS_ForwardGetElementTo(JSContext *cx, JS
 JS_PUBLIC_API(JSBool)
 JS_GetElementIfPresent(JSContext *cx, JSObject *objArg, uint32_t index, JSObject *onBehalfOfArg, jsval *vp, JSBool* present)
 {
     RootedObject obj(cx, objArg);
     RootedObject onBehalfOf(cx, onBehalfOfArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     RootedValue value(cx);
     bool isPresent;
     if (!JSObject::getElementIfPresent(cx, obj, onBehalfOf, index, &value, &isPresent))
         return false;
 
     *vp = value;
     *present = isPresent;
@@ -4338,34 +4338,34 @@ JS_GetMethod(JSContext *cx, JSObject *ob
 JS_PUBLIC_API(JSBool)
 JS_SetPropertyById(JSContext *cx, JSObject *objArg, jsid idArg, jsval *vp)
 {
     RootedObject obj(cx, objArg);
     RootedId id(cx, idArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj, id);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED | JSRESOLVE_ASSIGNING);
+    JSAutoResolveFlags rf(cx, JSRESOLVE_ASSIGNING);
 
     RootedValue value(cx, *vp);
     if (!JSObject::setGeneric(cx, obj, obj, id, &value, false))
         return false;
 
     *vp = value;
     return true;
 }
 
 JS_PUBLIC_API(JSBool)
 JS_SetElement(JSContext *cx, JSObject *objArg, uint32_t index, jsval *vp)
 {
     RootedObject obj(cx, objArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj, *vp);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED | JSRESOLVE_ASSIGNING);
+    JSAutoResolveFlags rf(cx, JSRESOLVE_ASSIGNING);
 
     RootedValue value(cx, *vp);
     if (!JSObject::setElement(cx, obj, obj, index, &value, false))
         return false;
 
     *vp = value;
     return true;
 }
@@ -4388,17 +4388,17 @@ JS_SetUCProperty(JSContext *cx, JSObject
 
 JS_PUBLIC_API(JSBool)
 JS_DeletePropertyById2(JSContext *cx, JSObject *objArg, jsid id, jsval *rval)
 {
     RootedObject obj(cx, objArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj, id);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     RootedValue value(cx);
 
     if (JSID_IS_SPECIAL(id)) {
         Rooted<SpecialId> sid(cx, JSID_TO_SPECIALID(id));
         if (!JSObject::deleteSpecial(cx, obj, sid, &value, false))
             return false;
     } else {
@@ -4412,33 +4412,33 @@ JS_DeletePropertyById2(JSContext *cx, JS
 
 JS_PUBLIC_API(JSBool)
 JS_DeleteElement2(JSContext *cx, JSObject *objArg, uint32_t index, jsval *rval)
 {
     RootedObject obj(cx, objArg);
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     RootedValue value(cx);
     if (!JSObject::deleteElement(cx, obj, index, &value, false))
         return false;
 
     *rval = value;
     return true;
 }
 
 JS_PUBLIC_API(JSBool)
 JS_DeleteProperty2(JSContext *cx, JSObject *objArg, const char *name, jsval *rval)
 {
     RootedObject obj(cx, objArg);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     JSAtom *atom = Atomize(cx, name, strlen(name));
     if (!atom)
         return false;
 
     RootedValue value(cx);
     if (!JSObject::deleteByValue(cx, obj, StringValue(atom), &value, false))
         return false;
@@ -4448,17 +4448,17 @@ JS_DeleteProperty2(JSContext *cx, JSObje
 }
 
 JS_PUBLIC_API(JSBool)
 JS_DeleteUCProperty2(JSContext *cx, JSObject *objArg, const jschar *name, size_t namelen, jsval *rval)
 {
     RootedObject obj(cx, objArg);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     JSAtom *atom = AtomizeChars(cx, name, AUTO_NAMELEN(name, namelen));
     if (!atom)
         return false;
 
     RootedValue value(cx);
     if (!JSObject::deleteByValue(cx, obj, StringValue(atom), &value, false))
         return false;
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1831,17 +1831,16 @@ typedef JSBool
  * NB: JSNewResolveOp provides a cheaper way to resolve lazy properties.
  */
 typedef JSBool
 (* JSResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id);
 
 /*
  * Like JSResolveOp, but flags provide contextual information as follows:
  *
- *  JSRESOLVE_QUALIFIED   a qualified property id: obj.id or obj[id], not id
  *  JSRESOLVE_ASSIGNING   obj[id] is on the left-hand side of an assignment
  *
  * The *objp out parameter, on success, should be null to indicate that id
  * was not resolved; and non-null, referring to obj or one of its prototypes,
  * if id was resolved.  The hook may assume *objp is null on entry.
  *
  * This hook instead of JSResolveOp is called via the JSClass.resolve member
  * if JSCLASS_NEW_RESOLVE is set in JSClass.flags.
@@ -4225,18 +4224,17 @@ extern JS_PUBLIC_API(JSBool)
 JS_ValueToId(JSContext *cx, jsval v, jsid *idp);
 
 extern JS_PUBLIC_API(JSBool)
 JS_IdToValue(JSContext *cx, jsid id, jsval *vp);
 
 /*
  * JSNewResolveOp flag bits.
  */
-#define JSRESOLVE_QUALIFIED     0x01    /* resolve a qualified property id */
-#define JSRESOLVE_ASSIGNING     0x02    /* resolve on the left of assignment */
+#define JSRESOLVE_ASSIGNING     0x01    /* resolve on the left of assignment */
 
 /*
  * Invoke the [[DefaultValue]] hook (see ES5 8.6.2) with the provided hint on
  * the specified object, computing a primitive default value for the object.
  * The hint must be JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_VOID (no hint).  On
  * success the resulting value is stored in *vp.
  */
 extern JS_PUBLIC_API(JSBool)
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -206,32 +206,32 @@ fun_enumerate(JSContext *cx, HandleObjec
 {
     JS_ASSERT(obj->isFunction());
 
     RootedId id(cx);
     bool found;
 
     if (!obj->isBoundFunction()) {
         id = NameToId(cx->names().classPrototype);
-        if (!JSObject::hasProperty(cx, obj, id, &found, JSRESOLVE_QUALIFIED))
+        if (!JSObject::hasProperty(cx, obj, id, &found, 0))
             return false;
     }
 
     id = NameToId(cx->names().length);
-    if (!JSObject::hasProperty(cx, obj, id, &found, JSRESOLVE_QUALIFIED))
+    if (!JSObject::hasProperty(cx, obj, id, &found, 0))
         return false;
 
     id = NameToId(cx->names().name);
-    if (!JSObject::hasProperty(cx, obj, id, &found, JSRESOLVE_QUALIFIED))
+    if (!JSObject::hasProperty(cx, obj, id, &found, 0))
         return false;
 
     for (unsigned i = 0; i < ArrayLength(poisonPillProps); i++) {
         const uint16_t offset = poisonPillProps[i];
         id = NameToId(OFFSET_TO_NAME(cx->runtime, offset));
-        if (!JSObject::hasProperty(cx, obj, id, &found, JSRESOLVE_QUALIFIED))
+        if (!JSObject::hasProperty(cx, obj, id, &found, 0))
             return false;
     }
 
     return true;
 }
 
 static JSObject *
 ResolveInterpretedFunctionPrototype(JSContext *cx, HandleObject obj)
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -135,17 +135,17 @@ js::InformalValueTypeName(const Value &v
         return "undefined";
     return "value";
 }
 
 JSBool
 js_HasOwnProperty(JSContext *cx, LookupGenericOp lookup, HandleObject obj, HandleId id,
                   MutableHandleObject objp, MutableHandleShape propp)
 {
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
     if (lookup) {
         if (!lookup(cx, obj, id, objp, propp))
             return false;
     } else {
         if (!baseops::LookupProperty(cx, obj, id, objp, propp))
             return false;
     }
     if (!propp)
@@ -323,17 +323,17 @@ js::GetFirstArgumentAsObject(JSContext *
 
     objp.set(&v.toObject());
     return true;
 }
 
 static bool
 HasProperty(JSContext *cx, HandleObject obj, HandleId id, MutableHandleValue vp, bool *foundp)
 {
-    if (!JSObject::hasProperty(cx, obj, id, foundp, JSRESOLVE_QUALIFIED))
+    if (!JSObject::hasProperty(cx, obj, id, foundp, 0))
         return false;
     if (!*foundp) {
         vp.setUndefined();
         return true;
     }
 
     /*
      * We must go through the method read barrier in case id is 'get' or 'set'.
@@ -1515,21 +1515,18 @@ js_InferFlags(JSContext *cx, unsigned de
      * We intentionally want to look across compartment boundaries to correctly
      * handle the case of cross-compartment property access.
      */
     jsbytecode *pc;
     UnrootedScript script = cx->stack.currentScript(&pc, ContextStack::ALLOW_CROSS_COMPARTMENT);
     if (!script)
         return defaultFlags;
 
-    const JSCodeSpec *cs = &js_CodeSpec[*pc];
-    uint32_t format = cs->format;
+    uint32_t format = js_CodeSpec[*pc].format;
     unsigned flags = 0;
-    if (JOF_MODE(format) != JOF_NAME)
-        flags |= JSRESOLVE_QUALIFIED;
     if (format & JOF_SET)
         flags |= JSRESOLVE_ASSIGNING;
     return flags;
 }
 
 /* static */ JSBool
 JSObject::nonNativeSetProperty(JSContext *cx, HandleObject obj,
                                HandleId id, MutableHandleValue vp, JSBool strict)
@@ -3439,31 +3436,31 @@ baseops::GetElement(JSContext *cx, Handl
 }
 
 JSBool
 baseops::GetPropertyDefault(JSContext *cx, HandleObject obj, HandleId id, HandleValue def,
                             MutableHandleValue vp)
 {
     RootedShape prop(cx);
     RootedObject obj2(cx);
-    if (!LookupPropertyWithFlags(cx, obj, id, JSRESOLVE_QUALIFIED, &obj2, &prop))
+    if (!LookupPropertyWithFlags(cx, obj, id, 0, &obj2, &prop))
         return false;
 
     if (!prop) {
         vp.set(def);
         return true;
     }
 
     return baseops::GetProperty(cx, obj2, id, vp);
 }
 
 JSBool
 js::GetMethod(JSContext *cx, HandleObject obj, HandleId id, unsigned getHow, MutableHandleValue vp)
 {
-    JSAutoResolveFlags rf(cx, JSRESOLVE_QUALIFIED);
+    JSAutoResolveFlags rf(cx, 0);
 
     GenericIdOp op = obj->getOps()->getGeneric;
     if (!op) {
 #if JS_HAS_XML_SUPPORT
         JS_ASSERT(!obj->isXML());
 #endif
         return GetPropertyHelper(cx, obj, id, getHow, vp);
     }
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -374,17 +374,17 @@ BaseProxyHandler::getPrototypeOf(JSConte
 
 
 bool
 DirectProxyHandler::getPropertyDescriptor(JSContext *cx, JSObject *proxy,
                                           jsid id, bool set,
                                           PropertyDescriptor *desc)
 {
     RootedObject target(cx, GetProxyTargetObject(proxy));
-    return JS_GetPropertyDescriptorById(cx, target, id, JSRESOLVE_QUALIFIED, desc);
+    return JS_GetPropertyDescriptorById(cx, target, id, 0, desc);
 }
 
 static bool
 GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, jsid id, unsigned flags,
                          JSPropertyDescriptor *desc)
 {
     // If obj is a proxy, we can do better than just guessing. This is
     // important for certain types of wrappers that wrap other wrappers.
@@ -401,17 +401,17 @@ GetOwnPropertyDescriptor(JSContext *cx, 
 }
 
 bool
 DirectProxyHandler::getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy,
                                              jsid id, bool set,
                                              PropertyDescriptor *desc)
 {
     RootedObject target(cx, GetProxyTargetObject(proxy));
-    return GetOwnPropertyDescriptor(cx, target, id, JSRESOLVE_QUALIFIED, desc);
+    return GetOwnPropertyDescriptor(cx, target, id, 0, desc);
 }
 
 bool
 DirectProxyHandler::defineProperty(JSContext *cx, JSObject *proxy, jsid id_,
                                    PropertyDescriptor *desc)
 {
     RootedObject obj(cx, GetProxyTargetObject(proxy));
     Rooted<jsid> id(cx, id_);
@@ -541,17 +541,17 @@ DirectProxyHandler::has(JSContext *cx, J
     return true;
 }
 
 bool
 DirectProxyHandler::hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp)
 {
     RootedObject target(cx, GetProxyTargetObject(proxy));
     AutoPropertyDescriptorRooter desc(cx);
-    if (!JS_GetPropertyDescriptorById(cx, target, id, JSRESOLVE_QUALIFIED, &desc))
+    if (!JS_GetPropertyDescriptorById(cx, target, id, 0, &desc))
         return false;
     *bp = (desc.obj == target);
     return true;
 }
 
 bool
 DirectProxyHandler::get(JSContext *cx, JSObject *proxy, JSObject *receiver_,
                         jsid id_, Value *vp)
@@ -1249,17 +1249,17 @@ IsSealed(JSContext* cx, HandleObject obj
     *bp = desc.obj && (desc.attrs & JSPROP_PERMANENT);
     return true;
 }
 
 static bool
 HasOwn(JSContext *cx, HandleObject obj, HandleId id, bool *bp)
 {
     AutoPropertyDescriptorRooter desc(cx);
-    if (!JS_GetPropertyDescriptorById(cx, obj, id, JSRESOLVE_QUALIFIED, &desc))
+    if (!JS_GetPropertyDescriptorById(cx, obj, id, 0, &desc))
         return false;
     *bp = (desc.obj == obj);
     return true;
 }
 
 static bool
 IdToValue(JSContext *cx, HandleId id, MutableHandleValue value)
 {
@@ -1582,17 +1582,17 @@ ScriptedDirectProxyHandler::getPropertyD
         return true;
     RootedObject proto(cx);
     if (!JSObject::getProto(cx, proxy, &proto))
         return false;
     if (!proto) {
         JS_ASSERT(!desc->obj);
         return true;
     }
-    return JS_GetPropertyDescriptorById(cx, proto, id, JSRESOLVE_QUALIFIED, desc);
+    return JS_GetPropertyDescriptorById(cx, proto, id, 0, desc);
 }
 
 bool
 ScriptedDirectProxyHandler::getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy_, jsid id_,
                                                      bool set, PropertyDescriptor *desc)
 {
     RootedObject proxy(cx, proxy_);
     RootedId id(cx, id_);
@@ -2206,18 +2206,17 @@ Proxy::getPropertyDescriptor(JSContext *
     BaseProxyHandler *handler = GetProxyHandler(proxy);
     if (!handler->hasPrototype())
         return handler->getPropertyDescriptor(cx, proxy, id, set, desc);
     if (!handler->getOwnPropertyDescriptor(cx, proxy, id, set, desc))
         return false;
     if (desc->obj)
         return true;
     INVOKE_ON_PROTOTYPE(cx, handler, proxy,
-                        JS_GetPropertyDescriptorById(cx, proto, id,
-                                                     JSRESOLVE_QUALIFIED, desc));
+                        JS_GetPropertyDescriptorById(cx, proto, id, 0, desc));
 }
 
 bool
 Proxy::getPropertyDescriptor(JSContext *cx, JSObject *proxy_, jsid id, bool set, Value *vp)
 {
     JS_CHECK_RECURSION(cx, return false);
     RootedObject proxy(cx, proxy_);
     AutoPropertyDescriptorRooter desc(cx);
@@ -2393,17 +2392,17 @@ Proxy::set(JSContext *cx, HandleObject p
     RootedObject proto(cx);
     if (handler->hasPrototype()) {
         // If we're using a prototype, we still want to use the proxy trap unless
         // we have a non-own property with a setter.
         bool hasOwn;
         AutoPropertyDescriptorRooter desc(cx);
         if (handler->hasOwn(cx, proxy, id, &hasOwn) && !hasOwn &&
             handler->getPrototypeOf(cx, proxy, proto.address()) && proto &&
-            JS_GetPropertyDescriptorById(cx, proto, id, JSRESOLVE_QUALIFIED, &desc) &&
+            JS_GetPropertyDescriptorById(cx, proto, id, 0, &desc) &&
             desc.obj && desc.setter)
         {
             return JSObject::setGeneric(cx, proto, receiver, id, vp, strict);
         } else if (cx->isExceptionPending()) {
             return false;
         }
     }
     return handler->set(cx, proxy, receiver, id, strict, vp.address());
--- a/js/src/methodjit/FastOps.cpp
+++ b/js/src/methodjit/FastOps.cpp
@@ -2487,17 +2487,17 @@ mjit::Compiler::jsop_initprop()
     }
 
     RootedObject holder(cx);
     RootedShape shape(cx);
     Rooted<jsid> id(cx, NameToId(name));
 #ifdef DEBUG
     bool res =
 #endif
-    LookupPropertyWithFlags(cx, baseobj, id, JSRESOLVE_QUALIFIED, &holder, &shape);
+    LookupPropertyWithFlags(cx, baseobj, id, 0, &holder, &shape);
     JS_ASSERT(res && shape && holder == baseobj);
 
     RegisterID objReg = frame.copyDataIntoReg(obj);
 
     /* Perform the store. */
     Address address = masm.objPropAddress(baseobj, objReg, shape->slot());
     frame.storeTo(fe, address);
     frame.freeReg(objReg);
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -2793,17 +2793,17 @@ resolver_enumerate(JSContext *cx, Handle
     jsval v = JS_GetReservedSlot(obj, 0);
     RootedObject referent(cx, JSVAL_TO_OBJECT(v));
 
     AutoIdArray ida(cx, JS_Enumerate(cx, referent));
     bool ok = !!ida;
     RootedObject ignore(cx);
     for (size_t i = 0; ok && i < ida.length(); i++) {
         Rooted<jsid> id(cx, ida[i]);
-        ok = CopyProperty(cx, obj, referent, id, JSRESOLVE_QUALIFIED, &ignore);
+        ok = CopyProperty(cx, obj, referent, id, 0, &ignore);
     }
     return ok;
 }
 
 static JSClass resolver_class = {
     "resolver",
     JSCLASS_NEW_RESOLVE | JSCLASS_HAS_RESERVED_SLOTS(1),
     JS_PropertyStub,   JS_PropertyStub,
@@ -4190,19 +4190,18 @@ its_enumerate(JSContext *cx, HandleObjec
 }
 
 static JSBool
 its_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
             MutableHandleObject objp)
 {
     if (its_noisy) {
         IdStringifier idString(cx, id);
-        fprintf(gOutFile, "resolving its property %s, flags {%s,%s}\n",
+        fprintf(gOutFile, "resolving its property %s, flags {%s}\n",
                idString.getBytes(),
-               (flags & JSRESOLVE_QUALIFIED) ? "qualified" : "",
                (flags & JSRESOLVE_ASSIGNING) ? "assigning" : "");
     }
     return true;
 }
 
 static JSBool
 its_convert(JSContext *cx, HandleObject obj, JSType type, MutableHandleValue vp)
 {
@@ -4441,64 +4440,62 @@ global_resolve(JSContext *cx, HandleObje
         return false;
     if (resolved) {
         objp.set(obj);
         return true;
     }
 #endif
 
 #if defined(SHELL_HACK) && defined(DEBUG) && defined(XP_UNIX)
-    if (!(flags & JSRESOLVE_QUALIFIED)) {
-        /*
-         * Do this expensive hack only for unoptimized Unix builds, which are
-         * not used for benchmarking.
-         */
-        char *path, *comp, *full;
-        const char *name;
-        bool ok, found;
-        JSFunction *fun;
-
-        if (!JSVAL_IS_STRING(id))
-            return true;
-        path = getenv("PATH");
-        if (!path)
-            return true;
-        path = JS_strdup(cx, path);
-        if (!path)
-            return false;
-        JSAutoByteString name(cx, JSVAL_TO_STRING(id));
-        if (!name)
-            return false;
-        ok = true;
-        for (comp = strtok(path, ":"); comp; comp = strtok(NULL, ":")) {
-            if (*comp != '\0') {
-                full = JS_smprintf("%s/%s", comp, name.ptr());
-                if (!full) {
-                    JS_ReportOutOfMemory(cx);
-                    ok = false;
-                    break;
-                }
-            } else {
-                full = (char *)name;
-            }
-            found = (access(full, X_OK) == 0);
-            if (*comp != '\0')
-                free(full);
-            if (found) {
-                fun = JS_DefineFunction(cx, obj, name, Exec, 0,
-                                        JSPROP_ENUMERATE);
-                ok = (fun != NULL);
-                if (ok)
-                    objp.set(obj);
+    /*
+     * Do this expensive hack only for unoptimized Unix builds, which are
+     * not used for benchmarking.
+     */
+    char *path, *comp, *full;
+    const char *name;
+    bool ok, found;
+    JSFunction *fun;
+
+    if (!JSVAL_IS_STRING(id))
+        return true;
+    path = getenv("PATH");
+    if (!path)
+        return true;
+    path = JS_strdup(cx, path);
+    if (!path)
+        return false;
+    JSAutoByteString name(cx, JSVAL_TO_STRING(id));
+    if (!name)
+        return false;
+    ok = true;
+    for (comp = strtok(path, ":"); comp; comp = strtok(NULL, ":")) {
+        if (*comp != '\0') {
+            full = JS_smprintf("%s/%s", comp, name.ptr());
+            if (!full) {
+                JS_ReportOutOfMemory(cx);
+                ok = false;
                 break;
             }
+        } else {
+            full = (char *)name;
         }
-        JS_free(cx, path);
-        return ok;
+        found = (access(full, X_OK) == 0);
+        if (*comp != '\0')
+            free(full);
+        if (found) {
+            fun = JS_DefineFunction(cx, obj, name, Exec, 0,
+                                    JSPROP_ENUMERATE);
+            ok = (fun != NULL);
+            if (ok)
+                objp.set(obj);
+            break;
+        }
     }
+    JS_free(cx, path);
+    return ok;
 #else
     return true;
 #endif
 }
 
 JSClass global_class = {
     "global", JSCLASS_NEW_RESOLVE | JSCLASS_GLOBAL_FLAGS,
     JS_PropertyStub,  JS_PropertyStub,
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -1345,17 +1345,17 @@ class DebugScopeProxy : public BaseProxy
         if (handleUnaliasedAccess(cx, debugScope, scope, id, GET, &v)) {
             PodZero(desc);
             desc->obj = debugScope;
             desc->attrs = JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT;
             desc->value = v;
             return true;
         }
 
-        return JS_GetPropertyDescriptorById(cx, scope, id, JSRESOLVE_QUALIFIED, desc);
+        return JS_GetPropertyDescriptorById(cx, scope, id, 0, desc);
     }
 
     bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid idArg, Value *vp) MOZ_OVERRIDE
     {
         Rooted<DebugScopeObject*> debugScope(cx, &proxy->asDebugScope());
         Rooted<ScopeObject*> scope(cx, &proxy->asDebugScope().scope());
         RootedId id(cx, idArg);
 
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -3145,21 +3145,18 @@ bool
 xpc::SandboxProxyHandler::getPropertyDescriptor(JSContext *cx, JSObject *proxy,
                                                 jsid id_, bool set,
                                                 PropertyDescriptor *desc)
 {
     js::RootedObject obj(cx, wrappedObject(proxy));
     js::RootedId id(cx, id_);
 
     MOZ_ASSERT(js::GetObjectCompartment(obj) == js::GetObjectCompartment(proxy));
-    // XXXbz Not sure about the JSRESOLVE_QUALIFIED here, but we have
-    // no way to tell for sure whether to use it.
     if (!JS_GetPropertyDescriptorById(cx, obj, id,
-                                      (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED,
-                                      desc))
+                                      (set ? JSRESOLVE_ASSIGNING : 0), desc))
         return false;
 
     if (!desc->obj)
         return true; // No property, nothing to do
 
     // Now fix up the getter/setter/value as needed to be bound to desc->obj
     // Don't mess with holder_get and holder_set, though, because those rely on
     // the "vp is prefilled with the value in the slot" behavior that property
--- a/js/xpconnect/src/XPCQuickStubs.cpp
+++ b/js/xpconnect/src/XPCQuickStubs.cpp
@@ -150,17 +150,17 @@ LookupGetterOrSetter(JSContext *cx, JSBo
     JSObject *obj = JS_THIS_OBJECT(cx, vp);
     if (!obj)
         return false;
 
     jsval idval = JS_ARGV(cx, vp)[0];
     jsid id;
     JSPropertyDescriptor desc;
     if (!JS_ValueToId(cx, idval, &id) ||
-        !JS_GetPropertyDescriptorById(cx, obj, id, JSRESOLVE_QUALIFIED, &desc))
+        !JS_GetPropertyDescriptorById(cx, obj, id, 0, &desc))
         return false;
 
     // No property at all means no getters or setters possible.
     if (!desc.obj) {
         JS_SET_RVAL(cx, vp, JSVAL_VOID);
         return true;
     }
 
@@ -233,18 +233,17 @@ DefineGetterOrSetter(JSContext *cx, unsi
     if (!obj)
         return false;
     JSNative forward = wantGetter ? js::obj_defineGetter : js::obj_defineSetter;
     jsval idval = (argc >= 1) ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
     if (!JSVAL_IS_STRING(idval))
         return forward(cx, argc, vp);
 
     if (!JS_ValueToId(cx, idval, &id) ||
-        !JS_LookupPropertyWithFlagsById(cx, obj, id,
-                                        JSRESOLVE_QUALIFIED, &obj2, &v) ||
+        !JS_LookupPropertyWithFlagsById(cx, obj, id, 0, &obj2, &v) ||
         (obj2 &&
          !JS_GetPropertyAttrsGetterAndSetterById(cx, obj2, id, &attrs,
                                                  &found, &getter, &setter)))
         return false;
 
     // The property didn't exist, already has a getter or setter, or is not
     // our property, then just forward now.
     if (!obj2 ||
--- a/js/xpconnect/wrappers/AccessCheck.cpp
+++ b/js/xpconnect/wrappers/AccessCheck.cpp
@@ -387,17 +387,17 @@ ExposedPropertiesOnly::check(JSContext *
     if (!AccessCheck::subsumes(js::UnwrapObject(hallpass), wrappedObject)) {
         EnterAndThrow(cx, wrapper, "Invalid __exposedProps__");
         return false;
     }
 
     Access access = NO_ACCESS;
 
     JSPropertyDescriptor desc;
-    if (!JS_GetPropertyDescriptorById(cx, hallpass, id, JSRESOLVE_QUALIFIED, &desc)) {
+    if (!JS_GetPropertyDescriptorById(cx, hallpass, id, 0, &desc)) {
         return false; // Error
     }
     if (!desc.obj || !(desc.attrs & JSPROP_ENUMERATE))
         return false;
 
     if (!JSVAL_IS_STRING(desc.value)) {
         EnterAndThrow(cx, wrapper, "property must be a string");
         return false;
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -633,30 +633,27 @@ XPCWrappedNativeXrayTraits::resolveDOMCo
         return true;
 
     // Setting the current ResolvingId in non-shadowing mode. So for this id
     // Xray won't ignore DOM specific collection properties temporarily.
     AutoSetWrapperNotShadowing asw(wrapper);
 
     bool retval = true;
     JSObject *pobj = NULL;
-    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED;
+    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0);
     nsresult rv = wn->GetScriptableInfo()->GetCallback()->NewResolve(wn, cx, wrapper, id,
                                                                      flags, &pobj, &retval);
     if (NS_FAILED(rv)) {
         if (retval)
             XPCThrower::Throw(rv, cx);
         return false;
     }
 
-    if (pobj && !JS_GetPropertyDescriptorById(cx, holder, id,
-                                              JSRESOLVE_QUALIFIED, desc))
-    {
+    if (pobj && !JS_GetPropertyDescriptorById(cx, holder, id, 0, desc))
         return false;
-    }
 
     return true;
 }
 
 template <typename T>
 static bool
 Is(JSObject *wrapper)
 {
@@ -974,17 +971,17 @@ XPCWrappedNativeXrayTraits::resolveOwnPr
         else
             desc->getter = nodePrincipal_getter;
         desc->setter = NULL;
         desc->shortid = 0;
         desc->value = JSVAL_VOID;
         return true;
     }
 
-    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED;
+    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0);
     JSBool hasProp;
     if (!JS_HasPropertyById(cx, holder, id, &hasProp)) {
         return false;
     }
     if (!hasProp) {
         XPCWrappedNative *wn = getWN(wrapper);
 
         // Run the resolve hook of the wrapped native.
@@ -1322,17 +1319,17 @@ XrayWrapper<Base, Traits>::getPropertyDe
     typename Traits::ResolvingIdImpl resolving(wrapper, id);
 
     // Redirect access straight to the wrapper if we should be transparent.
     if (XrayUtils::IsTransparent(cx, wrapper)) {
         JSObject *obj = Traits::getTargetObject(wrapper);
         {
             JSAutoCompartment ac(cx, obj);
             if (!JS_GetPropertyDescriptorById(cx, obj, id,
-                                              (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED,
+                                              (set ? JSRESOLVE_ASSIGNING : 0),
                                               desc)) {
                 return false;
             }
         }
 
         if (desc->obj)
             desc->obj = wrapper;
         return JS_WrapPropertyDescriptor(cx, desc);
@@ -1363,17 +1360,17 @@ XrayWrapper<Base, Traits>::getPropertyDe
     }
 
     if (!Traits::singleton.resolveOwnProperty(cx, *this, wrapper, holder, id, set, desc))
         return false;
 
     if (desc->obj)
         return true;
 
-    if (!JS_GetPropertyDescriptorById(cx, holder, id, JSRESOLVE_QUALIFIED, desc))
+    if (!JS_GetPropertyDescriptorById(cx, holder, id, 0, desc))
         return false;
     if (desc->obj) {
         desc->obj = wrapper;
         return true;
     }
 
     // Nothing in the cache. Call through, and cache the result.
     if (!Traits::resolveNativeProperty(cx, wrapper, holder, id, set, desc))
@@ -1391,17 +1388,17 @@ XrayWrapper<Base, Traits>::getPropertyDe
         desc->getter = NULL;
         desc->setter = NULL;
         desc->shortid = 0;
         desc->value.setObject(*JS_GetFunctionObject(toString));
     }
 
     desc->obj = wrapper;
 
-    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED;
+    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0);
     return JS_DefinePropertyById(cx, holder, id, desc->value, desc->getter, desc->setter,
                                  desc->attrs) &&
            JS_GetPropertyDescriptorById(cx, holder, id, flags, desc);
 }
 
 template <typename Base, typename Traits>
 bool
 XrayWrapper<Base, Traits>::getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id,
@@ -1424,33 +1421,33 @@ XrayWrapper<Base, Traits>::getOwnPropert
     // NB: Nothing we do here acts on the wrapped native itself, so we don't
     // enter our policy.
     // Redirect access straight to the wrapper if we should be transparent.
     if (XrayUtils::IsTransparent(cx, wrapper)) {
         JSObject *obj = Traits::getTargetObject(wrapper);
         {
             JSAutoCompartment ac(cx, obj);
             if (!JS_GetPropertyDescriptorById(cx, obj, id,
-                                              (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED,
+                                              (set ? JSRESOLVE_ASSIGNING : 0),
                                               desc)) {
                 return false;
             }
         }
 
         desc->obj = (desc->obj == obj) ? wrapper : nullptr;
         return JS_WrapPropertyDescriptor(cx, desc);
     }
 
     if (!Traits::singleton.resolveOwnProperty(cx, *this, wrapper, holder, id, set, desc))
         return false;
 
     if (desc->obj)
         return true;
 
-    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED;
+    unsigned flags = (set ? JSRESOLVE_ASSIGNING : 0);
     if (!JS_GetPropertyDescriptorById(cx, holder, id, flags, desc))
         return false;
 
     // Pretend we found the property on the wrapper, not the holder.
     if (desc->obj)
         desc->obj = wrapper;
 
     return true;