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
Then when I use the asyncify method and promise in the sandbox, an error will be reported. The following example:
_eval(` async function test(i){ log("start", i) await temp.getAsync(); const name = temp.name; log(i, name); } for( let i = 0; i < 2; i ++){ test(i) }`)
In another scenario, I changed it to await Promise.resolve(0).
_eval(` async function test(i){ log("start", i) await Promise.resolve(0); const name = temp.name; log(i, name); } for( let i = 0; i < 2; i ++){ test(i) }`)
When _eval was executed for the first time, no error was reported; another error was reported for the second execution.
Please help me how to deal with this problem. Many thanks.
The text was updated successfully, but these errors were encountered:
The reason the first example fails is because your call to executePendingJobs is re-entering the execution of the WASM module while it is suspended waiting on the name.get native promise, and during the re-entered executePendingJobs callback, you are trying to suspend on the next call to name.get.
I’m not sure what the issue is in the second example. Can you try it with the DEBUG variant and enable source maps? That would allow us to see a stack trace of the C code where the violation occurs.
Hello, thank you for providing this tool.
I'm having issues using asyncify and promises. The following code is an example of a usage scenario.
Then when I use the asyncify method and promise in the sandbox, an error will be reported. The following example:
In another scenario, I changed it to
await Promise.resolve(0)
.When
_eval
was executed for the first time, no error was reported; another error was reported for the second execution.Please help me how to deal with this problem. Many thanks.
The text was updated successfully, but these errors were encountered: