Backed out changeset 6dcce4f4d9dd due to orange.
authorJason Orendorff <jorendorff@mozilla.com>
Tue, 23 Mar 2010 12:36:06 -0500
changeset 40344 afbfa51f81ed4fc30d140d038b4e1d9587036981
parent 40343 d6ece89eb98df462bb8bf18b8483b317928273ea (current diff)
parent 40342 776508642f3993f787ce8c075dd993c0d854a04b (diff)
child 40345 ac5ed50ad4da24c2cae44d2e2023c6a8c391b289
push id12610
push userrsayre@mozilla.com
push dateMon, 05 Apr 2010 17:26:41 +0000
treeherdermozilla-central@1942c0b4e101 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.3a3pre
backs out6dcce4f4d9dd29b868168cde5384756d1aa53921
Backed out changeset 6dcce4f4d9dd due to orange.
--- a/js/src/jsops.cpp
+++ b/js/src/jsops.cpp
@@ -212,26 +212,18 @@ BEGIN_CASE(JSOP_STOP)
         regs.pc = fp->imacpc + js_CodeSpec[*fp->imacpc].length;
         fp->imacpc = NULL;
         atoms = script->atomMap.vector;
         op = JSOp(*regs.pc);
         DO_OP();
     }
 
     JS_ASSERT(regs.sp == StackBase(fp));
-    if ((fp->flags & JSFRAME_CONSTRUCTING) &&
-        JSVAL_IS_PRIMITIVE(fp->rval)) {
-        if (!fp->fun) {
-            JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
-                                 JSMSG_BAD_NEW_RESULT,
-                                 js_ValueToPrintableString(cx, rval));
-            goto error;
-        }
+    if ((fp->flags & JSFRAME_CONSTRUCTING) && JSVAL_IS_PRIMITIVE(fp->rval))
         fp->rval = fp->thisv;
-    }
     ok = JS_TRUE;
     if (inlineCallCount)
   inline_return:
     {
         JSInlineFrame *ifp = (JSInlineFrame *) fp;
         void *hookData = ifp->hookData;
 
         JS_ASSERT(!fp->blockChain);