summaryrefslogtreecommitdiff
path: root/runtime/js/98_global_scope_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/98_global_scope_worker.js')
-rw-r--r--runtime/js/98_global_scope_worker.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/js/98_global_scope_worker.js b/runtime/js/98_global_scope_worker.js
index 6b0ad480c..d43af4faf 100644
--- a/runtime/js/98_global_scope_worker.js
+++ b/runtime/js/98_global_scope_worker.js
@@ -1,7 +1,11 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { core, primordials } from "ext:core/mod.js";
-const ops = core.ops;
+const {
+ op_bootstrap_language,
+ op_bootstrap_numcpus,
+ op_bootstrap_user_agent,
+} = core.ensureFastOps(true);
const {
ObjectDefineProperties,
ObjectPrototypeIsPrototypeOf,
@@ -25,9 +29,9 @@ function memoizeLazy(f) {
};
}
-const numCpus = memoizeLazy(() => ops.op_bootstrap_numcpus());
-const userAgent = memoizeLazy(() => ops.op_bootstrap_user_agent());
-const language = memoizeLazy(() => ops.op_bootstrap_language());
+const numCpus = memoizeLazy(() => op_bootstrap_numcpus());
+const userAgent = memoizeLazy(() => op_bootstrap_user_agent());
+const language = memoizeLazy(() => op_bootstrap_language());
class WorkerNavigator {
constructor() {