Bug 554203 - remove dead code in JSOP_STOP (r=brendan)
authorLuke Wagner <lw@mozilla.com>
Tue, 23 Mar 2010 08:58:00 -0700
changeset 40342 776508642f3993f787ce8c075dd993c0d854a04b
parent 40341 6dcce4f4d9dd29b868168cde5384756d1aa53921
child 40344 afbfa51f81ed4fc30d140d038b4e1d9587036981
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)
reviewersbrendan
bugs554203
milestone1.9.3a3pre
Bug 554203 - remove dead code in JSOP_STOP (r=brendan)
js/src/jsops.cpp
--- 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);