mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Andreas Kling
parent
ada36e5c0a
commit
3bfb0534be
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user