Backed out changeset 6dcce4f4d9dd due to orange.
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);