summaryrefslogtreecommitdiff
path: root/runtime/js/11_workers.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 16:27:22 +0100
committerGitHub <noreply@github.com>2022-01-27 16:27:22 +0100
commitf248e6f1778dc26db91d3322de2ecca5d1aa9866 (patch)
tree46b1ff59091cc8d31ff67427173d3a0148734007 /runtime/js/11_workers.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
Diffstat (limited to 'runtime/js/11_workers.js')
-rw-r--r--runtime/js/11_workers.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js
index 80e85a3a1..4510004d6 100644
--- a/runtime/js/11_workers.js
+++ b/runtime/js/11_workers.js
@@ -5,7 +5,6 @@
const core = window.Deno.core;
const {
Error,
- ObjectPrototypeIsPrototypeOf,
StringPrototypeStartsWith,
String,
SymbolIterator,
@@ -17,11 +16,8 @@
const { serializePermissions } = window.__bootstrap.permissions;
const { log } = window.__bootstrap.util;
const { defineEventHandler } = window.__bootstrap.event;
- const {
- deserializeJsMessageData,
- serializeJsMessageData,
- MessagePortPrototype,
- } = window.__bootstrap.messagePort;
+ const { deserializeJsMessageData, serializeJsMessageData } =
+ window.__bootstrap.messagePort;
function createWorker(
specifier,
@@ -203,9 +199,7 @@
const event = new MessageEvent("message", {
cancelable: false,
data: message,
- ports: transferables.filter((t) =>
- ObjectPrototypeIsPrototypeOf(MessagePortPrototype, t)
- ),
+ ports: transferables.filter((t) => t instanceof MessagePort),
});
this.dispatchEvent(event);
}