diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-05-01 22:30:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 15:30:02 +0200 |
commit | 6728ad4203d731e555dabf89ec6157f113454ce6 (patch) | |
tree | 956dc2d403b5a6ef107c35cab1ccc259ad4d86a1 /runtime/js/99_main.js | |
parent | 94a148cdb6f7660518c75a3c20109bf64848f0f1 (diff) |
fix(core): Use primordials for methods (#18839)
I would like to get this change into Deno before merging
https://github.com/denoland/deno_lint/pull/1152
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 01cf2973c..854a0029e 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -12,27 +12,28 @@ const ops = core.ops; const internals = globalThis.__bootstrap.internals; const primordials = globalThis.__bootstrap.primordials; const { + ArrayPrototypeFilter, ArrayPrototypeIndexOf, + ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeShift, ArrayPrototypeSplice, - ArrayPrototypeMap, DateNow, Error, ErrorPrototype, - FunctionPrototypeCall, FunctionPrototypeBind, + FunctionPrototypeCall, ObjectAssign, - ObjectDefineProperty, ObjectDefineProperties, + ObjectDefineProperty, ObjectFreeze, ObjectPrototypeIsPrototypeOf, ObjectSetPrototypeOf, + PromisePrototypeThen, PromiseResolve, + SafeWeakMap, Symbol, SymbolIterator, - PromisePrototypeThen, - SafeWeakMap, TypeError, WeakMapPrototypeDelete, WeakMapPrototypeGet, @@ -147,8 +148,10 @@ async function pollForMessages() { const msgEvent = new event.MessageEvent("message", { cancelable: false, data: message, - ports: transferables.filter((t) => - ObjectPrototypeIsPrototypeOf(messagePort.MessagePortPrototype, t) + ports: ArrayPrototypeFilter( + transferables, + (t) => + ObjectPrototypeIsPrototypeOf(messagePort.MessagePortPrototype, t), ), }); |