diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-20 20:49:48 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-20 21:56:40 +0100 |
commit | 86642add2facc03297abbdb857e0a127cc51295f (patch) | |
tree | 143df49f763c4bff69bec6e8dfe4f22dd1a57433 /Libraries | |
parent | a82f64d3d6fbf333e796e56952481190b9b1eb72 (diff) | |
download | serenity-86642add2facc03297abbdb857e0a127cc51295f.zip |
LibJS: Allow default-constructing a JS::Value (undefined)
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibJS/Runtime/Value.h | 5 |
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) { |