summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-06 12:37:46 -0400
committerGitHub <noreply@github.com>2023-03-06 16:37:46 +0000
commit489cafd5ba4ecd3fc9d8fa393b17e50015ec4707 (patch)
treeb189e0cf727a941afd03fa204cacb8e469170bd9 /runtime/worker.rs
parentff4b03f233e19ec607a9c88dc1d71016aeaeed4b (diff)
refactor: use v8::String::new_external_onebyte_static where appropriate (#18051)
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs6
1 files changed, 4 insertions, 2 deletions
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 =