Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
Jan de Mooij 1deb4708b9 Bug 1713083 part 2 - Remove JSPROP_GETTER and JSPROP_SETTER. r=evilpie
We now set the descriptor's getter or setter when the corresponding argument
to DefineAccessorProperty is non-nullptr.

Usually the flag was passed only if the corresponding object argument was non-nullptr,
so there's no change in behavior for those.

The exception is `Console::PopulateConsoleNotificationInTheTargetScope` where we passed
JSPROP_SETTER with a nullptr setter. Changing this is likely okay; it shouldn't make a
difference for new properties anyway.

Note that code can still use the richer PropertyDescriptor API to set nullptr
getters/setters explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D116091
2021-05-27 15:03:38 +00:00
Jan de Mooij bd2c465bf1 Bug 1713083 part 1 - Stop using JSPROP_GETTER and JSPROP_SETTER to distinguish native vs self-hosted JSPropertySpec accessors. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D116090
2021-05-27 15:03:37 +00:00
Jan de Mooij 2eb2d5e541 Bug 1694685 part 5 - Replace JS_CHECK_ACCESSOR_FLAGS macro with a C++ template. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D106409
2021-03-08 12:07:15 +00:00
Jan de Mooij 39f486ec3a Bug 1694685 part 4 - Rename JSPropertySpec flags_ to attributes_. r=tcampbell
Depends on D106283

Differential Revision: https://phabricator.services.mozilla.com/D106408
2021-03-08 12:07:15 +00:00
Jan de Mooij 5d04487626 Bug 1694685 part 3 - Replace JSPROP_INTERNAL_USE_BIT with an isAccessor_ flag. r=tcampbell
JSPropertySpec used this bit to distinguish accessor vs value properties. Fortunately
we have unused padding bytes so we can use a bool instead.

Differential Revision: https://phabricator.services.mozilla.com/D106283
2021-03-08 12:07:14 +00:00
Jan de Mooij e5c2c0f5ef Bug 1694685 part 2 - Use enum class for ValueWrapper::type. r=tcampbell
Use a custom enum class instead of JSValueType so it's more obvious what the
supported types are.

Depends on D106406

Differential Revision: https://phabricator.services.mozilla.com/D106407
2021-03-08 12:07:14 +00:00
Jan de Mooij 8fed47db9b Bug 1694685 part 1 - Add static_assert for JSPropertySpec size. r=tcampbell
There are multiple (nested) unions so the size isn't obvious.
Adding a sanity check helps catch regressions.

Differential Revision: https://phabricator.services.mozilla.com/D106406
2021-03-08 12:07:13 +00:00
Jeff Walden 49d77af36e Bug 1663365 - Move |JSJitInfo| out of jsfriendapi.h to its own experimental header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89332
2020-09-08 22:52:34 +00:00
Tom Schuster b3744b6ba2 Bug 1633207 - JSPropertySpec support for doubles. r=arai
Depends on D72540

Differential Revision: https://phabricator.services.mozilla.com/D72542
2020-04-26 18:16:55 +00:00
Tom Schuster 708481e981 Bug 1633145 - Hide internal flags in JSPropertySpec. r=arai
Consumers should not have to care about JSPROP_INTERNAL_USE_BIT.

Differential Revision: https://phabricator.services.mozilla.com/D72528
2020-04-25 14:06:40 +00:00
Jon Coppeard a9cd50a889 Bug 1628751 - Replace use of standard library traits classes by the _v or _t versions r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D70405

--HG--
extra : moz-landing-system : lando
2020-04-14 09:05:55 +00:00
Philip Chimento 1fab6fc78e Bug 1426865 - Add default visibility to JSAPI symbols. r=sfink
Depends on D49098

Differential Revision: https://phabricator.services.mozilla.com/D49099

--HG--
extra : moz-landing-system : lando
2019-10-27 22:34:11 +00:00
Tooru Fujisawa 66e25f6243 Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-13 10:26:48 +00:00
Csoregi Natalia e3fa16f6f6 Backed out changeset 1760c6913c09 (bug 1549340) for rust bustage. CLOSED TREE
--HG--
extra : rebase_source : 19015aa11df57b8026881f6a86a4714887ec0244
2019-05-10 18:16:09 +03:00
Tooru Fujisawa 9fa8a62e9e Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-10 14:08:07 +00:00
Tooru Fujisawa a086143db0 Bug 1549340 - Use macro instead of static method to pass reinterpret_cast to constexpr. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30158

--HG--
extra : moz-landing-system : lando
2019-05-07 06:53:28 +00:00
Sylvestre Ledru 96da5036ad Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28948

--HG--
extra : moz-landing-system : lando
2019-04-28 09:30:05 +00:00
Tooru Fujisawa 56585dc81e Bug 1543843 - Add constructors to JSPropertySpec and inner structs/unions. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D27277

--HG--
extra : moz-landing-system : lando
2019-04-26 01:01:15 +00:00
Jeff Walden d64076ac48 Bug 1518812 - Redo the fix for bug 1516567 atop the moving of the relevant code to js/public/PropertySpec.h in bug 1517624. r=jandem 2019-01-09 08:45:05 -08:00
Jeff Walden a128f0c35c Bug 1517624 - Move JSPropertySpec and JSFunctionSpec definitions into a new js/public/PropertySpec.h header. r=arai
--HG--
extra : rebase_source : b80911e01f984ee9f99fbbc6c4552ef3d2178587
2019-01-03 15:37:01 -06:00