mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
wasm: add support for js.FuncOf
This commit is contained in:
@@ -120,6 +120,9 @@ func setTaskPromisePtr(task *coroutine, value unsafe.Pointer) {
|
||||
// getTaskPromisePtr is a helper function to get the current .ptr field from a
|
||||
// coroutine promise.
|
||||
func getTaskPromisePtr(task *coroutine) unsafe.Pointer {
|
||||
if task == nil {
|
||||
blockingPanic()
|
||||
}
|
||||
return task.promise().ptr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user