diff --git a/gradle.properties b/gradle.properties index 0000fbf..2d27e7c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ project_group = me.topchetoeu project_name = jscript -project_version = 0.9.10-beta +project_version = 0.9.11-beta main_class = me.topchetoeu.jscript.utils.JScriptRepl diff --git a/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java b/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java index 48571a9..6b10d51 100644 --- a/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java +++ b/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java @@ -54,7 +54,7 @@ public class AsyncFunctionLib extends FunctionValue { public void onReject(EngineException err) { next(ctx, Values.NO_RETURN, err); } - }); + }.defer(ctx)); } } diff --git a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java index d913edb..3096f51 100644 --- a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java @@ -62,7 +62,7 @@ public class AsyncGeneratorLib { @Override public void onReject(EngineException err) { next(ctx, Values.NO_RETURN, Values.NO_RETURN, err); } - }); + }.defer(ctx)); } else if (state == 2) { var obj = new ObjectValue();