diff options
author | Andreas Kling <kling@serenityos.org> | 2022-12-14 12:17:58 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-14 15:11:57 +0100 |
commit | 4abdb68655340b66ee0d2b63cd384d46edd00d56 (patch) | |
tree | 0c657357a3a57e0eee379144926bea5e6e2cc7b6 /Tests | |
parent | 42b5c896e86b0d77d62ecae0ec78802aaff285a1 (diff) | |
download | serenity-4abdb68655340b66ee0d2b63cd384d46edd00d56.zip |
LibJS: Remove Object(Object& prototype) footgun
This constructor was easily confused with a copy constructor, and it was
possible to accidentally copy-construct Objects in at least one way that
we dicovered (via generic ThrowCompletionOr construction).
This patch adds a mandatory ConstructWithPrototypeTag parameter to the
constructor to disambiguate it.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/LibWasm/test-wasm.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp index a35551eaa0..372cf53281 100644 --- a/Tests/LibWasm/test-wasm.cpp +++ b/Tests/LibWasm/test-wasm.cpp @@ -38,7 +38,7 @@ class WebAssemblyModule final : public JS::Object { public: explicit WebAssemblyModule(JS::Object& prototype) - : JS::Object(prototype) + : JS::Object(ConstructWithPrototypeTag::Tag, prototype) { m_machine.enable_instruction_count_limit(); } |