mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
committed by
Andreas Kling
parent
ce23efc5f6
commit
f87041bf3a
@@ -8,15 +8,15 @@
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <LibGC/CellAllocator.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/CellAllocator.h>
|
||||
#include <LibWeb/WebIDL/CallbackType.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
class EventHandler final : public JS::Cell {
|
||||
JS_CELL(EventHandler, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(EventHandler);
|
||||
GC_CELL(EventHandler, JS::Cell);
|
||||
GC_DECLARE_ALLOCATOR(EventHandler);
|
||||
|
||||
public:
|
||||
explicit EventHandler(ByteString);
|
||||
@@ -27,10 +27,10 @@ public:
|
||||
// NOTE: This does not contain Empty as part of the optimization of not allocating all event handler attributes up front.
|
||||
// FIXME: The string should actually be an "internal raw uncompiled handler" struct. This struct is just the uncompiled source code plus a source location for reporting parse errors.
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#internal-raw-uncompiled-handler
|
||||
Variant<ByteString, JS::GCPtr<WebIDL::CallbackType>> value;
|
||||
Variant<ByteString, GC::Ptr<WebIDL::CallbackType>> value;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-listener
|
||||
JS::GCPtr<DOM::DOMEventListener> listener;
|
||||
GC::Ptr<DOM::DOMEventListener> listener;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
Reference in New Issue
Block a user