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

15 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky d36e5a4ea5 Bug 1214364 part 4. Only output full-featured Init methods for dictionaries that need them. r=peterv
Dictionaries that we never initialize with JS values don't need a full-featured
Init() method.  Instead, we output a cut-down Init() method that doesn't even
take a JSContext and Value as argument, and skips as much work as it can.  It
uses constant-false for "is the value present?", but also, to avoid compilation
errors due to use of `cx` and `val` in now-dead conversion code, it tells the
native-to-JS conversion machinery that the value is always missing, which lets
it skip most of the the work it would normally try to do and just output
initialization to the default value.  We only need to do this for members that
have default values; the others either remain no-passed or are required members
with no default-initialization behavior.

This saves about 330KB of codesize on Linux64 without PGO and 285KB with PGO.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:24:31 +00:00
Boris Zbarsky e5497b955e Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
For review purposes, the important changes are in dom/bindings/Configuration.py
and dom/bindings/parser.

The changes to the IDL files were done by running these in dom/webidl
and dom/bindings/test:

  perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl

And running this in dom/chrome-webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl

and then fixing all the resulting parser failures.  I then verified that the
generated code is the same as before this change.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 15:26:14 +00:00
Boris Zbarsky 1128b8dee8 Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45394

--HG--
extra : moz-landing-system : lando
2019-09-12 11:01:17 +00:00
Boris Zbarsky 19251f27ce Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 07:52:35 +00:00
Cosmin Sabou 3ef8d24958 Backed out changeset 8e16f13a88c8 (bug 1562680) for colliding with Bug 1366738 that was backed out. CLOSED TREE 2019-07-03 10:46:39 +03:00
Boris Zbarsky 73f095abc4 Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:44:36 +00:00
Mihai Alexandru Michis c7fc76c18f Backed out changeset 12653dd76667 (bug 1562680) for causing bustages in FuzzingFunctions.webidl CLOSED TREE 2019-07-03 09:34:48 +03:00
Boris Zbarsky 3a5c721abb Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:15:54 +00:00
Andrea Marchesini dbaf607895 Bug 1490044 - Remove DOMPrefs MACRO for WebIDL support. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33509

--HG--
extra : moz-landing-system : lando
2019-06-13 09:01:41 +00:00
Boris Zbarsky adec753d03 Bug 1535384 part 4. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for the reporting observer callback. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D23775

--HG--
extra : moz-landing-system : lando
2019-03-19 04:33:54 +00:00
Boris Zbarsky a998830a71 Bug 1535124 part 2. Mark Web IDL callbacks MOZ_CAN_RUN_SCRIPT by default. r=qdot
We add a [MOZ_CAN_RUN_SCRIPT_BOUNDARY] opt-out for now to keep the tree
compiling.  The naming purposefully matches the C++ annotation that has a
similar effect, top make it easy to search for.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 12:59:54 +00:00
Andrea Marchesini 2d4f513ae0 Bug 1508310 - Implement Report-to header support - part 1 - Header parser, r=smaug 2018-12-01 21:26:08 +01:00
Andrea Marchesini e4c7d00316 Bug 1492036 - Reporting API - part 5 - tests, r=smaug 2018-11-14 20:02:33 +01:00
Andrea Marchesini b840bc9f3b Bug 1492036 - Reporting API - part 2 - WebIDL for DeprecationReportBody, r=smaug 2018-11-14 20:02:32 +01:00
Andrea Marchesini 5a9c35f647 Bug 1492036 - Reporting API - part 1 - WebIDL, r=smaug 2018-11-14 20:02:32 +01:00