mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibWeb: Move setting of FormDataPrototype to initialize()
This moves the setting of FormDataPrototype out of the constructor to initialize().
This commit is contained in:
parent
4b1e501bdf
commit
f698585097
2 changed files with 9 additions and 1 deletions
|
@ -42,11 +42,18 @@ FormData::FormData(JS::Realm& realm, HashMap<DeprecatedString, Vector<FormDataEn
|
|||
: PlatformObject(realm)
|
||||
, m_entry_list(move(entry_list))
|
||||
{
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FormDataPrototype>(realm, "FormData"));
|
||||
}
|
||||
|
||||
FormData::~FormData() = default;
|
||||
|
||||
JS::ThrowCompletionOr<void> FormData::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FormDataPrototype>(realm, "FormData"));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void FormData::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue