mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:07:45 +00:00
LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs. Work towards #20405
This commit is contained in:
parent
fde26c53f0
commit
18c54d8d40
804 changed files with 1330 additions and 2171 deletions
|
@ -79,12 +79,10 @@ AudioContext::AudioContext(JS::Realm& realm, AudioContextOptions const& context_
|
|||
|
||||
AudioContext::~AudioContext() = default;
|
||||
|
||||
JS::ThrowCompletionOr<void> AudioContext::initialize(JS::Realm& realm)
|
||||
void AudioContext::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AudioContextPrototype>(realm, "AudioContext"));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void AudioContext::visit_edges(Cell::Visitor& visitor)
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
private:
|
||||
explicit AudioContext(JS::Realm&, AudioContextOptions const& context_options);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
double m_base_latency { 0 };
|
||||
|
|
|
@ -17,12 +17,10 @@ BaseAudioContext::BaseAudioContext(JS::Realm& realm)
|
|||
|
||||
BaseAudioContext::~BaseAudioContext() = default;
|
||||
|
||||
JS::ThrowCompletionOr<void> BaseAudioContext::initialize(JS::Realm& realm)
|
||||
void BaseAudioContext::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::BaseAudioContextPrototype>(realm, "BaseAudioContext"));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void BaseAudioContext::set_onstatechange(WebIDL::CallbackType* event_handler)
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
protected:
|
||||
explicit BaseAudioContext(JS::Realm&);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
float m_sample_rate { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue