1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibWeb: Let get_buffer_source_copy() return ErrorOr instead of Optional

This is a minor refactor of IDL::get_buffer_source_copy() letting it
return ErrorOr<ByteBuffer> instead of Optional<ByteBuffer>.

This also updates all places that use IDL::get_buffer_source_copy().
This commit is contained in:
Kenneth Myhra 2022-07-22 21:01:36 +02:00 committed by Linus Groh
parent 7a2bef7fe1
commit 9fe12c1851
5 changed files with 15 additions and 18 deletions

View file

@ -16,7 +16,7 @@
namespace Web::Bindings::IDL {
Optional<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source);
ErrorOr<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source);
// https://webidl.spec.whatwg.org/#call-user-object-operation-return
inline JS::Completion clean_up_on_return(HTML::EnvironmentSettingsObject& stored_settings, HTML::EnvironmentSettingsObject& relevant_settings, JS::Completion& completion)