summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-20 20:49:48 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-20 21:56:40 +0100
commit86642add2facc03297abbdb857e0a127cc51295f (patch)
tree143df49f763c4bff69bec6e8dfe4f22dd1a57433 /Libraries
parenta82f64d3d6fbf333e796e56952481190b9b1eb72 (diff)
downloadserenity-86642add2facc03297abbdb857e0a127cc51295f.zip
LibJS: Allow default-constructing a JS::Value (undefined)
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibJS/Runtime/Value.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibJS/Runtime/Value.h b/Libraries/LibJS/Runtime/Value.h
index ada26761c6..f54135ab8a 100644
--- a/Libraries/LibJS/Runtime/Value.h
+++ b/Libraries/LibJS/Runtime/Value.h
@@ -52,6 +52,11 @@ public:
bool is_boolean() const { return m_type == Type::Boolean; }
bool is_cell() const { return is_string() || is_object(); }
+ Value()
+ : m_type(Type::Undefined)
+ {
+ }
+
explicit Value(bool value)
: m_type(Type::Boolean)
{