diff --git a/AK/FlyString.h b/AK/FlyString.h index b750e8e2469..84587989f38 100644 --- a/AK/FlyString.h +++ b/AK/FlyString.h @@ -89,9 +89,9 @@ struct Formatter : Formatter { } -[[nodiscard]] ALWAYS_INLINE AK::ErrorOr operator""_fly_string(char const* cstring, size_t length) +[[nodiscard]] ALWAYS_INLINE AK::FlyString operator""_fly_string(char const* cstring, size_t length) { - return AK::FlyString::from_utf8(AK::StringView(cstring, length)); + return AK::FlyString::from_utf8(AK::StringView(cstring, length)).release_value(); } #if USING_AK_GLOBALLY diff --git a/Tests/AK/TestFlyString.cpp b/Tests/AK/TestFlyString.cpp index f62cf58a46a..6f1e0d6b5d8 100644 --- a/Tests/AK/TestFlyString.cpp +++ b/Tests/AK/TestFlyString.cpp @@ -68,15 +68,15 @@ TEST_CASE(long_string) TEST_CASE(from_string_view) { - auto fly1 = MUST("thisisdefinitelymorethan7bytes"_fly_string); + auto fly1 = "thisisdefinitelymorethan7bytes"_fly_string; EXPECT_EQ(fly1, "thisisdefinitelymorethan7bytes"sv); EXPECT_EQ(FlyString::number_of_fly_strings(), 1u); - auto fly2 = MUST("thisisdefinitelymorethan7bytes"_fly_string); + auto fly2 = "thisisdefinitelymorethan7bytes"_fly_string; EXPECT_EQ(fly2, "thisisdefinitelymorethan7bytes"sv); EXPECT_EQ(FlyString::number_of_fly_strings(), 1u); - auto fly3 = MUST("foo"_fly_string); + auto fly3 = "foo"_fly_string; EXPECT_EQ(fly3, "foo"sv); EXPECT_EQ(FlyString::number_of_fly_strings(), 1u); diff --git a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp index 383b6c5f2b0..0b9c1ce8135 100644 --- a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp +++ b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp @@ -82,19 +82,19 @@ ErrorOr initialize_main_thread_vm() s_main_thread_vm->ref(); // These strings could potentially live on the VM similar to CommonPropertyNames. - TRY(DOM::MutationType::initialize_strings()); - TRY(HTML::AttributeNames::initialize_strings()); - TRY(HTML::CustomElementReactionNames::initialize_strings()); - TRY(HTML::EventNames::initialize_strings()); - TRY(HTML::TagNames::initialize_strings()); - TRY(Namespace::initialize_strings()); - TRY(NavigationTiming::EntryNames::initialize_strings()); - TRY(PerformanceTimeline::EntryTypes::initialize_strings()); - TRY(SVG::AttributeNames::initialize_strings()); - TRY(SVG::TagNames::initialize_strings()); - TRY(UIEvents::EventNames::initialize_strings()); - TRY(WebGL::EventNames::initialize_strings()); - TRY(XHR::EventNames::initialize_strings()); + DOM::MutationType::initialize_strings(); + HTML::AttributeNames::initialize_strings(); + HTML::CustomElementReactionNames::initialize_strings(); + HTML::EventNames::initialize_strings(); + HTML::TagNames::initialize_strings(); + Namespace::initialize_strings(); + NavigationTiming::EntryNames::initialize_strings(); + PerformanceTimeline::EntryTypes::initialize_strings(); + SVG::AttributeNames::initialize_strings(); + SVG::TagNames::initialize_strings(); + UIEvents::EventNames::initialize_strings(); + WebGL::EventNames::initialize_strings(); + XHR::EventNames::initialize_strings(); static_cast(s_main_thread_vm->custom_data())->event_loop.set_vm(*s_main_thread_vm); diff --git a/Userland/Libraries/LibWeb/DOM/MutationType.cpp b/Userland/Libraries/LibWeb/DOM/MutationType.cpp index 41ec95e2c88..669fac4666c 100644 --- a/Userland/Libraries/LibWeb/DOM/MutationType.cpp +++ b/Userland/Libraries/LibWeb/DOM/MutationType.cpp @@ -12,17 +12,16 @@ namespace Web::DOM::MutationType { ENUMERATE_MUTATION_TYPES #undef __ENUMERATE_MUTATION_TYPE -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); -#define __ENUMERATE_MUTATION_TYPE(name) name = TRY(#name##_fly_string); +#define __ENUMERATE_MUTATION_TYPE(name) name = #name##_fly_string; ENUMERATE_MUTATION_TYPES #undef __ENUMERATE_MUTATION_TYPE s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/DOM/MutationType.h b/Userland/Libraries/LibWeb/DOM/MutationType.h index 961c3068430..c869bacb145 100644 --- a/Userland/Libraries/LibWeb/DOM/MutationType.h +++ b/Userland/Libraries/LibWeb/DOM/MutationType.h @@ -20,6 +20,6 @@ namespace Web::DOM::MutationType { ENUMERATE_MUTATION_TYPES #undef __ENUMERATE_MUTATION_TYPE -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/HTML/AttributeNames.cpp b/Userland/Libraries/LibWeb/HTML/AttributeNames.cpp index 1f4d23a1c84..568e1334f60 100644 --- a/Userland/Libraries/LibWeb/HTML/AttributeNames.cpp +++ b/Userland/Libraries/LibWeb/HTML/AttributeNames.cpp @@ -13,7 +13,7 @@ namespace AttributeNames { ENUMERATE_HTML_ATTRIBUTES #undef __ENUMERATE_HTML_ATTRIBUTE -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); @@ -34,7 +34,6 @@ ErrorOr initialize_strings() http_equiv = "http-equiv"; s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/HTML/AttributeNames.h b/Userland/Libraries/LibWeb/HTML/AttributeNames.h index 2d723d70822..5543a78e56a 100644 --- a/Userland/Libraries/LibWeb/HTML/AttributeNames.h +++ b/Userland/Libraries/LibWeb/HTML/AttributeNames.h @@ -242,7 +242,7 @@ namespace AttributeNames { ENUMERATE_HTML_ATTRIBUTES #undef __ENUMERATE_HTML_ATTRIBUTE -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.cpp b/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.cpp index cab0d2b681f..70d51ba3899 100644 --- a/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.cpp +++ b/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.cpp @@ -12,18 +12,17 @@ namespace Web::HTML::CustomElementReactionNames { ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES #undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES #undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.h b/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.h index ed54dfcc337..96411110cc2 100644 --- a/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.h +++ b/Userland/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.h @@ -25,6 +25,6 @@ namespace Web::HTML::CustomElementReactionNames { ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES #undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/HTML/EventNames.cpp b/Userland/Libraries/LibWeb/HTML/EventNames.cpp index 8f819ac1b1f..f7ac8918c86 100644 --- a/Userland/Libraries/LibWeb/HTML/EventNames.cpp +++ b/Userland/Libraries/LibWeb/HTML/EventNames.cpp @@ -12,18 +12,17 @@ namespace Web::HTML::EventNames { ENUMERATE_HTML_EVENTS #undef __ENUMERATE_HTML_EVENT -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_HTML_EVENT(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_HTML_EVENTS #undef __ENUMERATE_HTML_EVENT s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/HTML/EventNames.h b/Userland/Libraries/LibWeb/HTML/EventNames.h index 5bf8319519d..b2b69f20f55 100644 --- a/Userland/Libraries/LibWeb/HTML/EventNames.h +++ b/Userland/Libraries/LibWeb/HTML/EventNames.h @@ -106,6 +106,6 @@ namespace Web::HTML::EventNames { ENUMERATE_HTML_EVENTS #undef __ENUMERATE_HTML_EVENT -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index e402619dad2..9e986d14c19 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -510,7 +510,7 @@ WebIDL::ExceptionOr HTMLMediaElement::load_element() // 2. Take pending play promises and reject pending play promises with the result and an "AbortError" DOMException. auto promises = take_pending_play_promises(); - reject_pending_play_promises(promises, TRY_OR_THROW_OOM(vm, "Media playback was aborted"_fly_string)); + reject_pending_play_promises(promises, "Media playback was aborted"_fly_string); } // 7. If seeking is true, set it to false. @@ -1251,7 +1251,7 @@ WebIDL::ExceptionOr HTMLMediaElement::handle_media_source_failure(Span(promises, TRY_OR_THROW_OOM(vm, "Media is not supported"_fly_string)); + reject_pending_play_promises(promises, "Media is not supported"_fly_string); // 7. Set the element's delaying-the-load-event flag to false. This stops delaying the load event. m_delaying_the_load_event.clear(); @@ -1477,7 +1477,7 @@ WebIDL::ExceptionOr HTMLMediaElement::pause_element() dispatch_event(DOM::Event::create(realm, HTML::EventNames::pause).release_value_but_fixme_should_propagate_errors()); // 3. Reject pending play promises with promises and an "AbortError" DOMException. - reject_pending_play_promises(promises, "Media playback was paused"_fly_string.release_value_but_fixme_should_propagate_errors()); + reject_pending_play_promises(promises, "Media playback was paused"_fly_string); }); // 4. Set the official playback position to the current playback position. @@ -1724,7 +1724,7 @@ WebIDL::ExceptionOr HTMLMediaElement::reached_end_of_media_playback() // 3. Take pending play promises and reject pending play promises with the result and an "AbortError" DOMException. auto promises = take_pending_play_promises(); - reject_pending_play_promises(promises, "Media playback has ended"_fly_string.release_value_but_fixme_should_propagate_errors()); + reject_pending_play_promises(promises, "Media playback has ended"_fly_string); } }); diff --git a/Userland/Libraries/LibWeb/HTML/TagNames.cpp b/Userland/Libraries/LibWeb/HTML/TagNames.cpp index 3d0b1913039..6fa6c7c54af 100644 --- a/Userland/Libraries/LibWeb/HTML/TagNames.cpp +++ b/Userland/Libraries/LibWeb/HTML/TagNames.cpp @@ -12,7 +12,7 @@ namespace Web::HTML::TagNames { ENUMERATE_HTML_TAGS #undef __ENUMERATE_HTML_TAG -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); @@ -25,7 +25,6 @@ ErrorOr initialize_strings() template_ = "template"; s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/HTML/TagNames.h b/Userland/Libraries/LibWeb/HTML/TagNames.h index 82726734b0d..a73f4b9e408 100644 --- a/Userland/Libraries/LibWeb/HTML/TagNames.h +++ b/Userland/Libraries/LibWeb/HTML/TagNames.h @@ -161,6 +161,6 @@ namespace Web::HTML::TagNames { ENUMERATE_HTML_TAGS #undef __ENUMERATE_HTML_TAG -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/Namespace.cpp b/Userland/Libraries/LibWeb/Namespace.cpp index fa44dfc8229..d37a4c2f64b 100644 --- a/Userland/Libraries/LibWeb/Namespace.cpp +++ b/Userland/Libraries/LibWeb/Namespace.cpp @@ -12,7 +12,7 @@ namespace Web::Namespace { ENUMERATE_NAMESPACES #undef __ENUMERATE_NAMESPACE -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); @@ -23,7 +23,6 @@ ErrorOr initialize_strings() #undef __ENUMERATE_NAMESPACE s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/Namespace.h b/Userland/Libraries/LibWeb/Namespace.h index ea13e258745..484a43b0810 100644 --- a/Userland/Libraries/LibWeb/Namespace.h +++ b/Userland/Libraries/LibWeb/Namespace.h @@ -23,6 +23,6 @@ namespace Web::Namespace { ENUMERATE_NAMESPACES #undef __ENUMERATE_NAMESPACE -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.cpp b/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.cpp index cc337d1fddc..6ca5957df2e 100644 --- a/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.cpp +++ b/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.cpp @@ -12,18 +12,17 @@ namespace Web::NavigationTiming::EntryNames { ENUMERATE_NAVIGATION_TIMING_ENTRY_NAMES #undef __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME(name, _) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_NAVIGATION_TIMING_ENTRY_NAMES #undef __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.h b/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.h index 9fc275c0679..077660c2de8 100644 --- a/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.h +++ b/Userland/Libraries/LibWeb/NavigationTiming/EntryNames.h @@ -37,6 +37,6 @@ namespace Web::NavigationTiming::EntryNames { ENUMERATE_NAVIGATION_TIMING_ENTRY_NAMES #undef __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.cpp b/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.cpp index 8478f623d8d..5ed9bfb9ba1 100644 --- a/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.cpp +++ b/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.cpp @@ -12,23 +12,22 @@ namespace Web::PerformanceTimeline::EntryTypes { ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPES #undef __ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPE -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPE(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPES #undef __ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPE // NOTE: Special cases for attributes with dashes in them. - first_input = TRY("first-input"_fly_string); - largest_contentful_paint = TRY("largest-contentful-paint"_fly_string); - layout_shift = TRY("layout-shift"_fly_string); + first_input = "first-input"_fly_string; + largest_contentful_paint = "largest-contentful-paint"_fly_string; + layout_shift = "layout-shift"_fly_string; s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.h b/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.h index 220fa611e05..ed37fc45991 100644 --- a/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.h +++ b/Userland/Libraries/LibWeb/PerformanceTimeline/EntryTypes.h @@ -28,6 +28,6 @@ namespace Web::PerformanceTimeline::EntryTypes { ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPES #undef __ENUMERATE_PERFORMANCE_TIMELINE_ENTRY_TYPE -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp b/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp index c01f0cb4087..38689da2e12 100644 --- a/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp +++ b/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp @@ -12,7 +12,7 @@ namespace Web::SVG::AttributeNames { ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE) #undef __ENUMERATE_SVG_ATTRIBUTE -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); @@ -23,7 +23,6 @@ ErrorOr initialize_strings() #undef __ENUMERATE_SVG_ATTRIBUTE s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/SVG/AttributeNames.h b/Userland/Libraries/LibWeb/SVG/AttributeNames.h index 64af9b9e0d5..8dedb4ecc92 100644 --- a/Userland/Libraries/LibWeb/SVG/AttributeNames.h +++ b/Userland/Libraries/LibWeb/SVG/AttributeNames.h @@ -100,6 +100,6 @@ namespace Web::SVG::AttributeNames { ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE) #undef __ENUMERATE_SVG_ATTRIBUTE -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/SVG/TagNames.cpp b/Userland/Libraries/LibWeb/SVG/TagNames.cpp index a2c4a5b5748..a9ce352902d 100644 --- a/Userland/Libraries/LibWeb/SVG/TagNames.cpp +++ b/Userland/Libraries/LibWeb/SVG/TagNames.cpp @@ -12,7 +12,7 @@ namespace Web::SVG::TagNames { ENUMERATE_SVG_TAGS #undef __ENUMERATE_SVG_TAG -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); @@ -22,7 +22,6 @@ ErrorOr initialize_strings() #undef __ENUMERATE_SVG_TAG s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/SVG/TagNames.h b/Userland/Libraries/LibWeb/SVG/TagNames.h index 7a37c5d7606..fdef9b58d74 100644 --- a/Userland/Libraries/LibWeb/SVG/TagNames.h +++ b/Userland/Libraries/LibWeb/SVG/TagNames.h @@ -43,6 +43,6 @@ namespace Web::SVG::TagNames { ENUMERATE_SVG_TAGS #undef __ENUMERATE_SVG_TAG -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/UIEvents/EventNames.cpp b/Userland/Libraries/LibWeb/UIEvents/EventNames.cpp index d7ef347ef21..cbb1df3a305 100644 --- a/Userland/Libraries/LibWeb/UIEvents/EventNames.cpp +++ b/Userland/Libraries/LibWeb/UIEvents/EventNames.cpp @@ -12,18 +12,17 @@ namespace Web::UIEvents::EventNames { ENUMERATE_UI_EVENTS #undef __ENUMERATE_UI_EVENT -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_UI_EVENT(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_UI_EVENTS #undef __ENUMERATE_UI_EVENT s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/UIEvents/EventNames.h b/Userland/Libraries/LibWeb/UIEvents/EventNames.h index bd00dd8ffff..43352edddbb 100644 --- a/Userland/Libraries/LibWeb/UIEvents/EventNames.h +++ b/Userland/Libraries/LibWeb/UIEvents/EventNames.h @@ -36,6 +36,6 @@ namespace Web::UIEvents::EventNames { ENUMERATE_UI_EVENTS #undef __ENUMERATE_UI_EVENT -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/WebGL/EventNames.cpp b/Userland/Libraries/LibWeb/WebGL/EventNames.cpp index 497863e98f6..e3afcbdc972 100644 --- a/Userland/Libraries/LibWeb/WebGL/EventNames.cpp +++ b/Userland/Libraries/LibWeb/WebGL/EventNames.cpp @@ -12,18 +12,17 @@ namespace Web::WebGL::EventNames { ENUMERATE_GL_EVENTS #undef __ENUMERATE_GL_EVENT -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_GL_EVENT(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_GL_EVENTS #undef __ENUMERATE_GL_EVENT s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/WebGL/EventNames.h b/Userland/Libraries/LibWeb/WebGL/EventNames.h index 4d757317c53..235dfa38bb3 100644 --- a/Userland/Libraries/LibWeb/WebGL/EventNames.h +++ b/Userland/Libraries/LibWeb/WebGL/EventNames.h @@ -20,6 +20,6 @@ namespace Web::WebGL::EventNames { ENUMERATE_GL_EVENTS #undef __ENUMERATE_GL_EVENT -ErrorOr initialize_strings(); +void initialize_strings(); } diff --git a/Userland/Libraries/LibWeb/XHR/EventNames.cpp b/Userland/Libraries/LibWeb/XHR/EventNames.cpp index 1309b2f6aa1..9c839369e9e 100644 --- a/Userland/Libraries/LibWeb/XHR/EventNames.cpp +++ b/Userland/Libraries/LibWeb/XHR/EventNames.cpp @@ -12,18 +12,17 @@ namespace Web::XHR::EventNames { ENUMERATE_XHR_EVENTS #undef __ENUMERATE_XHR_EVENT -ErrorOr initialize_strings() +void initialize_strings() { static bool s_initialized = false; VERIFY(!s_initialized); #define __ENUMERATE_XHR_EVENT(name) \ - name = TRY(#name##_fly_string); + name = #name##_fly_string; ENUMERATE_XHR_EVENTS #undef __ENUMERATE_XHR_EVENT s_initialized = true; - return {}; } } diff --git a/Userland/Libraries/LibWeb/XHR/EventNames.h b/Userland/Libraries/LibWeb/XHR/EventNames.h index 0c23c1fb7cf..5b20344f9f9 100644 --- a/Userland/Libraries/LibWeb/XHR/EventNames.h +++ b/Userland/Libraries/LibWeb/XHR/EventNames.h @@ -25,6 +25,6 @@ namespace Web::XHR::EventNames { ENUMERATE_XHR_EVENTS #undef __ENUMERATE_XHR_EVENT -ErrorOr initialize_strings(); +void initialize_strings(); }