mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS+LibWeb: Prevent double invocation of [[GetOwnProperty]]
The `[[GetOwnProperty]]` internal method invocation in `OrdinarySetWithOwnDescriptor` was being invocated again with the same parameters in the `[[DefineOwnProperty]]` internal method that is also later called in `OrdinarySetWithOwnDescriptor`. The `PlatformObject.[[DefineOwnProperty]]` has similair logic. This change adds an optional parameter to the `[[DefineOwnProperty]]` internal method so the results of the previous `[[GetOwnProperty]]` internal method invocation can be re-used.
This commit is contained in:
parent
641c549463
commit
69f96122b6
Notes:
github-actions[bot]
2024-11-02 11:27:54 +00:00
Author: https://github.com/yyny
Commit: 69f96122b6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2114
20 changed files with 47 additions and 36 deletions
|
@ -28,7 +28,7 @@ protected:
|
|||
|
||||
private:
|
||||
virtual ThrowCompletionOr<Optional<PropertyDescriptor>> internal_get_own_property(PropertyKey const&) const override;
|
||||
virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&) override;
|
||||
virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&, Optional<PropertyDescriptor>* precomputed_get_own_property = nullptr) override;
|
||||
virtual ThrowCompletionOr<MarkedVector<Value>> internal_own_property_keys() const override;
|
||||
|
||||
virtual bool is_string_object() const final { return true; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue