LibWeb/Encoding: Dont return ExceptionOr for encoder constructors

No exception is thrown.
This commit is contained in:
Shannon Booth 2026-06-22 14:15:53 +02:00 committed by Shannon Booth
parent 8caee39bac
commit ae0c7bc097
4 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ namespace Web::Encoding {
GC_DEFINE_ALLOCATOR(TextEncoder);
WebIDL::ExceptionOr<GC::Ref<TextEncoder>> TextEncoder::construct_impl(JS::Realm& realm)
GC::Ref<TextEncoder> TextEncoder::construct_impl(JS::Realm& realm)
{
return realm.create<TextEncoder>(realm);
}

View file

@ -27,7 +27,7 @@ class TextEncoder final
GC_DECLARE_ALLOCATOR(TextEncoder);
public:
static WebIDL::ExceptionOr<GC::Ref<TextEncoder>> construct_impl(JS::Realm&);
static GC::Ref<TextEncoder> construct_impl(JS::Realm&);
virtual ~TextEncoder() override;

View file

@ -21,7 +21,7 @@ namespace Web::Encoding {
GC_DEFINE_ALLOCATOR(TextEncoderStream);
// https://encoding.spec.whatwg.org/#dom-textencoderstream
WebIDL::ExceptionOr<GC::Ref<TextEncoderStream>> TextEncoderStream::construct_impl(JS::Realm& realm)
GC::Ref<TextEncoderStream> TextEncoderStream::construct_impl(JS::Realm& realm)
{
// 1. Set thiss encoder to an instance of the UTF-8 encoder.
// NOTE: No-op, as AK::String is already in UTF-8 format.

View file

@ -20,7 +20,7 @@ class TextEncoderStream final
GC_DECLARE_ALLOCATOR(TextEncoderStream);
public:
static WebIDL::ExceptionOr<GC::Ref<TextEncoderStream>> construct_impl(JS::Realm&);
static GC::Ref<TextEncoderStream> construct_impl(JS::Realm&);
virtual ~TextEncoderStream() override;
private: