Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)

This reverts commit 884143218f.
This commit is contained in:
Bartek Iwańczuk 2022-01-27 16:27:22 +01:00 committed by GitHub
parent 382a978859
commit f248e6f177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 658 additions and 1028 deletions

View file

@ -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);
}