Must resolve standard classes even when assigning (568826, r=jorendorff).
authorAndreas Gal <gal@mozilla.com>
Sat, 29 May 2010 18:59:50 -0700
changeset 43210 92a66e7519b743d754459b7ff7c351ab3f7d6315
parent 43209 d52bf0cbc073d909138e2abb984e976e5194a0f8
child 43211 79c2b94a31e55cad2f1672091dc1706feab79b9b
push id13641
push userrsayre@mozilla.com
push dateSun, 06 Jun 2010 19:08:23 +0000
treeherdermozilla-central@5b3604a3cfbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs568826
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Must resolve standard classes even when assigning (568826, r=jorendorff).
js/src/shell/js.cpp
js/src/shell/jsworkers.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -4606,30 +4606,28 @@ global_enumerate(JSContext *cx, JSObject
 #endif
 }
 
 static JSBool
 global_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
                JSObject **objp)
 {
 #ifdef LAZY_STANDARD_CLASSES
-    if ((flags & JSRESOLVE_ASSIGNING) == 0) {
-        JSBool resolved;
-
-        if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
-            return JS_FALSE;
-        if (resolved) {
-            *objp = obj;
-            return JS_TRUE;
-        }
+    JSBool resolved;
+
+    if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
+        return JS_FALSE;
+    if (resolved) {
+        *objp = obj;
+        return JS_TRUE;
     }
 #endif
 
 #if defined(SHELL_HACK) && defined(DEBUG) && defined(XP_UNIX)
-    if ((flags & (JSRESOLVE_QUALIFIED | JSRESOLVE_ASSIGNING)) == 0) {
+    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;
         JSBool ok, found;
         JSFunction *fun;
--- a/js/src/shell/jsworkers.cpp
+++ b/js/src/shell/jsworkers.cpp
@@ -670,24 +670,23 @@ class Worker : public WorkerParent
         Worker *w = (Worker *) JS_GetContextPrivate(cx);
         JSAutoSuspendRequest suspend(cx);  // avoid nesting w->lock in a request
         return !w->checkTermination();
     }
 
     static JSBool jsResolveGlobal(JSContext *cx, JSObject *obj, jsval id, uintN flags,
                                   JSObject **objp)
     {
-        if ((flags & JSRESOLVE_ASSIGNING) == 0) {
-            JSBool resolved;
+        JSBool resolved;
 
-            if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
-                return false;
-            if (resolved)
-                *objp = obj;
-        }
+        if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
+            return false;
+        if (resolved)
+            *objp = obj;
+
         return true;
     }
 
     static JSBool jsPostMessageToParent(JSContext *cx, int argc, jsval *vp);
     static JSBool jsPostMessageToChild(JSContext *cx, int argc, jsval *vp);
     static JSBool jsTerminate(JSContext *cx, int argc, jsval *vp);
 
     bool checkTermination() {