I am using Continuations by using the "executeScriptWithContinuations"
and "resumeContinuation" functions.  I am trying to execute the
following JavaScript.

// Begin JavaScript

rhino.println("Begin");

var a1 = new Array(5);

rhino.pause();
rhino.println("Continued");

var a2 = new Array(5);  // Error thrown here

// End JavaScript

"rhino" is a Java class I pass to the "Scriptable" class using
"ScriptableObject.putProperty".  "rhino.pause()" is a Java function
whichs throws a "ContinuationPending" which I catch and pause the
JavaScript.  Then I resume the JavaScript using "resumeContinuation".

Now the problem is when I define a JavaScript array (var a2 = new Array
(5);) after executing "resumeContinuation".  I keep getting the
following error:

BAD FUNCTION ID=1 MASTER=org.mozilla.javascript.NativeArray

If I define a JavaScript array (var a1 = new Array(5);) after using
"executeScriptWithContinuations" it works fine.

Is there a bug in "resumeContinuation" that does not allow you to use
JavaScript arrays?
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to