diff --git a/Userland/Libraries/LibWeb/HTML/MimeType.cpp b/Userland/Libraries/LibWeb/HTML/MimeType.cpp
index 30e20dfc369..e99231197e6 100644
--- a/Userland/Libraries/LibWeb/HTML/MimeType.cpp
+++ b/Userland/Libraries/LibWeb/HTML/MimeType.cpp
@@ -11,9 +11,9 @@
namespace Web::HTML {
-MimeType::MimeType(JS::Realm& realm, String const& type)
+MimeType::MimeType(JS::Realm& realm, String type)
: Bindings::PlatformObject(realm)
- , m_type(type)
+ , m_type(move(type))
{
}
@@ -38,7 +38,7 @@ String const& MimeType::type() const
JS::ThrowCompletionOr MimeType::description() const
{
// The MimeType interface's description getter steps are to return "Portable Document Format".
- static String description_string = TRY_OR_THROW_OOM(vm(), String::from_utf8("Portable Document Format"sv));
+ static String description_string = TRY_OR_THROW_OOM(vm(), "Portable Document Format"_string);
return description_string;
}
@@ -46,7 +46,7 @@ JS::ThrowCompletionOr MimeType::description() const
String const& MimeType::suffixes() const
{
// The MimeType interface's suffixes getter steps are to return "pdf".
- static String suffixes_string = String::from_utf8_short_string("pdf"sv);
+ static String suffixes_string = "pdf"_short_string;
return suffixes_string;
}
diff --git a/Userland/Libraries/LibWeb/HTML/MimeType.h b/Userland/Libraries/LibWeb/HTML/MimeType.h
index 859e15dbf6b..29dd08a7f86 100644
--- a/Userland/Libraries/LibWeb/HTML/MimeType.h
+++ b/Userland/Libraries/LibWeb/HTML/MimeType.h
@@ -23,7 +23,7 @@ public:
JS::NonnullGCPtr enabled_plugin() const;
private:
- MimeType(JS::Realm&, String const& type);
+ MimeType(JS::Realm&, String type);
virtual JS::ThrowCompletionOr initialize(JS::Realm&) override;
diff --git a/Userland/Libraries/LibWeb/HTML/Plugin.cpp b/Userland/Libraries/LibWeb/HTML/Plugin.cpp
index 4240a522c66..199332ef48b 100644
--- a/Userland/Libraries/LibWeb/HTML/Plugin.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Plugin.cpp
@@ -12,9 +12,9 @@
namespace Web::HTML {
-Plugin::Plugin(JS::Realm& realm, String const& name)
+Plugin::Plugin(JS::Realm& realm, String name)
: Bindings::LegacyPlatformObject(realm)
- , m_name(name)
+ , m_name(move(name))
{
}
diff --git a/Userland/Libraries/LibWeb/HTML/Plugin.h b/Userland/Libraries/LibWeb/HTML/Plugin.h
index 70bed1bae89..8b145ab4a0b 100644
--- a/Userland/Libraries/LibWeb/HTML/Plugin.h
+++ b/Userland/Libraries/LibWeb/HTML/Plugin.h
@@ -25,7 +25,7 @@ public:
JS::GCPtr named_item(String const& name) const;
private:
- Plugin(JS::Realm&, String const& name);
+ Plugin(JS::Realm&, String name);
// https://html.spec.whatwg.org/multipage/system-state.html#concept-plugin-name
String m_name;
diff --git a/Userland/Libraries/LibWeb/HTML/Window.cpp b/Userland/Libraries/LibWeb/HTML/Window.cpp
index 3507a81b3f0..75f5890a852 100644
--- a/Userland/Libraries/LibWeb/HTML/Window.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Window.cpp
@@ -1080,12 +1080,12 @@ Vector> Window::pdf_viewer_plugin_objects()
return {};
if (m_pdf_viewer_plugin_objects.is_empty()) {
- // FIXME: Remove the MUSTs and propagate the errors instead.
- m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), MUST(String::from_utf8("PDF Viewer"sv))).release_allocated_value_but_fixme_should_propagate_errors());
- m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), MUST(String::from_utf8("Chrome PDF Viewer"sv))).release_allocated_value_but_fixme_should_propagate_errors());
- m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), MUST(String::from_utf8("Chromium PDF Viewer"sv))).release_allocated_value_but_fixme_should_propagate_errors());
- m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), MUST(String::from_utf8("Microsoft Edge PDF Viewer"sv))).release_allocated_value_but_fixme_should_propagate_errors());
- m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), MUST(String::from_utf8("WebKit built-in PDF"sv))).release_allocated_value_but_fixme_should_propagate_errors());
+ // FIXME: Propagate errors.
+ m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), "PDF Viewer"_string.release_value_but_fixme_should_propagate_errors()).release_allocated_value_but_fixme_should_propagate_errors());
+ m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), "Chrome PDF Viewer"_string.release_value_but_fixme_should_propagate_errors()).release_allocated_value_but_fixme_should_propagate_errors());
+ m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), "Chromium PDF Viewer"_string.release_value_but_fixme_should_propagate_errors()).release_allocated_value_but_fixme_should_propagate_errors());
+ m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), "Microsoft Edge PDF Viewer"_string.release_value_but_fixme_should_propagate_errors()).release_allocated_value_but_fixme_should_propagate_errors());
+ m_pdf_viewer_plugin_objects.append(realm().heap().allocate(realm(), realm(), "WebKit built-in PDF"_string.release_value_but_fixme_should_propagate_errors()).release_allocated_value_but_fixme_should_propagate_errors());
}
return m_pdf_viewer_plugin_objects;