diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-08 09:38:31 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-08 10:29:54 +0100 |
commit | 212319b25e62b6199d78e40108c0dfed5f9961c0 (patch) | |
tree | c82fd9abcfb36bdb666dcfca92e0ab3489343a68 /Userland/Libraries/LibJS/Runtime/Object.h | |
parent | 444a7eb9297cc46953bb234dec9c0c0b25f74645 (diff) | |
download | serenity-212319b25e62b6199d78e40108c0dfed5f9961c0.zip |
LibJS: Only allocate space for Object private elements if needed
Most JavaScript objects don't have private elements, so this reduces the
size of typical JS::Object instances by two pointers.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Object.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Object.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h index 8b8a08d76b..7395291b18 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.h +++ b/Userland/Libraries/LibJS/Runtime/Object.h @@ -208,7 +208,7 @@ private: Shape* m_shape { nullptr }; Vector<Value> m_storage; IndexedProperties m_indexed_properties; - Vector<PrivateElement> m_private_elements; // [[PrivateElements]] + OwnPtr<Vector<PrivateElement>> m_private_elements; // [[PrivateElements]] }; } |