mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 23:31:55 +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
|
@ -11,15 +11,15 @@
|
|||
|
||||
namespace Web::WebAudio {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(OfflineAudioContext);
|
||||
GC_DEFINE_ALLOCATOR(OfflineAudioContext);
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<OfflineAudioContext>> OfflineAudioContext::construct_impl(JS::Realm& realm, OfflineAudioContextOptions const& context_options)
|
||||
WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> OfflineAudioContext::construct_impl(JS::Realm& realm, OfflineAudioContextOptions const& context_options)
|
||||
{
|
||||
return construct_impl(realm, context_options.number_of_channels, context_options.length, context_options.sample_rate);
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-offlineaudiocontext-numberofchannels-length-samplerate
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<OfflineAudioContext>> OfflineAudioContext::construct_impl(JS::Realm& realm,
|
||||
WebIDL::ExceptionOr<GC::Ref<OfflineAudioContext>> OfflineAudioContext::construct_impl(JS::Realm& realm,
|
||||
WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate)
|
||||
{
|
||||
// The OfflineAudioContext can be constructed with the same arguments as AudioContext.createBuffer.
|
||||
|
@ -32,17 +32,17 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<OfflineAudioContext>> OfflineAudioContext::
|
|||
OfflineAudioContext::~OfflineAudioContext() = default;
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-startrendering
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> OfflineAudioContext::start_rendering()
|
||||
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> OfflineAudioContext::start_rendering()
|
||||
{
|
||||
return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement OfflineAudioContext::start_rendering"_string);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> OfflineAudioContext::resume()
|
||||
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> OfflineAudioContext::resume()
|
||||
{
|
||||
return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement OfflineAudioContext::resume"_string);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> OfflineAudioContext::suspend(double suspend_time)
|
||||
WebIDL::ExceptionOr<GC::Ref<WebIDL::Promise>> OfflineAudioContext::suspend(double suspend_time)
|
||||
{
|
||||
(void)suspend_time;
|
||||
return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement OfflineAudioContext::suspend"_string);
|
||||
|
@ -56,13 +56,13 @@ WebIDL::UnsignedLong OfflineAudioContext::length() const
|
|||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-oncomplete
|
||||
JS::GCPtr<WebIDL::CallbackType> OfflineAudioContext::oncomplete()
|
||||
GC::Ptr<WebIDL::CallbackType> OfflineAudioContext::oncomplete()
|
||||
{
|
||||
return event_handler_attribute(HTML::EventNames::complete);
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-oncomplete
|
||||
void OfflineAudioContext::set_oncomplete(JS::GCPtr<WebIDL::CallbackType> value)
|
||||
void OfflineAudioContext::set_oncomplete(GC::Ptr<WebIDL::CallbackType> value)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::complete, value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue