mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
LibJS+LibWeb: Devirtualize may_interfere_with_indexed_property_access()
This commit is contained in:
parent
7f501d4d8a
commit
89da731aa6
29 changed files with 51 additions and 61 deletions
|
@ -12,7 +12,7 @@
|
|||
namespace Web::Bindings {
|
||||
|
||||
LegacyPlatformObject::LegacyPlatformObject(JS::Realm& realm)
|
||||
: PlatformObject(realm)
|
||||
: PlatformObject(realm, MayInterfereWithIndexedPropertyAccess::Yes)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@ public:
|
|||
virtual JS::ThrowCompletionOr<bool> internal_prevent_extensions() 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; }
|
||||
|
||||
enum class IgnoreNamedProps {
|
||||
No,
|
||||
Yes,
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
namespace Web::Bindings {
|
||||
|
||||
PlatformObject::PlatformObject(JS::Realm& realm)
|
||||
: JS::Object(realm, nullptr)
|
||||
PlatformObject::PlatformObject(JS::Realm& realm, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)
|
||||
: JS::Object(realm, nullptr, may_interfere_with_indexed_property_access)
|
||||
{
|
||||
}
|
||||
|
||||
PlatformObject::PlatformObject(JS::Object& prototype)
|
||||
: JS::Object(ConstructWithPrototypeTag::Tag, prototype)
|
||||
PlatformObject::PlatformObject(JS::Object& prototype, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)
|
||||
: JS::Object(ConstructWithPrototypeTag::Tag, prototype, may_interfere_with_indexed_property_access)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ public:
|
|||
[[nodiscard]] virtual bool implements_interface(DeprecatedString const&) const { return false; }
|
||||
|
||||
protected:
|
||||
explicit PlatformObject(JS::Realm&);
|
||||
explicit PlatformObject(JS::Object& prototype);
|
||||
explicit PlatformObject(JS::Realm&, MayInterfereWithIndexedPropertyAccess = MayInterfereWithIndexedPropertyAccess::No);
|
||||
explicit PlatformObject(JS::Object& prototype, MayInterfereWithIndexedPropertyAccess = MayInterfereWithIndexedPropertyAccess::No);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue