LibWeb/Encoding: Dont return ExceptionOr for encoder constructors
No exception is thrown.
This commit is contained in:
parent
8caee39bac
commit
ae0c7bc097
4 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 this’s encoder to an instance of the UTF-8 encoder.
|
||||
// NOTE: No-op, as AK::String is already in UTF-8 format.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue