1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

LibJS+LibWeb: Devirtualize may_interfere_with_indexed_property_access()

This commit is contained in:
iliadsh 2023-11-09 07:29:52 +00:00 committed by Andreas Kling
parent 7f501d4d8a
commit 89da731aa6
29 changed files with 51 additions and 61 deletions

View file

@ -14,7 +14,7 @@
namespace Web::HTML {
AudioTrackList::AudioTrackList(JS::Realm& realm)
: DOM::EventTarget(realm)
: DOM::EventTarget(realm, MayInterfereWithIndexedPropertyAccess::Yes)
, m_audio_tracks(realm.heap())
{
}

View file

@ -51,8 +51,6 @@ private:
virtual void initialize(JS::Realm&) override;
virtual JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> internal_get_own_property(JS::PropertyKey const& property_name) const override;
virtual bool may_interfere_with_indexed_property_access() const final { return true; }
JS::MarkedVector<JS::NonnullGCPtr<AudioTrack>> m_audio_tracks;
};

View file

@ -24,7 +24,7 @@ namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface
Location::Location(JS::Realm& realm)
: PlatformObject(realm)
: PlatformObject(realm, MayInterfereWithIndexedPropertyAccess::Yes)
{
}

View file

@ -64,8 +64,6 @@ public:
virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const&) override;
virtual JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> internal_own_property_keys() const override;
virtual bool may_interfere_with_indexed_property_access() const final { return true; }
HTML::CrossOriginPropertyDescriptorMap const& cross_origin_property_descriptor_map() const { return m_cross_origin_property_descriptor_map; }
HTML::CrossOriginPropertyDescriptorMap& cross_origin_property_descriptor_map() { return m_cross_origin_property_descriptor_map; }

View file

@ -14,7 +14,7 @@
namespace Web::HTML {
VideoTrackList::VideoTrackList(JS::Realm& realm)
: DOM::EventTarget(realm)
: DOM::EventTarget(realm, MayInterfereWithIndexedPropertyAccess::Yes)
, m_video_tracks(realm.heap())
{
}

View file

@ -44,8 +44,6 @@ private:
virtual void initialize(JS::Realm&) override;
virtual JS::ThrowCompletionOr<Optional<JS::PropertyDescriptor>> internal_get_own_property(JS::PropertyKey const& property_name) const override;
virtual bool may_interfere_with_indexed_property_access() const final { return true; }
JS::MarkedVector<JS::NonnullGCPtr<VideoTrack>> m_video_tracks;
};

View file

@ -22,7 +22,7 @@ namespace Web::HTML {
// 7.4 The WindowProxy exotic object, https://html.spec.whatwg.org/multipage/window-object.html#the-windowproxy-exotic-object
WindowProxy::WindowProxy(JS::Realm& realm)
: JS::Object(realm, nullptr)
: JS::Object(realm, nullptr, MayInterfereWithIndexedPropertyAccess::Yes)
{
}

View file

@ -31,8 +31,6 @@ public:
virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const&) override;
virtual JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> internal_own_property_keys() const override;
virtual bool may_interfere_with_indexed_property_access() const final { return true; }
JS::GCPtr<Window> window() const { return m_window; }
void set_window(JS::NonnullGCPtr<Window>);