return JS_FALSE;
goto out;
Exception(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){    JSBool ok;    jsval pval;    int32 lineno;    JSString *message, *filename, *stack, *argsrc;    char *stackbp;    JSStackFrame *fp;    JSCheckAccessOp checkAccess;    JSErrorReporter older;    JSExceptionState *state;    jsval callerid, v;    uintN i;    if (!(cx->fp->flags & JSFRAME_CONSTRUCTING)) {        /*         * ECMA ed. 3, 15.11.1 requires Error, etc., to construct even when         * called as functions, without operator new.  But as we do not give         * each constructor a distinct JSClass, whose .name member is used by         * js_NewObject to find the class prototype, we must get the class         * prototype ourselves.         */        if (!OBJ_GET_PROPERTY(cx, JSVAL_TO_OBJECT(argv[-2]),                              (jsid)cx->runtime->atomState.classPrototypeAtom,                              &pval)) {            return JS_FALSE;        }        obj = js_NewObject(cx, &ExceptionClass, JSVAL_TO_OBJECT(pval), NULL);        if (!obj)            return JS_FALSE;        *rval = OBJECT_TO_JSVAL(obj);    }    /*     * If it's a new object of class Exception, then null out the private     * data so that the finalizer doesn't attempt to free it.     */    if (OBJ_GET_CLASS(cx, obj) == &ExceptionClass)        OBJ_SET_SLOT(cx, obj, JSSLOT_PRIVATE, JSVAL_VOID);    /* Set the 'message' property. */    if (argc != 0) {        message = js_ValueToString(cx, argv[0]);        if (!message)            return JS_FALSE;    } else {        message = cx->runtime->emptyString;    }    ok = JS_DefineProperty(cx, obj, js_message_str, STRING_TO_JSVAL(message),                           NULL, NULL, JSPROP_ENUMERATE);    if (!ok)        return JS_FALSE;    /* Set the 'fileName' property. */    if (argc > 1) {        filename = js_ValueToString(cx, argv[1]);        if (!filename)            return JS_FALSE;    } else {        filename = cx->runtime->emptyString;    }    ok = JS_DefineProperty(cx, obj, js_filename_str,                           STRING_TO_JSVAL(filename),                           NULL, NULL, JSPROP_ENUMERATE);    if (!ok)        return JS_FALSE;    /* Set the 'lineNumber' property. */    if (argc > 2) {        ok = js_ValueToInt32(cx, argv[2], &lineno);        if (!ok)            return JS_FALSE;    } else {        lineno = 0;    }    ok = JS_DefineProperty(cx, obj, js_lineno_str,                           INT_TO_JSVAL(lineno),                           NULL, NULL, JSPROP_ENUMERATE);    if (!ok)        return JS_FALSE;    /*     * Set the 'stack' property.  No early returns till label done!     * XXXbe ISO-Latin-1 identifiers and decompiled arguments only for now     */    stackbp = NULL;    checkAccess = cx->runtime->checkObjectAccess;    if (checkAccess) {        older = JS_SetErrorReporter(cx, NULL);        state = JS_SaveExceptionState(cx);    }#ifdef __GNUC__         /* suppress bogus gcc warnings */    else {        older = NULL;        state = NULL;    }#endif    callerid = ATOM_KEY(cx->runtime->atomState.callerAtom);    JS_ASSERT(cx->fp);    for (fp = cx->fp->down; fp; fp = fp->down) {        if (checkAccess) {            v = (fp->fun && fp->argv) ? fp->argv[-2] : JSVAL_NULL;            if (!JSVAL_IS_PRIMITIVE(v)) {                ok = checkAccess(cx, fp->fun->object, callerid, JSACC_READ, &v);                if (!ok) {                    ok = JS_TRUE;                    break;                }            }        }        stackbp = JS_sprintf_append(stackbp, "%s(",                                    (fp->fun && fp->fun->atom)                                    ? ATOM_BYTES(fp->fun->atom)                                    : "");        for (i = 0; i < fp->argc; i++) {            argsrc = js_ValueToSource(cx, fp->argv[i]);            if (!argsrc) {                JS_free(cx, stackbp);                stackbp = NULL;                ok = JS_FALSE;                goto done;            }            stackbp = JS_sprintf_append(stackbp, "%s%s",                                        (i > 0) ? "," : "",                                        JS_GetStringBytes(argsrc));        }        stackbp = JS_sprintf_append(stackbp, ")@%s:%u\n",                                    (fp->script && fp->script->filename)                                    ? fp->script->filename                                    : "",                                    (fp->script && fp->pc)                                    ? js_PCToLineNumber(fp->script, fp->pc)                                    : 0);        if (!stackbp) {            JS_ReportOutOfMemory(cx);            ok = JS_FALSE;            break;        }    }done:    if (checkAccess) {        if (ok)            JS_RestoreExceptionState(cx, state);        else            JS_DropExceptionState(cx, state);        JS_SetErrorReporter(cx, older);    }    if (!ok) {        JS_ASSERT(!stackbp);        return JS_FALSE;    }    if (!stackbp) {        stack = cx->runtime->emptyString;    } else {        stack = JS_NewString(cx, stackbp, strlen(stackbp));        if (!stack) {            free(stackbp);            return JS_FALSE;        }    }    ok = JS_DefineProperty(cx, obj, js_stack_str,                           STRING_TO_JSVAL(stack),                           NULL, NULL, JSPROP_ENUMERATE);    return ok;}