AK+Everywhere: Rename verify_cast to as

Follow-up to fc20e61e72.
This commit is contained in:
Timothy Flynn 2025-01-21 09:12:05 -05:00 committed by Tim Flynn
commit 85b424464a
Notes: github-actions[bot] 2025-01-21 16:49:39 +00:00
191 changed files with 574 additions and 574 deletions

View file

@ -141,7 +141,7 @@ GC::Ref<Promise> react_to_promise(Promise const& promise, GC::Ptr<ReactionSteps>
// 7. Return PerformPromiseThen(promise.[[Promise]], onFulfilled, onRejected, newCapability).
// FIXME: https://github.com/whatwg/webidl/issues/1443
// Returning newCapability instead of newCapability.[[Promise].
auto promise_object = verify_cast<JS::Promise>(promise.promise().ptr());
auto promise_object = as<JS::Promise>(promise.promise().ptr());
auto value = promise_object->perform_then(on_fulfilled, on_rejected, new_capability);
VERIFY(value == new_capability->promise());
@ -173,7 +173,7 @@ GC::Ref<Promise> upon_rejection(Promise const& promise, GC::Ref<ReactionSteps> s
void mark_promise_as_handled(Promise const& promise)
{
// To mark as handled a Promise<T> promise, set promise.[[Promise]].[[PromiseIsHandled]] to true.
auto promise_object = verify_cast<JS::Promise>(promise.promise().ptr());
auto promise_object = as<JS::Promise>(promise.promise().ptr());
promise_object->set_is_handled();
}