bug 432917: Replace "must flow through label" comments with statically-checkable macro. r=igor
This commit is contained in:
@@ -69,8 +69,8 @@
|
||||
#include "jsscope.h"
|
||||
#include "jsscript.h"
|
||||
#include "jsstr.h"
|
||||
|
||||
#include "jsdbgapi.h" /* whether or not JS_HAS_OBJ_WATCHPOINT */
|
||||
#include "jsstaticcheck.h"
|
||||
|
||||
#if JS_HAS_GENERATORS
|
||||
#include "jsiter.h"
|
||||
@@ -635,7 +635,7 @@ obj_toSource(JSContext *cx, uintN argc, jsval *vp)
|
||||
|
||||
JS_CHECK_RECURSION(cx, return JS_FALSE);
|
||||
|
||||
/* After this, control must flow through out: to exit. */
|
||||
MUST_FLOW_THROUGH("out");
|
||||
JS_PUSH_TEMP_ROOT(cx, 4, localroot, &tvr);
|
||||
|
||||
/* If outermost, we need parentheses to be an expression, not a block. */
|
||||
@@ -1235,6 +1235,7 @@ js_obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
}
|
||||
|
||||
/* From here on, control must exit through label out with ok set. */
|
||||
MUST_FLOW_THROUGH("out");
|
||||
if (!scopeobj) {
|
||||
#if JS_HAS_EVAL_THIS_SCOPE
|
||||
/* If obj.eval(str), emulate 'with (obj) eval(str)' in the caller. */
|
||||
@@ -2839,6 +2840,7 @@ js_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *proto,
|
||||
* this point, all control flow must exit through label out with obj set.
|
||||
*/
|
||||
JS_PUSH_SINGLE_TEMP_ROOT(cx, cval, &tvr);
|
||||
MUST_FLOW_THROUGH("out");
|
||||
|
||||
/*
|
||||
* If proto or parent are NULL, set them to Constructor.prototype and/or
|
||||
|
||||
Reference in New Issue
Block a user