summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Value.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-23 20:42:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-23 20:56:54 +0100
commit5d180d1f996ead27f9c5cb3db7f91e293de34d9d (patch)
treee881854dac5d749518562970d6194a0ef65736ec /Userland/Libraries/LibJS/Runtime/Value.h
parentb33a6a443e700cd80325d312f21c985b0687bb97 (diff)
downloadserenity-5d180d1f996ead27f9c5cb3db7f91e293de34d9d.zip
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Value.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h
index a24db80057..781d996c5d 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.h
+++ b/Userland/Libraries/LibJS/Runtime/Value.h
@@ -169,73 +169,73 @@ public:
double as_double() const
{
- ASSERT(type() == Type::Number);
+ VERIFY(type() == Type::Number);
return m_value.as_double;
}
bool as_bool() const
{
- ASSERT(type() == Type::Boolean);
+ VERIFY(type() == Type::Boolean);
return m_value.as_bool;
}
Object& as_object()
{
- ASSERT(type() == Type::Object);
+ VERIFY(type() == Type::Object);
return *m_value.as_object;
}
const Object& as_object() const
{
- ASSERT(type() == Type::Object);
+ VERIFY(type() == Type::Object);
return *m_value.as_object;
}
PrimitiveString& as_string()
{
- ASSERT(is_string());
+ VERIFY(is_string());
return *m_value.as_string;
}
const PrimitiveString& as_string() const
{
- ASSERT(is_string());
+ VERIFY(is_string());
return *m_value.as_string;
}
Symbol& as_symbol()
{
- ASSERT(is_symbol());
+ VERIFY(is_symbol());
return *m_value.as_symbol;
}
const Symbol& as_symbol() const
{
- ASSERT(is_symbol());
+ VERIFY(is_symbol());
return *m_value.as_symbol;
}
Cell* as_cell()
{
- ASSERT(is_cell());
+ VERIFY(is_cell());
return m_value.as_cell;
}
Accessor& as_accessor()
{
- ASSERT(is_accessor());
+ VERIFY(is_accessor());
return *m_value.as_accessor;
}
BigInt& as_bigint()
{
- ASSERT(is_bigint());
+ VERIFY(is_bigint());
return *m_value.as_bigint;
}
NativeProperty& as_native_property()
{
- ASSERT(is_native_property());
+ VERIFY(is_native_property());
return *m_value.as_native_property;
}