Skip to content

Instantly share code, notes, and snippets.

@mykmelez
Created August 7, 2014 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykmelez/916e9d1c021a4033d85a to your computer and use it in GitHub Desktop.
Save mykmelez/916e9d1c021a4033d85a to your computer and use it in GitHub Desktop.
Native["com/sun/cldc/isolate/Isolate.waitStatus.(I)V"] = function(ctx, stack) {
var maxStatus = stack.pop(), _this = stack.pop();
var checkStatus = function() {
if (_this.status < maxStatus) {
window.setZeroTimeout(checkStatus);
} else {
ctx.resume();
}
};
if (_this.status < maxStatus) {
window.setZeroTimeout(checkStatus);
throw VM.Pause;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment