mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02: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
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/f87041bf3a8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
@@ -14,10 +14,10 @@ namespace Web::WebIDL {
|
||||
// https://webidl.spec.whatwg.org/#idl-observable-array
|
||||
class ObservableArray final : public JS::Array {
|
||||
JS_OBJECT(ObservableArray, JS::Array);
|
||||
JS_DECLARE_ALLOCATOR(ObservableArray);
|
||||
GC_DECLARE_ALLOCATOR(ObservableArray);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<ObservableArray> create(JS::Realm& realm);
|
||||
static GC::Ref<ObservableArray> create(JS::Realm& realm);
|
||||
|
||||
virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const& property_key, JS::Value value, JS::Value receiver, JS::CacheablePropertyMetadata* metadata = nullptr) override;
|
||||
virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const& property_key) override;
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
private:
|
||||
using SetAnIndexedValueCallbackHeapFunction = JS::HeapFunction<SetAnIndexedValueCallbackFunction::FunctionType>;
|
||||
using DeleteAnIndexedValueCallbackHeapFunction = JS::HeapFunction<DeleteAnIndexedValueCallbackFunction::FunctionType>;
|
||||
using SetAnIndexedValueCallbackHeapFunction = GC::Function<SetAnIndexedValueCallbackFunction::FunctionType>;
|
||||
using DeleteAnIndexedValueCallbackHeapFunction = GC::Function<DeleteAnIndexedValueCallbackFunction::FunctionType>;
|
||||
|
||||
JS::GCPtr<SetAnIndexedValueCallbackHeapFunction> m_on_set_an_indexed_value;
|
||||
JS::GCPtr<DeleteAnIndexedValueCallbackHeapFunction> m_on_delete_an_indexed_value;
|
||||
GC::Ptr<SetAnIndexedValueCallbackHeapFunction> m_on_set_an_indexed_value;
|
||||
GC::Ptr<DeleteAnIndexedValueCallbackHeapFunction> m_on_delete_an_indexed_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user