Bug 599446, part 2 - Add missing case for non-function callees to assert (a=orange)
authorLuke Wagner <lw@mozilla.com>
Mon, 27 Sep 2010 13:09:48 -0700
changeset 54731 e005076ad7984354bbfe104970456d8fe119de93
parent 54730 95f5f23e16aff9371c6599ce73852515073ce3e7
child 54732 bc478d4ae805da2a3092f5adf7ff927e8abc92d0
push id16011
push userrsayre@mozilla.com
push dateWed, 29 Sep 2010 06:01:57 +0000
treeherdermozilla-central@d7e659b4f80c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersorange
bugs599446
milestone2.0b7pre
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 599446, part 2 - Add missing case for non-function callees to assert (a=orange)
js/src/jscntxtinlines.h
--- a/js/src/jscntxtinlines.h
+++ b/js/src/jscntxtinlines.h
@@ -676,17 +676,17 @@ CallJSNativeConstructor(JSContext *cx, j
      *
      * Proxies are exceptions to both rules: they can return primitives and
      * they allow content to return the callee.
      *
      * (new Object(Object)) returns the callee.
      */
     extern JSBool proxy_Construct(JSContext *, uintN, Value *);
     JS_ASSERT_IF(native != proxy_Construct &&
-                 callee->getFunctionPrivate()->u.n.clasp != &js_ObjectClass,
+                 (!callee->isFunction() || callee->getFunctionPrivate()->u.n.clasp != &js_ObjectClass),
                  !vp->isPrimitive() && callee != &vp[0].toObject());
 
     return true;
 }
 
 JS_ALWAYS_INLINE bool
 CallJSPropertyOp(JSContext *cx, js::PropertyOp op, JSObject *obj, jsid id, js::Value *vp)
 {