You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I had an issue that Duktape.thread.yeild did not work by throwing the exception TypeError: invalid state. After some investigation it turned out that an Array.forEach (a native method) in the coroutine's stack prevented the yielding. By replacing the native forEach with a JS version yielding worked again.
With some analysis, all built-ins which take JS callbacks are not safe.
My question is, when I want to use Duktape coroutine and allow all ES5 facilitates, do I have to replace all such built-ins with JS implementation? Is there a list of them?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi there,
Recently I had an issue that Duktape.thread.yeild did not work by throwing the exception TypeError: invalid state. After some investigation it turned out that an Array.forEach (a native method) in the coroutine's stack prevented the yielding. By replacing the native forEach with a JS version yielding worked again.
With some analysis, all built-ins which take JS callbacks are not safe.
My question is, when I want to use Duktape coroutine and allow all ES5 facilitates, do I have to replace all such built-ins with JS implementation? Is there a list of them?
Thanks.
The text was updated successfully, but these errors were encountered: