mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +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
|
@ -10,9 +10,9 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(BufferedChangeEvent);
|
||||
GC_DEFINE_ALLOCATOR(BufferedChangeEvent);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<BufferedChangeEvent>> BufferedChangeEvent::construct_impl(JS::Realm& realm, AK::FlyString const& type, BufferedChangeEventInit const& event_init)
|
||||
WebIDL::ExceptionOr<GC::Ref<BufferedChangeEvent>> BufferedChangeEvent::construct_impl(JS::Realm& realm, AK::FlyString const& type, BufferedChangeEventInit const& event_init)
|
||||
{
|
||||
return realm.create<BufferedChangeEvent>(realm, type, event_init);
|
||||
}
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
struct BufferedChangeEventInit : public DOM::EventInit {
|
||||
JS::GCPtr<HTML::TimeRanges> added_ranges;
|
||||
JS::GCPtr<HTML::TimeRanges> removed_ranges;
|
||||
GC::Ptr<HTML::TimeRanges> added_ranges;
|
||||
GC::Ptr<HTML::TimeRanges> removed_ranges;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/media-source/#bufferedchangeevent-interface
|
||||
class BufferedChangeEvent : public DOM::Event {
|
||||
WEB_PLATFORM_OBJECT(BufferedChangeEvent, DOM::Event);
|
||||
JS_DECLARE_ALLOCATOR(BufferedChangeEvent);
|
||||
GC_DECLARE_ALLOCATOR(BufferedChangeEvent);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<BufferedChangeEvent>> construct_impl(JS::Realm&, FlyString const& type, BufferedChangeEventInit const& = {});
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<GC::Ref<BufferedChangeEvent>> construct_impl(JS::Realm&, FlyString const& type, BufferedChangeEventInit const& = {});
|
||||
|
||||
private:
|
||||
BufferedChangeEvent(JS::Realm&, FlyString const& type, BufferedChangeEventInit const& event_init);
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ManagedMediaSource);
|
||||
GC_DEFINE_ALLOCATOR(ManagedMediaSource);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<ManagedMediaSource>> ManagedMediaSource::construct_impl(JS::Realm& realm)
|
||||
WebIDL::ExceptionOr<GC::Ref<ManagedMediaSource>> ManagedMediaSource::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
return realm.create<ManagedMediaSource>(realm);
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#managedmediasource-interface
|
||||
class ManagedMediaSource : public MediaSource {
|
||||
WEB_PLATFORM_OBJECT(ManagedMediaSource, MediaSource);
|
||||
JS_DECLARE_ALLOCATOR(ManagedMediaSource);
|
||||
GC_DECLARE_ALLOCATOR(ManagedMediaSource);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<ManagedMediaSource>> construct_impl(JS::Realm&);
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<GC::Ref<ManagedMediaSource>> construct_impl(JS::Realm&);
|
||||
|
||||
private:
|
||||
ManagedMediaSource(JS::Realm&);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ManagedSourceBuffer);
|
||||
GC_DEFINE_ALLOCATOR(ManagedSourceBuffer);
|
||||
|
||||
ManagedSourceBuffer::ManagedSourceBuffer(JS::Realm& realm)
|
||||
: SourceBuffer(realm)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#managedsourcebuffer-interface
|
||||
class ManagedSourceBuffer : public SourceBuffer {
|
||||
WEB_PLATFORM_OBJECT(ManagedSourceBuffer, SourceBuffer);
|
||||
JS_DECLARE_ALLOCATOR(ManagedSourceBuffer);
|
||||
GC_DECLARE_ALLOCATOR(ManagedSourceBuffer);
|
||||
|
||||
public:
|
||||
private:
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(MediaSource);
|
||||
GC_DEFINE_ALLOCATOR(MediaSource);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaSource>> MediaSource::construct_impl(JS::Realm& realm)
|
||||
WebIDL::ExceptionOr<GC::Ref<MediaSource>> MediaSource::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
return realm.create<MediaSource>(realm);
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#dom-mediasource
|
||||
class MediaSource : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(MediaSource, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(MediaSource);
|
||||
GC_DECLARE_ALLOCATOR(MediaSource);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaSource>> construct_impl(JS::Realm&);
|
||||
[[nodiscard]] static WebIDL::ExceptionOr<GC::Ref<MediaSource>> construct_impl(JS::Realm&);
|
||||
|
||||
// https://w3c.github.io/media-source/#dom-mediasource-canconstructindedicatedworker
|
||||
static bool can_construct_in_dedicated_worker(JS::VM&) { return true; }
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(MediaSourceHandle);
|
||||
GC_DEFINE_ALLOCATOR(MediaSourceHandle);
|
||||
|
||||
MediaSourceHandle::MediaSourceHandle(JS::Realm& realm)
|
||||
: Bindings::PlatformObject(realm)
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#dom-mediasourcehandle
|
||||
class MediaSourceHandle : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(MediaSourceHandle, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(MediaSourceHandle);
|
||||
GC_DECLARE_ALLOCATOR(MediaSourceHandle);
|
||||
|
||||
public:
|
||||
private:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(SourceBuffer);
|
||||
GC_DEFINE_ALLOCATOR(SourceBuffer);
|
||||
|
||||
SourceBuffer::SourceBuffer(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#dom-sourcebuffer
|
||||
class SourceBuffer : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(SourceBuffer, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(SourceBuffer);
|
||||
GC_DECLARE_ALLOCATOR(SourceBuffer);
|
||||
|
||||
protected:
|
||||
SourceBuffer(JS::Realm&);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Web::MediaSourceExtensions {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(SourceBufferList);
|
||||
GC_DEFINE_ALLOCATOR(SourceBufferList);
|
||||
|
||||
SourceBufferList::SourceBufferList(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web::MediaSourceExtensions {
|
|||
// https://w3c.github.io/media-source/#dom-sourcebufferlist
|
||||
class SourceBufferList : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(SourceBufferList, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(SourceBufferList);
|
||||
GC_DECLARE_ALLOCATOR(SourceBufferList);
|
||||
|
||||
private:
|
||||
SourceBufferList(JS::Realm&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue