mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibJS: Add define_direct_property and remove the define_property helper
This removes all usages of the non-standard define_property helper method and replaces all it's usages with the specification required alternative or with define_direct_property where appropriate.
This commit is contained in:
parent
e915155ca4
commit
a6b8291a9b
Notes:
sideshowbarker
2024-07-18 10:18:57 +09:00
Author: https://github.com/IdanHo
Commit: a6b8291a9b
Pull-request: https://github.com/SerenityOS/serenity/pull/8478
Reviewed-by: https://github.com/linusg
81 changed files with 246 additions and 275 deletions
|
@ -226,12 +226,12 @@
|
|||
#include <LibWeb/Bindings/XMLHttpRequestEventTargetPrototype.h>
|
||||
#include <LibWeb/Bindings/XMLHttpRequestPrototype.h>
|
||||
|
||||
#define ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(interface_name, constructor_name, prototype_name) \
|
||||
{ \
|
||||
auto& constructor = ensure_web_constructor<constructor_name>(#interface_name); \
|
||||
constructor.define_property(vm.names.name, js_string(vm, #interface_name), JS::Attribute::Configurable); \
|
||||
auto& prototype = ensure_web_prototype<prototype_name>(#interface_name); \
|
||||
prototype.define_property(vm.names.constructor, &constructor, JS::Attribute::Writable | JS::Attribute::Configurable); \
|
||||
#define ADD_WINDOW_OBJECT_CONSTRUCTOR_AND_PROTOTYPE(interface_name, constructor_name, prototype_name) \
|
||||
{ \
|
||||
auto& constructor = ensure_web_constructor<constructor_name>(#interface_name); \
|
||||
constructor.define_direct_property(vm.names.name, js_string(vm, #interface_name), JS::Attribute::Configurable); \
|
||||
auto& prototype = ensure_web_prototype<prototype_name>(#interface_name); \
|
||||
prototype.define_direct_property(vm.names.constructor, &constructor, JS::Attribute::Writable | JS::Attribute::Configurable); \
|
||||
}
|
||||
|
||||
#define ADD_WINDOW_OBJECT_INTERFACE(interface_name) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue