mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibGC: Rename MarkedVector => RootVector
Let's try to make it a bit more clear that this is a Vector of GC roots.
This commit is contained in:
parent
ada36e5c0a
commit
3bfb0534be
Notes:
github-actions[bot]
2024-12-26 18:11:36 +00:00
Author: https://github.com/awesomekling
Commit: 3bfb0534be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3048
117 changed files with 281 additions and 281 deletions
|
@ -153,7 +153,7 @@ inline JS::Completion clean_up_on_return(JS::Realm& stored_realm, JS::Realm& rel
|
|||
|
||||
// https://webidl.spec.whatwg.org/#call-a-user-objects-operation
|
||||
// https://whatpr.org/webidl/1437.html#call-a-user-objects-operation
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args)
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, GC::RootVector<JS::Value> args)
|
||||
{
|
||||
// 1. Let completion be an uninitialized variable.
|
||||
JS::Completion completion;
|
||||
|
@ -255,7 +255,7 @@ JS::ThrowCompletionOr<String> to_usv_string(JS::VM& vm, JS::Value value)
|
|||
|
||||
// https://webidl.spec.whatwg.org/#invoke-a-callback-function
|
||||
// https://whatpr.org/webidl/1437.html#invoke-a-callback-function
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, ExceptionBehavior exception_behavior, GC::MarkedVector<JS::Value> args)
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, ExceptionBehavior exception_behavior, GC::RootVector<JS::Value> args)
|
||||
{
|
||||
// https://webidl.spec.whatwg.org/#js-invoking-callback-functions
|
||||
// The exceptionBehavior argument must be supplied if, and only if, callable’s return type is not a promise type. If callable’s return type is neither undefined nor any, it must be "rethrow".
|
||||
|
@ -359,12 +359,12 @@ JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Valu
|
|||
return return_steps(completion);
|
||||
}
|
||||
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args)
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, GC::RootVector<JS::Value> args)
|
||||
{
|
||||
return invoke_callback(callback, move(this_argument), ExceptionBehavior::NotSpecified, move(args));
|
||||
}
|
||||
|
||||
JS::Completion construct(WebIDL::CallbackType& callback, GC::MarkedVector<JS::Value> args)
|
||||
JS::Completion construct(WebIDL::CallbackType& callback, GC::RootVector<JS::Value> args)
|
||||
{
|
||||
// 1. Let completion be an uninitialized variable.
|
||||
JS::Completion completion;
|
||||
|
|
|
@ -21,7 +21,7 @@ bool is_buffer_source_type(JS::Value);
|
|||
GC::Ptr<JS::ArrayBuffer> underlying_buffer_source(JS::Object& buffer_source);
|
||||
ErrorOr<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source);
|
||||
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args);
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, GC::RootVector<JS::Value> args);
|
||||
|
||||
JS::ThrowCompletionOr<String> to_string(JS::VM&, JS::Value);
|
||||
JS::ThrowCompletionOr<String> to_usv_string(JS::VM&, JS::Value);
|
||||
|
@ -33,7 +33,7 @@ JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String
|
|||
{
|
||||
auto& function_object = callback.callback;
|
||||
|
||||
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
|
||||
GC::RootVector<JS::Value> arguments_list { function_object->heap() };
|
||||
(arguments_list.append(forward<Args>(args)), ...);
|
||||
|
||||
return call_user_object_operation(callback, operation_name, move(this_argument), move(arguments_list));
|
||||
|
@ -45,8 +45,8 @@ enum class ExceptionBehavior {
|
|||
Rethrow,
|
||||
};
|
||||
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, ExceptionBehavior exception_behavior, GC::MarkedVector<JS::Value> args);
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, GC::MarkedVector<JS::Value> args);
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, ExceptionBehavior exception_behavior, GC::RootVector<JS::Value> args);
|
||||
JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Value> this_argument, GC::RootVector<JS::Value> args);
|
||||
|
||||
// https://webidl.spec.whatwg.org/#invoke-a-callback-function
|
||||
template<typename... Args>
|
||||
|
@ -54,7 +54,7 @@ JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Valu
|
|||
{
|
||||
auto& function_object = callback.callback;
|
||||
|
||||
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
|
||||
GC::RootVector<JS::Value> arguments_list { function_object->heap() };
|
||||
(arguments_list.append(forward<Args>(args)), ...);
|
||||
|
||||
return invoke_callback(callback, move(this_argument), exception_behavior, move(arguments_list));
|
||||
|
@ -66,7 +66,7 @@ JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Valu
|
|||
return invoke_callback(callback, move(this_argument), ExceptionBehavior::NotSpecified, forward<Args>(args)...);
|
||||
}
|
||||
|
||||
JS::Completion construct(WebIDL::CallbackType& callback, GC::MarkedVector<JS::Value> args);
|
||||
JS::Completion construct(WebIDL::CallbackType& callback, GC::RootVector<JS::Value> args);
|
||||
|
||||
// https://webidl.spec.whatwg.org/#construct-a-callback-function
|
||||
template<typename... Args>
|
||||
|
@ -74,7 +74,7 @@ JS::Completion construct(WebIDL::CallbackType& callback, Args&&... args)
|
|||
{
|
||||
auto& function_object = callback.callback;
|
||||
|
||||
GC::MarkedVector<JS::Value> arguments_list { function_object->heap() };
|
||||
GC::RootVector<JS::Value> arguments_list { function_object->heap() };
|
||||
(arguments_list.append(forward<Args>(args)), ...);
|
||||
|
||||
return construct(callback, move(arguments_list));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue