mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-25 19:51:59 +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
|
@ -15,7 +15,7 @@ namespace Web::WebAudio {
|
|||
|
||||
// https://webaudio.github.io/web-audio-api/#AudioBufferSourceOptions
|
||||
struct AudioBufferSourceOptions {
|
||||
JS::GCPtr<AudioBuffer> buffer;
|
||||
GC::Ptr<AudioBuffer> buffer;
|
||||
float detune { 0 };
|
||||
bool loop { false };
|
||||
double loop_end { 0 };
|
||||
|
@ -26,15 +26,15 @@ struct AudioBufferSourceOptions {
|
|||
// https://webaudio.github.io/web-audio-api/#AudioBufferSourceNode
|
||||
class AudioBufferSourceNode : public AudioScheduledSourceNode {
|
||||
WEB_PLATFORM_OBJECT(AudioBufferSourceNode, AudioScheduledSourceNode);
|
||||
JS_DECLARE_ALLOCATOR(AudioBufferSourceNode);
|
||||
GC_DECLARE_ALLOCATOR(AudioBufferSourceNode);
|
||||
|
||||
public:
|
||||
virtual ~AudioBufferSourceNode() override;
|
||||
|
||||
WebIDL::ExceptionOr<void> set_buffer(JS::GCPtr<AudioBuffer>);
|
||||
JS::GCPtr<AudioBuffer> buffer() const;
|
||||
JS::NonnullGCPtr<AudioParam> playback_rate() const;
|
||||
JS::NonnullGCPtr<AudioParam> detune() const;
|
||||
WebIDL::ExceptionOr<void> set_buffer(GC::Ptr<AudioBuffer>);
|
||||
GC::Ptr<AudioBuffer> buffer() const;
|
||||
GC::Ref<AudioParam> playback_rate() const;
|
||||
GC::Ref<AudioParam> detune() const;
|
||||
WebIDL::ExceptionOr<void> set_loop(bool);
|
||||
bool loop() const;
|
||||
WebIDL::ExceptionOr<void> set_loop_start(double);
|
||||
|
@ -46,19 +46,19 @@ public:
|
|||
|
||||
WebIDL::ExceptionOr<void> start(Optional<double>, Optional<double>, Optional<double>);
|
||||
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AudioBufferSourceNode>> create(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AudioBufferSourceNode>> construct_impl(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
static WebIDL::ExceptionOr<GC::Ref<AudioBufferSourceNode>> create(JS::Realm&, GC::Ref<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
static WebIDL::ExceptionOr<GC::Ref<AudioBufferSourceNode>> construct_impl(JS::Realm&, GC::Ref<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
|
||||
protected:
|
||||
AudioBufferSourceNode(JS::Realm&, JS::NonnullGCPtr<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
AudioBufferSourceNode(JS::Realm&, GC::Ref<BaseAudioContext>, AudioBufferSourceOptions const& = {});
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
private:
|
||||
JS::GCPtr<AudioBuffer> m_buffer;
|
||||
JS::NonnullGCPtr<AudioParam> m_playback_rate;
|
||||
JS::NonnullGCPtr<AudioParam> m_detune;
|
||||
GC::Ptr<AudioBuffer> m_buffer;
|
||||
GC::Ref<AudioParam> m_playback_rate;
|
||||
GC::Ref<AudioParam> m_detune;
|
||||
bool m_loop { false };
|
||||
double m_loop_start { 0.0 };
|
||||
double m_loop_end { 0.0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue