mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
parent
9708b86d65
commit
7849950383
Notes:
sideshowbarker
2024-07-17 03:14:39 +09:00
Author: https://github.com/awesomekling
Commit: 7849950383
Pull-request: https://github.com/SerenityOS/serenity/pull/20451
Reviewed-by: https://github.com/trflynn89
15 changed files with 82 additions and 88 deletions
|
@ -459,10 +459,10 @@ ThrowCompletionOr<DeprecatedString> Value::to_deprecated_string(VM& vm) const
|
|||
ThrowCompletionOr<Utf16String> Value::to_utf16_string(VM& vm) const
|
||||
{
|
||||
if (is_string())
|
||||
return TRY(as_string().utf16_string());
|
||||
return as_string().utf16_string();
|
||||
|
||||
auto utf8_string = TRY(to_string(vm));
|
||||
return Utf16String::create(vm, utf8_string.bytes_as_string_view());
|
||||
return Utf16String::create(utf8_string.bytes_as_string_view());
|
||||
}
|
||||
|
||||
// 7.1.2 ToBoolean ( argument ), https://tc39.es/ecma262/#sec-toboolean
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue