summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/web_worker.rs7
-rw-r--r--runtime/worker.rs6
2 files changed, 9 insertions, 4 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 =
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 8fa17a7f5..66497489d 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -321,13 +321,15 @@ impl MainWorker {
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, "mainRuntime").unwrap();
+ let main_runtime_str =
+ v8::String::new_external_onebyte_static(scope, b"mainRuntime").unwrap();
let bootstrap_fn =
bootstrap_ns.get(scope, main_runtime_str.into()).unwrap();
let bootstrap_fn =