mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 02:33:03 +00:00
LibWeb: Make Bindings::dom_exception_to_throw_completion public API
I found myself needing to call this method when attempting to implement Blob::text and Blob::array_buffer. Turns out that the only caller outside of the Detail namespace already had a FIXME to make this a public API - so let's do that.
This commit is contained in:
parent
c5eeb303d8
commit
f320406a4c
Notes:
sideshowbarker
2024-07-16 22:24:48 +09:00
Author: https://github.com/shannonbooth
Commit: f320406a4c
Pull-request: https://github.com/SerenityOS/serenity/pull/19404
Reviewed-by: https://github.com/kennethmyhra ✅
Reviewed-by: https://github.com/mattco98 ✅
2 changed files with 4 additions and 5 deletions
|
@ -36,8 +36,7 @@ JS::NonnullGCPtr<JS::Promise> fetch(JS::VM& vm, RequestInfo const& input, Reques
|
|||
// as arguments. If this throws an exception, reject p with it and return p.
|
||||
auto exception_or_request_object = Request::construct_impl(realm, input, init);
|
||||
if (exception_or_request_object.is_exception()) {
|
||||
// FIXME: We should probably make this a public API?
|
||||
auto throw_completion = Bindings::Detail::dom_exception_to_throw_completion(vm, exception_or_request_object.release_error());
|
||||
auto throw_completion = Bindings::dom_exception_to_throw_completion(vm, exception_or_request_object.exception());
|
||||
WebIDL::reject_promise(realm, promise_capability, *throw_completion.value());
|
||||
return verify_cast<JS::Promise>(*promise_capability->promise().ptr());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue