Skip to content

Commit

Permalink
Relookup 'act' after potential side effect
Browse files Browse the repository at this point in the history
Caught by refzero finalizer torture.
  • Loading branch information
svaarala committed Aug 28, 2015
1 parent 1389322 commit d4ed1e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/duk_js_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ duk_int_t duk_handle_call(duk_hthread *thr,

/* [... func this arg1 ... argN envobj] */

act = thr->callstack + thr->callstack_top - 1;
act->lex_env = env;
act->var_env = env;
DUK_HOBJECT_INCREF(thr, env);
Expand Down Expand Up @@ -2426,6 +2427,7 @@ duk_bool_t duk_handle_ecma_call_setup(duk_hthread *thr,

/* [... arg1 ... argN envobj] */

act = thr->callstack + thr->callstack_top - 1;
act->lex_env = env;
act->var_env = env;
DUK_HOBJECT_INCREF(thr, act->lex_env);
Expand Down

0 comments on commit d4ed1e1

Please sign in to comment.