From 490c05ef29b1a2661dedf003e6830217c4f0943d Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Sat, 23 Nov 2024 15:36:22 +0100 Subject: [PATCH] LibWeb: Make create_serialized_type() in-fallible The ::create() functions have all been converted into in-fallible versions so there is no longer any point in create_serialized_type() being fallible. --- Libraries/LibWeb/HTML/StructuredSerialize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/HTML/StructuredSerialize.cpp b/Libraries/LibWeb/HTML/StructuredSerialize.cpp index 117cb63c17..dc0e3c9d2b 100644 --- a/Libraries/LibWeb/HTML/StructuredSerialize.cpp +++ b/Libraries/LibWeb/HTML/StructuredSerialize.cpp @@ -896,7 +896,7 @@ public: return WebIDL::DataCloneError::create(realm, "Unsupported type"_string); // 3. Set value to a new instance of the interface identified by interfaceName, created in targetRealm. - value = TRY(create_serialized_type(interface_name, realm)); + value = create_serialized_type(interface_name, realm); // 4. Set deep to true. deep = true; @@ -977,7 +977,7 @@ private: GC::MarkedVector m_memory; // Index -> JS value size_t m_position { 0 }; - static WebIDL::ExceptionOr> create_serialized_type(StringView interface_name, JS::Realm& realm) + static GC::Ref create_serialized_type(StringView interface_name, JS::Realm& realm) { if (interface_name == "Blob"sv) return FileAPI::Blob::create(realm);