+ /** can be paused */
+ public static void invokePauseable(JSFunction function) {
+ new JSContext(function, true).invoke(new JSArray());
+ }
+
+ /** cannot be paused */
+ public static void invokeTrap(JSTrap.JSTrappable t, Object key, Object value) {
+ JSFunction invoker = new JSFunction("trap invoker", 0, null);
+ invoker.add(-1, ByteCodes.PUT, null);
+ JSContext cx = new JSContext(invoker, false);
+ cx.stack.push(t);
+ cx.stack.push(key);
+ cx.stack.push(value);
+ cx.resume();
+ }