diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-07-06 02:15:08 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-07-06 14:20:30 +0100 |
commit | a6b8291a9b3f72c6c70141dafb85d380a68ebdd0 (patch) | |
tree | 908ed08ffe0d308d926fe0c605983e25148335cf /Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h | |
parent | e915155ca452bb9c731051030b0cbb6883d4809d (diff) | |
download | serenity-a6b8291a9b3f72c6c70141dafb85d380a68ebdd0.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h index cdc01843be..d39375510e 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObjectHelper.h @@ -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) \ |