summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-01-13 20:34:44 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-14 08:13:32 +0100
commitcab3049dcc58d6fb85c1613bb6a23acdee13b98e (patch)
tree4a066fa620bf6a638f356c7eb134d55ac4d00279
parentf67f8fdbf2e4096104006fb539d1f1d5bba42f96 (diff)
downloadserenity-cab3049dcc58d6fb85c1613bb6a23acdee13b98e.zip
LibJS: Rename ErrorType::ToObjectNullOr{Undef => Undefined}
This seems like an unnecessary and uncommon abbreviation.
-rw-r--r--Userland/Libraries/LibJS/Runtime/ErrorTypes.h2
-rw-r--r--Userland/Libraries/LibJS/Runtime/StringPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
index e406d4377f..a66bcb4131 100644
--- a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
+++ b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
@@ -155,7 +155,7 @@
M(StringRepeatCountMustBe, "repeat count must be a {} number") \
M(ThisHasNotBeenInitialized, "|this| has not been initialized") \
M(ThisIsAlreadyInitialized, "|this| is already initialized") \
- M(ToObjectNullOrUndef, "ToObject on null or undefined") \
+ M(ToObjectNullOrUndefined, "ToObject on null or undefined") \
M(TypedArrayInvalidBufferLength, "Invalid buffer length for {}: must be a multiple of {}, got {}") \
M(TypedArrayInvalidByteOffset, "Invalid byte offset for {}: must be a multiple of {}, got {}") \
M(TypedArrayOutOfRangeByteOffset, "Typed array byte offset {} is out of range for buffer with length {}") \
diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
index d0f4d495ff..baeeda438e 100644
--- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
@@ -616,7 +616,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringPrototype::symbol_iterator)
{
auto this_object = vm.this_value(global_object);
if (this_object.is_nullish()) {
- vm.throw_exception<TypeError>(global_object, ErrorType::ToObjectNullOrUndef);
+ vm.throw_exception<TypeError>(global_object, ErrorType::ToObjectNullOrUndefined);
return {};
}
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp
index 1d397c9536..003e0378b1 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Value.cpp
@@ -355,7 +355,7 @@ Object* Value::to_object(GlobalObject& global_object) const
switch (m_type) {
case Type::Undefined:
case Type::Null:
- global_object.vm().throw_exception<TypeError>(global_object, ErrorType::ToObjectNullOrUndef);
+ global_object.vm().throw_exception<TypeError>(global_object, ErrorType::ToObjectNullOrUndefined);
return nullptr;
case Type::Boolean:
return BooleanObject::create(global_object, m_value.as_bool);