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
We must not work with the goja runtime when the browser module is running a promisified API call off the event loop i.e. on a new goroutine. All promisified APIs in the browser run in a new goroutine. A concrete example of such a case is with page.goto where it is parsing the goja values in the new goroutine, which should be moved to the mapping layer.
This issue only deals with the refactoring of the option and argument parsing, #1182 deals with the inner goja usage.
Why
The goja runtime is not thread safe and should only be accessed when running on the event loop. If this is not adhered to, it can cause panics during runtime.
How
The following is the list of all async/promisified APIs, check each one and ensure that the goja runtime is only accessed in the event loop thread and not in the new go routine.
The content you are editing has changed. Please copy your edits and refresh the page.
ankur22
changed the title
Goja runtime shouldn't be accessed inside of promise goroutine
Goja runtime shouldn't be accessed while parsing options in async APIs
Jan 24, 2024
inancgumus
changed the title
Goja runtime shouldn't be accessed while parsing options in async APIs
Sobek runtime shouldn't be accessed while parsing options in async APIs
Jun 21, 2024
What
We must not work with the goja runtime when the browser module is running a promisified API call off the event loop i.e. on a new goroutine. All promisified APIs in the browser run in a new goroutine. A concrete example of such a case is with page.goto where it is parsing the goja values in the new goroutine, which should be moved to the mapping layer.
This issue only deals with the refactoring of the option and argument parsing, #1182 deals with the inner goja usage.
Why
The goja runtime is not thread safe and should only be accessed when running on the event loop. If this is not adhered to, it can cause panics during runtime.
How
The following is the list of all async/promisified APIs, check each one and ensure that the goja runtime is only accessed in the event loop thread and not in the new go routine.
Tasks
elementHandle.click
#1169frame.click
promise #1172page.click
promise #1174frame.waitForFunction
promise #1180page.waitForFunction
promise #1181frame.waitForNavigation
promise #1184page.waitForNavigation
promise #1185browserContext.waitForEvent
promise #1187page.goBack
promise #1178Note
The text was updated successfully, but these errors were encountered: