mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-15 06:41:50 +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:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue