diff options
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r-- | runtime/js/11_workers.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js index b08a5737e..e04690005 100644 --- a/runtime/js/11_workers.js +++ b/runtime/js/11_workers.js @@ -4,10 +4,11 @@ const core = globalThis.Deno.core; const ops = core.ops; const primordials = globalThis.__bootstrap.primordials; const { + ArrayPrototypeFilter, Error, ObjectPrototypeIsPrototypeOf, - StringPrototypeStartsWith, String, + StringPrototypeStartsWith, SymbolIterator, SymbolToStringTag, } = primordials; @@ -192,8 +193,9 @@ class Worker extends EventTarget { const event = new MessageEvent("message", { cancelable: false, data: message, - ports: transferables.filter((t) => - ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t) + ports: ArrayPrototypeFilter( + transferables, + (t) => ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t), ), }); this.dispatchEvent(event); |