diff options
author | Linus Groh <mail@linusgroh.de> | 2021-06-19 23:21:08 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-20 12:12:39 +0200 |
commit | e5753443ae8331c874c1516807f8a361c628d858 (patch) | |
tree | 142f0d23af42538e57aed28b386bedbde666ca92 /Userland/Libraries/LibJS/Runtime/SetIterator.cpp | |
parent | df095afbcca06d550d2034393f421981b4bf0b47 (diff) | |
download | serenity-e5753443ae8331c874c1516807f8a361c628d858.zip |
LibJS: Consistently make prototype the last argument in Object ctors
This is so that we can reliably allocate them in a template function,
e.g. in ordinary_create_from_constructor():
global_object.heap().allocate<T>(
global_object, forward<Args>(args)..., *prototype);
The majority of objects already take the prototype as the last argument,
so I updated the ones that didn't.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/SetIterator.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/SetIterator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp index 588e32877c..2ae33407cf 100644 --- a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp @@ -11,10 +11,10 @@ namespace JS { SetIterator* SetIterator::create(GlobalObject& global_object, Set& set, Object::PropertyKind iteration_kind) { - return global_object.heap().allocate<SetIterator>(global_object, *global_object.set_iterator_prototype(), set, iteration_kind); + return global_object.heap().allocate<SetIterator>(global_object, set, iteration_kind, *global_object.set_iterator_prototype()); } -SetIterator::SetIterator(Object& prototype, Set& set, Object::PropertyKind iteration_kind) +SetIterator::SetIterator(Set& set, Object::PropertyKind iteration_kind, Object& prototype) : Object(prototype) , m_set(set) , m_iteration_kind(iteration_kind) |