mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
LibWeb: Port call_user_object_operation from DeprecatedString
This commit is contained in:
committed by
Andreas Kling
parent
6813dcaff8
commit
a7b8828db2
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/a7b8828db2 Pull-request: https://github.com/SerenityOS/serenity/pull/22134
@@ -114,7 +114,7 @@ inline JS::Completion clean_up_on_return(HTML::EnvironmentSettingsObject& stored
|
||||
return JS::Value { rejected_promise->promise() };
|
||||
}
|
||||
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, DeprecatedString const& operation_name, Optional<JS::Value> this_argument, JS::MarkedVector<JS::Value> args)
|
||||
JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, String const& operation_name, Optional<JS::Value> this_argument, JS::MarkedVector<JS::Value> args)
|
||||
{
|
||||
// 1. Let completion be an uninitialized variable.
|
||||
JS::Completion completion;
|
||||
@@ -147,7 +147,7 @@ JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, Deprec
|
||||
// 10. If ! IsCallable(O) is false, then:
|
||||
if (!object->is_function()) {
|
||||
// 1. Let getResult be Get(O, opName).
|
||||
auto get_result = object->get(operation_name);
|
||||
auto get_result = object->get(operation_name.to_deprecated_string());
|
||||
|
||||
// 2. If getResult is an abrupt completion, set completion to getResult and jump to the step labeled return.
|
||||
if (get_result.is_throw_completion()) {
|
||||
|
||||
Reference in New Issue
Block a user