summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.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/99_main.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 5a4d7e989..ba2b36705 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -16,7 +16,6 @@ delete Object.prototype.__proto__;
ObjectDefineProperty,
ObjectDefineProperties,
ObjectFreeze,
- ObjectPrototypeIsPrototypeOf,
ObjectSetPrototypeOf,
PromiseResolve,
Symbol,
@@ -143,9 +142,7 @@ delete Object.prototype.__proto__;
const msgEvent = new MessageEvent("message", {
cancelable: false,
data: message,
- ports: transferables.filter((t) =>
- ObjectPrototypeIsPrototypeOf(messagePort.MessagePortPrototype, t)
- ),
+ ports: transferables.filter((t) => t instanceof MessagePort),
});
try {
@@ -314,7 +311,7 @@ delete Object.prototype.__proto__;
configurable: true,
enumerable: true,
get() {
- webidl.assertBranded(this, NavigatorPrototype);
+ webidl.assertBranded(this, Navigator);
return webgpu.gpu;
},
},
@@ -322,12 +319,11 @@ delete Object.prototype.__proto__;
configurable: true,
enumerable: true,
get() {
- webidl.assertBranded(this, NavigatorPrototype);
+ webidl.assertBranded(this, Navigator);
return numCpus;
},
},
});
- const NavigatorPrototype = Navigator.prototype;
class WorkerNavigator {
constructor() {
@@ -346,7 +342,7 @@ delete Object.prototype.__proto__;
configurable: true,
enumerable: true,
get() {
- webidl.assertBranded(this, WorkerNavigatorPrototype);
+ webidl.assertBranded(this, WorkerNavigator);
return webgpu.gpu;
},
},
@@ -354,12 +350,11 @@ delete Object.prototype.__proto__;
configurable: true,
enumerable: true,
get() {
- webidl.assertBranded(this, WorkerNavigatorPrototype);
+ webidl.assertBranded(this, WorkerNavigator);
return numCpus;
},
},
});
- const WorkerNavigatorPrototype = WorkerNavigator.prototype;
// https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope
const windowOrWorkerGlobalScope = {