[JAEGER] Paper over unsynced undefineds in StrictlyEqual (bug 585220).
authorDavid Anderson <danderson@mozilla.com>
Wed, 11 Aug 2010 18:59:42 -0700
changeset 53388 49c88708325a7171d80a7b39ca7df98ab0a3bde1
parent 53387 f7cf2b7b79613a6f27033c130d637a1cfb3ea8a3
child 53389 0544369f47cdac3accd64a271f07e118efdac117
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs585220
milestone2.0b4pre
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
[JAEGER] Paper over unsynced undefineds in StrictlyEqual (bug 585220).
js/src/jsinterp.cpp
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -1097,16 +1097,18 @@ StrictlyEqual(JSContext *cx, const Value
     Value lval = lref, rval = rref;
     if (SameType(lval, rval)) {
         if (lval.isString())
             return js_EqualStrings(lval.toString(), rval.toString());
         if (lval.isDouble())
             return JSDOUBLE_COMPARE(lval.toDouble(), ==, rval.toDouble(), JS_FALSE);
         if (lval.isObject())
             return EqualObjects(cx, &lval.toObject(), &rval.toObject());
+        if (lval.isUndefined())
+                return true;
         return lval.payloadAsRawUint32() == rval.payloadAsRawUint32();
     }
 
     if (lval.isDouble() && rval.isInt32()) {
         double ld = lval.toDouble();
         double rd = rval.toInt32();
         return JSDOUBLE_COMPARE(ld, ==, rd, JS_FALSE);
     }