mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibJS: Convert Array::create{,_from}() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/91b0123eaf Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
@@ -249,7 +249,7 @@ ThrowCompletionOr<Array*> format_relative_time_to_parts(VM& vm, RelativeTimeForm
|
||||
auto parts = TRY(partition_relative_time_pattern(vm, relative_time_format, value, unit));
|
||||
|
||||
// 2. Let result be ! ArrayCreate(0).
|
||||
auto* result = MUST(Array::create(realm, 0));
|
||||
auto result = MUST(Array::create(realm, 0));
|
||||
|
||||
// 3. Let n be 0.
|
||||
size_t n = 0;
|
||||
@@ -279,7 +279,7 @@ ThrowCompletionOr<Array*> format_relative_time_to_parts(VM& vm, RelativeTimeForm
|
||||
}
|
||||
|
||||
// 5. Return result.
|
||||
return result;
|
||||
return result.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user