summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index ffafbc1d3..06b594dd1 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -500,13 +500,16 @@ impl WebWorker {
let scope = &mut js_runtime.handle_scope();
let context_local = v8::Local::new(scope, context);
let global_obj = context_local.global(scope);
- let bootstrap_str = v8::String::new(scope, "bootstrap").unwrap();
+ let bootstrap_str =
+ v8::String::new_external_onebyte_static(scope, b"bootstrap").unwrap();
let bootstrap_ns: v8::Local<v8::Object> = global_obj
.get(scope, bootstrap_str.into())
.unwrap()
.try_into()
.unwrap();
- let main_runtime_str = v8::String::new(scope, "workerRuntime").unwrap();
+ let main_runtime_str =
+ v8::String::new_external_onebyte_static(scope, b"workerRuntime")
+ .unwrap();
let bootstrap_fn =
bootstrap_ns.get(scope, main_runtime_str.into()).unwrap();
let bootstrap_fn =