1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 07:34:59 +00:00
serenity/Userland/Libraries/LibWeb/Internals/Internals.cpp
Andreas Kling 18c54d8d40 LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs.

Work towards #20405
2023-08-08 07:39:11 +02:00

32 lines
669 B
C++

/*
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/VM.h>
#include <LibWeb/Bindings/InternalsPrototype.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Internals/Internals.h>
namespace Web::Internals {
Internals::Internals(JS::Realm& realm)
: Bindings::PlatformObject(realm)
{
}
Internals::~Internals() = default;
void Internals::initialize(JS::Realm& realm)
{
Base::initialize(realm);
Object::set_prototype(&Bindings::ensure_web_prototype<Bindings::InternalsPrototype>(realm, "Internals"));
}
void Internals::gc()
{
vm().heap().collect_garbage();
}
}