LibJS: Change PropertyKey(ByteString) to PropertyKey(String)

...and deal with the fallout.
This commit is contained in:
Andreas Kling 2025-03-16 20:45:02 -05:00 committed by Andreas Kling
commit d7908dbff5
Notes: github-actions[bot] 2025-03-24 22:28:48 +00:00
17 changed files with 78 additions and 78 deletions

View file

@ -87,7 +87,7 @@ ThrowCompletionOr<void> copy_name_and_length(VM& vm, FunctionObject& function, F
target_name = PrimitiveString::create(vm, String {});
// 8. Perform SetFunctionName(F, targetName, prefix).
function.set_function_name({ target_name.as_string().byte_string() }, move(prefix));
function.set_function_name({ target_name.as_string().utf8_string() }, move(prefix));
return {};
}
@ -190,7 +190,7 @@ ThrowCompletionOr<Value> perform_shadow_realm_eval(VM& vm, StringView source_tex
}
// 3.1.4 ShadowRealmImportValue ( specifierString: a String, exportNameString: a String, callerRealm: a Realm Record, evalRealm: a Realm Record, evalContext: an execution context, ), https://tc39.es/proposal-shadowrealm/#sec-shadowrealmimportvalue
ThrowCompletionOr<Value> shadow_realm_import_value(VM& vm, ByteString specifier_string, ByteString export_name_string, Realm& caller_realm, Realm& eval_realm)
ThrowCompletionOr<Value> shadow_realm_import_value(VM& vm, String specifier_string, String export_name_string, Realm& caller_realm, Realm& eval_realm)
{
auto& realm = *vm.current_realm();
@ -211,7 +211,7 @@ ThrowCompletionOr<Value> shadow_realm_import_value(VM& vm, ByteString specifier_
auto referrer = GC::Ref { *eval_context->realm };
// 7. Perform HostLoadImportedModule(referrer, specifierString, empty, innerCapability).
vm.host_load_imported_module(referrer, ModuleRequest { specifier_string }, nullptr, inner_capability);
vm.host_load_imported_module(referrer, ModuleRequest { specifier_string.to_byte_string() }, nullptr, inner_capability);
// 7. Suspend evalContext and remove it from the execution context stack.
// NOTE: We don't support this concept yet.