summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-01 22:37:59 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-01 22:41:50 +0100
commit19ffa676f232a5f75a6158ecb5197eea12cf2d71 (patch)
treef9e45a4d339dd7b64b7311aa8753b7c449e5b7f1 /Libraries/LibWeb
parent8ff61698dac5453a0bd553e0f1962e243ddb23d0 (diff)
downloadserenity-19ffa676f232a5f75a6158ecb5197eea12cf2d71.zip
LibWeb: Use is<T> in XMLHttpRequestPrototype
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp
index f8110a8c74..2db588bc2c 100644
--- a/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp
+++ b/Libraries/LibWeb/Bindings/XMLHttpRequestPrototype.cpp
@@ -62,7 +62,7 @@ static XMLHttpRequest* impl_from(JS::VM& vm, JS::GlobalObject& global_object)
auto* this_object = vm.this_value(global_object).to_object(global_object);
if (!this_object)
return nullptr;
- if (StringView("XMLHttpRequestWrapper") != this_object->class_name()) {
+ if (!is<XMLHttpRequestWrapper>(this_object)) {
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "XMLHttpRequest");
return nullptr;
}