Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: lazy bootstrap options - first pass #21164

Merged
merged 10 commits into from
Nov 13, 2023
Merged
Prev Previous commit
Next Next commit
x
  • Loading branch information
littledivy committed Nov 11, 2023
commit e0df3217704eda70746fbdb337dab9952ce6e63e
8 changes: 4 additions & 4 deletions runtime/js/98_global_scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,31 +226,31 @@ ObjectDefineProperties(WorkerNavigator.prototype, {
enumerable: true,
get() {
webidl.assertBranded(this, WorkerNavigatorPrototype);
return numCpus;
return numCpus();
},
},
userAgent: {
configurable: true,
enumerable: true,
get() {
webidl.assertBranded(this, WorkerNavigatorPrototype);
return userAgent;
return userAgent();
},
},
language: {
configurable: true,
enumerable: true,
get() {
webidl.assertBranded(this, WorkerNavigatorPrototype);
return language;
return language();
},
},
languages: {
configurable: true,
enumerable: true,
get() {
webidl.assertBranded(this, WorkerNavigatorPrototype);
return [language];
return [language()];
},
},
});
Expand Down
9 changes: 5 additions & 4 deletions runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ function bootstrapMainRuntime(runtimeOptions) {
5: target,
6: v8Version,
7: inspectFlag,
8: hasNodeModulesDir,
9: maybeBinaryNpmCommandName,
9: hasNodeModulesDir,
10: maybeBinaryNpmCommandName,
} = runtimeOptions;

performance.setTimeOrigin(DateNow());
Expand Down Expand Up @@ -590,8 +590,9 @@ function bootstrapWorkerRuntime(
4: unstableFeatures,
5: target,
6: v8Version,
8: hasNodeModulesDir,
9: maybeBinaryNpmCommandName,
8: enableTestingFeaturesFlag,
9: hasNodeModulesDir,
10: maybeBinaryNpmCommandName,
} = runtimeOptions;

performance.setTimeOrigin(DateNow());
Expand Down
1 change: 1 addition & 0 deletions runtime/web_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ impl WebWorker {
ops::signal::deno_signal::init_ops_and_esm(),
ops::tty::deno_tty::init_ops_and_esm(),
ops::http::deno_http_runtime::init_ops_and_esm(),
ops::bootstrap::deno_bootstrap::init_ops_and_esm(),
deno_permissions_web_worker::init_ops_and_esm(
permissions,
enable_testing_features,
Expand Down
Loading