diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-08 12:08:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-08 12:08:51 +0200 |
commit | 10aebabf0bd21c2b0599525a708c95dca502fa7a (patch) | |
tree | ec5689f107f59fa980c38c2bd78e8be822a9e7c4 /Libraries/LibJS/Runtime | |
parent | 4e33fbdb67304778a67c8d68b0b3500ae36b935b (diff) | |
download | serenity-10aebabf0bd21c2b0599525a708c95dca502fa7a.zip |
LibJS: BigInts and Symbols values are cells and the GC needs this info
Make Value::is_cell() return true for BigInts and Symbols. This makes
all the tests pass when running run-tests.sh -g (GC after every alloc.)
Diffstat (limited to 'Libraries/LibJS/Runtime')
-rw-r--r-- | Libraries/LibJS/Runtime/Value.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Runtime/Value.h b/Libraries/LibJS/Runtime/Value.h index b7a3d712eb..2d72505c18 100644 --- a/Libraries/LibJS/Runtime/Value.h +++ b/Libraries/LibJS/Runtime/Value.h @@ -69,7 +69,7 @@ public: bool is_symbol() const { return m_type == Type::Symbol; } bool is_accessor() const { return m_type == Type::Accessor; }; bool is_bigint() const { return m_type == Type::BigInt; }; - bool is_cell() const { return is_string() || is_accessor() || is_object(); } + bool is_cell() const { return is_string() || is_accessor() || is_object() || is_bigint() || is_symbol(); } bool is_array() const; bool is_function() const; |