mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Fix a stupid mistake where an error return would cause us to not destroy a script. no bug, r=brendan
This commit is contained in:
parent
07cb0c3299
commit
877666903d
@ -1266,10 +1266,9 @@ obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
*/
|
||||
ok = js_CheckPrincipalsAccess(cx, scopeobj, principals,
|
||||
cx->runtime->atomState.evalAtom);
|
||||
if (!ok)
|
||||
goto out;
|
||||
if (ok)
|
||||
ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
|
||||
|
||||
ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
|
||||
JS_DestroyScript(cx, script);
|
||||
|
||||
out:
|
||||
@ -2269,7 +2268,7 @@ js_FreeSlot(JSContext *cx, JSObject *obj, uint32 slot)
|
||||
#if JS_BUG_EMPTY_INDEX_ZERO
|
||||
#define CHECK_FOR_EMPTY_INDEX(id) \
|
||||
JS_BEGIN_MACRO \
|
||||
if (JSSTRING_LENGTH(_str) == 0) \
|
||||
if (JSSTRING_LENGTH(str_) == 0) \
|
||||
id = JSVAL_ZERO; \
|
||||
JS_END_MACRO
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user