mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +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
|
@ -60,12 +60,10 @@ IntersectionObserver::~IntersectionObserver()
|
|||
});
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<void> IntersectionObserver::initialize(JS::Realm& realm)
|
||||
void IntersectionObserver::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::IntersectionObserverPrototype>(realm, "IntersectionObserver"));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void IntersectionObserver::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
private:
|
||||
explicit IntersectionObserver(JS::Realm&, JS::GCPtr<WebIDL::CallbackType> callback, Optional<Variant<JS::Handle<DOM::Element>, JS::Handle<DOM::Document>>> const& root, Vector<double>&& thresholds);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#dom-intersectionobserver-callback-slot
|
||||
|
|
|
@ -37,12 +37,10 @@ IntersectionObserverEntry::IntersectionObserverEntry(JS::Realm& realm, HighResol
|
|||
|
||||
IntersectionObserverEntry::~IntersectionObserverEntry() = default;
|
||||
|
||||
JS::ThrowCompletionOr<void> IntersectionObserverEntry::initialize(JS::Realm& realm)
|
||||
void IntersectionObserverEntry::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::IntersectionObserverEntryPrototype>(realm, "IntersectionObserverEntry"));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void IntersectionObserverEntry::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
private:
|
||||
IntersectionObserverEntry(JS::Realm&, HighResolutionTime::DOMHighResTimeStamp time, JS::GCPtr<Geometry::DOMRectReadOnly> root_bounds, JS::NonnullGCPtr<Geometry::DOMRectReadOnly> bounding_client_rect, JS::NonnullGCPtr<Geometry::DOMRectReadOnly> intersection_rect, bool is_intersecting, double intersection_ratio, JS::NonnullGCPtr<DOM::Element> target);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#dom-intersectionobserverentry-time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue