mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
fix(runtime): do not require deno namespace in workers for crypto (#9784)
This commit is contained in:
parent
c8fbf6d38a
commit
7286eea75c
2 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
self.crypto.getRandomValues(new Uint8Array(16));
|
||||||
|
|
||||||
onmessage = function () {
|
onmessage = function () {
|
||||||
postMessage(!!self.crypto);
|
postMessage(!!self.crypto);
|
||||||
};
|
};
|
||||||
|
|
|
@ -239,6 +239,7 @@ impl WebWorker {
|
||||||
options.user_agent.clone(),
|
options.user_agent.clone(),
|
||||||
options.ca_data.clone(),
|
options.ca_data.clone(),
|
||||||
);
|
);
|
||||||
|
ops::crypto::init(js_runtime, options.seed);
|
||||||
|
|
||||||
if options.use_deno_namespace {
|
if options.use_deno_namespace {
|
||||||
ops::fs_events::init(js_runtime);
|
ops::fs_events::init(js_runtime);
|
||||||
|
@ -248,7 +249,6 @@ impl WebWorker {
|
||||||
ops::permissions::init(js_runtime);
|
ops::permissions::init(js_runtime);
|
||||||
ops::plugin::init(js_runtime);
|
ops::plugin::init(js_runtime);
|
||||||
ops::process::init(js_runtime);
|
ops::process::init(js_runtime);
|
||||||
ops::crypto::init(js_runtime, options.seed);
|
|
||||||
ops::signal::init(js_runtime);
|
ops::signal::init(js_runtime);
|
||||||
ops::tls::init(js_runtime);
|
ops::tls::init(js_runtime);
|
||||||
ops::tty::init(js_runtime);
|
ops::tty::init(js_runtime);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue