1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

Ladybird: Fix build after LibWeb+LibJS GC changes

This commit is contained in:
Andreas Kling 2022-09-06 00:42:16 +02:00 committed by Andrew Kaster
parent 9789d8b769
commit dcab11f5e9
5 changed files with 27 additions and 28 deletions

View file

@ -7,15 +7,12 @@
#include "ConsoleGlobalObject.h"
#include <LibJS/Runtime/Completion.h>
#include <LibWeb/Bindings/NodeWrapper.h>
#include <LibWeb/Bindings/NodeWrapperFactory.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/Window.h>
namespace Ladybird {
ConsoleGlobalObject::ConsoleGlobalObject(JS::Realm& realm, Web::Bindings::WindowObject& parent_object)
ConsoleGlobalObject::ConsoleGlobalObject(JS::Realm& realm, Web::HTML::Window& parent_object)
: JS::GlobalObject(realm)
, m_window_object(&parent_object)
{
@ -98,7 +95,6 @@ JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> ConsoleGlobalObject::internal
JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
{
auto& realm = *vm.current_realm();
auto* this_object = TRY(vm.this_value().to_object(vm));
if (!is<ConsoleGlobalObject>(this_object))
@ -110,7 +106,7 @@ JS_DEFINE_NATIVE_FUNCTION(ConsoleGlobalObject::inspected_node_getter)
if (!inspected_node)
return JS::js_undefined();
return Web::Bindings::wrap(realm, *inspected_node);
return &*inspected_node;
}
}