diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-06 12:37:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 16:37:46 +0000 |
commit | 489cafd5ba4ecd3fc9d8fa393b17e50015ec4707 (patch) | |
tree | b189e0cf727a941afd03fa204cacb8e469170bd9 /core/runtime.rs | |
parent | ff4b03f233e19ec607a9c88dc1d71016aeaeed4b (diff) |
refactor: use v8::String::new_external_onebyte_static where appropriate (#18051)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index 81314f0bf..1d74c9ede 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -992,11 +992,15 @@ impl JsRuntime { let context = realm.context(); let context_local = v8::Local::new(scope, context); let global = context_local.global(scope); - let deno_str = v8::String::new(scope, "Deno").unwrap(); - let core_str = v8::String::new(scope, "core").unwrap(); - let opresolve_str = v8::String::new(scope, "opresolve").unwrap(); + let deno_str = + v8::String::new_external_onebyte_static(scope, b"Deno").unwrap(); + let core_str = + v8::String::new_external_onebyte_static(scope, b"core").unwrap(); + let opresolve_str = + v8::String::new_external_onebyte_static(scope, b"opresolve").unwrap(); let build_custom_error_str = - v8::String::new(scope, "buildCustomError").unwrap(); + v8::String::new_external_onebyte_static(scope, b"buildCustomError") + .unwrap(); let deno_obj: v8::Local<v8::Object> = global .get(scope, deno_str.into()) |