summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-12-14 12:17:58 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-14 15:11:57 +0100
commit4abdb68655340b66ee0d2b63cd384d46edd00d56 (patch)
tree0c657357a3a57e0eee379144926bea5e6e2cc7b6 /Tests
parent42b5c896e86b0d77d62ecae0ec78802aaff285a1 (diff)
downloadserenity-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.cpp2
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();
}