Commit Graph

579468 Commits

Author SHA1 Message Date
David Parks
c6dc5f3406 Bug 1433855 - Make sure plugin function broker's PostToDispatchThread is Waiting before Notifying it. r=jimm
The Monitor's condition variable could be notified before the calling thread had begun to Wait for it.  This caused the Notify to be missed, leading to hangs.  By grabbing the Monitor in PostToDispatchHelper, we know Wait has been called because, otherwise, the calling thread would still hold the Monitor.
2018-01-30 17:32:27 -08:00
Nicholas Nethercote
67e80b725b Bug 1423840 - Rewrite the prefs parser. r=glandium,Manishearth
The prefs parser has two significant problems.

- It doesn't separate tokenizing from parsing.

- It is implemented as a loop around a big switch on a "current state"
  variable.

As a result, it is hard to understand and modify, slower than it could be, and
in obscure cases (involving comments and whitespace) it fails to parse what
should be valid input.

This patch replaces it with a recursive descent parser (albeit one without any
recursion!) that has separate tokenization. The new parser is easier to
understand and modify, more correct, and has better error messages. It doesn't
do error recovery, but that would be much easier to add than in the old parser.

The new parser also runs about 1.9x faster than the existing parser. (As
measured by parsing greprefs.js's contents from memory 1000 times in
succession, omitting the prefs hash table construction. If the table
construction is included, it's about 1.6x faster.)

The new parser is slightly stricter than the old parser in a few ways.

- Disconcertingly, the old parser allowed arbitrary junk between prefs
  (including at the start and end of the prefs file) so long as that junk
  didn't include any of the following chars: '/', '#', 'u', 's', 'p'. I.e.
  lines like these:

    !foo@bar&pref("prefname", true);
    ticky_pref("prefname", true);       // missing 's' at start
    User_pref("prefname", true);        // should be 'u' at start

  would all be treated the same as this:

    pref("prefname", true);

  The new parser disallows such junk because it isn't necessary and seems like
  an unintentional botch by the old parser.

- The old parser allowed character 0x1a (SUB) between tokens and treated it
  like '\n'.

  The new parser does not allow this character. SUB was used to indicate
  end-of-file (*not* end-of-line) in some old operating systems such as MS-DOS,
  but this doesn't seem necessary today.

- The old parser tolerated (with a warning) invalid escape sequences within
  string literals -- such as "\q" (not a valid escape) and "\x1" and "\u12"
  (both of which have insufficient hex digits) -- accepting them literally.

  The new parser does not tolerate invalid escape sequences because it doesn't
  seem necessary and would complicate things.

- The old parser tolerated character 0x00 (NUL) within string literals; this is
  dangerous because C++ code that manipulates string values with embedded NULs
  will almost certainly consider those chars as end-of-string markers.

  The new parser treats NUL chars as end-of-file, to avoid this danger and
  because it facilitates a significant optimization (described within the
  code).

- The old parser allowed integer literals to overflow, silently wrapping them.

  The new parser treats integer overflow as a parse error. This seems better,
  and it caught an existing overflow in testing/profiles/prefs_general.js, for
  places.database.lastMaintenance (see bug 1424030).

The first of these changes meant that a couple of existing prefs with ";;" at
the end had to be changed (done in the preceding patch).

The minor increase in strictness shouldn't be a problem for default pref files
such as greprefs.js within the application (which we can modify), nor for
app-written prefs files such as prefs.js. It could affect user-written prefs
files such as user.js; the experience above suggests that ";;" is the most
likely problem in practice. In my opinion, the risk here is acceptable.

The new parser also does a better job of tracking line numbers because it (a)
treats "\r\n" sequences as a single end-of-line marker, and (a) pays attention
to end-of-line sequences within string literals.

Finally, the patch adds thorough tests of both valid and invalid syntax.

MozReview-Commit-ID: 8EYWH7KxGG
* * *
[mq]: win-fix

MozReview-Commit-ID: 91Bxjfghqfw

--HG--
extra : rebase_source : a8773413e5d68c33e4329df6819b6e1f82c22b85
2017-12-03 00:26:36 +11:00
Nicholas Nethercote
7d28c00d31 Bug 1423840 - Remove extraneous semicolons in all.js. r=glandium
The new prefs parser won't allow them.

MozReview-Commit-ID: 90EFcx0sbdf

--HG--
extra : rebase_source : 4fb9eade53fbf9eb04fe6c68f94454371cea0e6f
2017-12-08 15:15:20 +11:00
shindli
8bf605352e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-01 00:38:55 +02:00
shindli
a9ac1e44cc Merge inbound to mozilla-central. a=merge 2018-02-01 00:32:39 +02:00
shindli
91bc2053a8 Merge autoland to mozilla-central. a=merge 2018-02-01 00:30:10 +02:00
Felipe Gomes
cf0ca23dac Bug 1434164 - Use ChromeUtils.defineModuleGetter. r=me ON A CLOSED TREE
MozReview-Commit-ID: GJ5UomDMgvU
2018-01-31 19:44:21 -02:00
Nathan Froyd
87e87fc09b Bug 1434659 - move --enable-oom-breakpoint to moz.configure; r=nalexander 2018-01-31 14:35:57 -05:00
ffxbld
03673b57d5 No bug, Automated HPKP preload list update from host bld-linux64-spot-302 - a=hpkp-update 2018-01-31 11:29:14 -08:00
ffxbld
d07a5ef4b0 No bug, Automated HSTS preload list update from host bld-linux64-spot-302 - a=hsts-update 2018-01-31 11:29:10 -08:00
Andreas Pehrson
0d112b8fad Bug 1434628 - Unbust --disable-webrtc builds. r=padenot, a=me
MozReview-Commit-ID: Ef8LOr1YymV
2018-01-31 16:59:53 +01:00
Andreea Pavel
f41017f5cd Merge inbound to mozilla-central. a=merge 2018-01-31 19:38:21 +02:00
Andreas Pehrson
f3cc4b74af Bug 1299515 - Fix bustage on a CLOSED TREE. r=me
--HG--
extra : rebase_source : 5312eaeec727b4cc9ced77fc2adbbff19ab6cc26
extra : histedit_source : c6638f1b1df9af06b30412e774c4a6f782d45c8c
2018-01-31 16:08:13 +01:00
Bogdan Tara
5c052cc871 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-01-31 12:10:31 +02:00
Bogdan Tara
1a6614b8b5 Merge inbound to mozilla-central. a=merge 2018-01-31 12:00:14 +02:00
Bogdan Tara
b56a0f8804 Merge autoland to mozilla-central. a=merge 2018-01-31 11:58:23 +02:00
Julian Descottes
ebc768d323 Bug 1403902 - migrate browser_webconsole_bug_580454_timestamp_l10n to xpcshell test;r=nchevobbe
MozReview-Commit-ID: 6uMMrzMSJB6

--HG--
rename : devtools/client/webconsole/test/browser_webconsole_bug_580454_timestamp_l10n.js => devtools/client/webconsole/new-console-output/test/unit/test_webconsole_l10n.js
extra : rebase_source : d299dc9973edea6ce1fc3899b3c8a1cc13bf47f3
2018-01-31 08:56:21 +01:00
Andreea Pavel
2ebbd41c08 Backed out 8 changesets (bug 633062) for failing xpcshell on Windows at services/sync/tests/unit/test_hmac_error.js on a CLOSED TREE
Backed out changeset b4e9cd0d61ab (bug 633062)
Backed out changeset ee294cebe485 (bug 633062)
Backed out changeset 3d1ad6b3bbee (bug 633062)
Backed out changeset c053f43da9e8 (bug 633062)
Backed out changeset 549e1282ae8e (bug 633062)
Backed out changeset 35058a83dab0 (bug 633062)
Backed out changeset 2e9dc98eabf0 (bug 633062)
Backed out changeset dbbacd08392c (bug 633062)
2018-01-31 10:07:34 +02:00
Dorel Luca
9f8b519dae Backed out 8 changesets (bug 633062) for xpcshell failures on browser/extensions/formautofill/test/unit/test_sync.js on a CLOSED TREE
Backed out changeset d60ca66f2b62 (bug 633062)
Backed out changeset d80494d5bc36 (bug 633062)
Backed out changeset 33f832b59e86 (bug 633062)
Backed out changeset 968db19986aa (bug 633062)
Backed out changeset a55a3647ea49 (bug 633062)
Backed out changeset bb1030bdab48 (bug 633062)
Backed out changeset 9c4cd2a6965c (bug 633062)
Backed out changeset 669c76bd2618 (bug 633062)

--HG--
extra : amend_source : cf95d15507de46de393cdef797a5808c4e0407ff
2018-01-31 07:28:06 +02:00
Dzmitry Malyshau
04332d008f Bug 1434410: Move the WebRender revision to a separate file and include it in captures. r=kats
MozReview-Commit-ID: 9ZgALwny1p2
2018-01-30 23:24:55 -05:00
ffxbld
31a384019d No bug, Automated blocklist update from host bld-linux64-spot-324 - a=blocklist-update 2018-01-30 18:26:20 -08:00
ffxbld
90a41c3b7d No bug, Automated HPKP preload list update from host bld-linux64-spot-324 - a=hpkp-update 2018-01-30 18:26:16 -08:00
ffxbld
a75c2f5111 No bug, Automated HSTS preload list update from host bld-linux64-spot-324 - a=hsts-update 2018-01-30 18:26:13 -08:00
Coroiu Cristina
4854a65d8c Backed out 3 changesets (bug 1368699) for bustage on Android L10n nightlies a=backout
Backed out changeset e16fc8abd345 (bug 1368699)
Backed out changeset 35a5db01b6ae (bug 1368699)
Backed out changeset 7297a1e8c4ff (bug 1368699)
2018-01-31 01:59:23 +02:00
Nicholas Nethercote
5c975c03b1 Bug 1433982 - Make nsAtomicFileOutputStream::DoOpen() fail if the file is read-only. r=glandium
This means we don't leave behind prefs-<n>.js files when prefs.js is read-only.

MozReview-Commit-ID: H6KKnoYGdhH

--HG--
extra : rebase_source : 263dd6fb75204a4565c8af89e7b21fc37a10d52e
2018-01-31 10:01:26 +11:00
Sebastian Hengst
732cb1d98b merge mozilla-inbound to mozilla-central. r=merge a=merge 2018-01-31 00:22:27 +02:00
Mark Banner
9a2172526a Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. r=florian.
MozReview-Commit-ID: 3vBWDR3UjGF

--HG--
extra : rebase_source : 61495d14a8d761e71b4072b02e2ca57e77f44059
2018-01-30 22:10:08 +00:00
Mark Banner
b9f306bb12 Bug 1434449 - Removed some unused code in jsm files in browser/base and browser/modules. r=florian
MozReview-Commit-ID: 9VhKxnpdzCD

--HG--
extra : rebase_source : ecc1f9196a5fb22cf78c51ead89f84e154c5198f
2018-01-30 22:09:02 +00:00
Tom Prince
d8968f156b Bug 1434365: Remove unused by-platform option for L10N config-paths; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D513

--HG--
extra : rebase_source : 3c4345c3442f74d4f86fc2d801c251d93f8b6045
2018-01-30 11:51:23 -07:00
Tom Prince
6b745cb132 Bug 1434365: Add support for specifying mozharness config paths and checking out comm-central to repackage tasks; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D512

--HG--
extra : rebase_source : dc165357115f51475279f90679b89c14ec1c6038
2018-01-30 11:50:57 -07:00
Tom Prince
521c194c6c Bug 1434365: Move repackage mozharness config selection to yaml; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D511

--HG--
extra : rebase_source : 69e82fe6623609412ee6150a32ea0001b07d5c30
2018-01-30 11:44:30 -07:00
Chris Pearce
328670db16 Bug 1433344 - Convert encrypted AAC to ADTS before decryption. r=jya
MozReview-Commit-ID: IGmBfJtYsCi

--HG--
extra : rebase_source : a0752ed6c85faf4333ae84a3e5b20695b5bf26a6
2018-01-30 14:39:09 +13:00
Joel Maher
79250dba5d Bug 1434715 - remove reftest-no-accel from windows10. r=ahal 2018-01-31 16:14:43 -05:00
Felipe Gomes
80777542ed Bug 1434164 - Support inlining policies.json file on test files. r=Gijs
MozReview-Commit-ID: LP8M6QB6I04
2018-01-31 19:13:48 -02:00
Felipe Gomes
c47e559e83 Bug 1433950 - Re-license enterprise policies tests as CC0. r=gerv
MozReview-Commit-ID: B29SV9JmjKg
2018-01-31 19:13:43 -02:00
Marco Castelluccio
583838a613 Bug 1431388 - Don't assert size of the resulting rewritten LCOV file, as with C++-only test suites it can be empty. r=me
--HG--
extra : rebase_source : 232a9430c58cd129baa100aa713d6153a9390fc6
2018-01-31 22:05:24 +01:00
Boris Zbarsky
65bf16222e Bug 1434399 part 19. Remove nsIXULDocument. r=mystor
MozReview-Commit-ID: 9jQu4sjOhb2
2018-01-31 14:49:29 -05:00
Boris Zbarsky
5ed1930118 Bug 1434399 part 18. Remove nsIXULDocument::ResetDocumentLWTheme. r=mystor
MozReview-Commit-ID: 9z4HAVJAl7R
2018-01-31 14:49:29 -05:00
Boris Zbarsky
7608960cee Bug 1434399 part 17. Remove nsIXULDocument::ResetDocumentDirection. r=mystor
MozReview-Commit-ID: 18rQOWg8zvs
2018-01-31 14:49:29 -05:00
Boris Zbarsky
84d7176a8b Bug 1434399 part 16. Remove nsIXULDocument::OnDocumentParserError. r=mystor
MozReview-Commit-ID: 7LbPTqKzkO4
2018-01-31 14:49:29 -05:00
Boris Zbarsky
0bff2380b3 Bug 1434399 part 15. Remove nsIXULDocument::OnPrototypeLoadDone. r=mystor
MozReview-Commit-ID: 9LDh2QByUNV
2018-01-31 14:49:28 -05:00
Boris Zbarsky
439174ece2 Bug 1434399 part 14. Remove add/remove subtree bits from nsIXULDocument. r=mystor
MozReview-Commit-ID: 987df30BZHq
2018-01-31 14:49:28 -05:00
Boris Zbarsky
8d91b52952 Bug 1434399 part 13. Remove C++ uses of nsIDOMXULDocument. r=mystor
MozReview-Commit-ID: KSsXLra5DQk
2018-01-31 14:49:28 -05:00
Boris Zbarsky
2c472fbf65 Bug 1434399 part 12. Remove JS uses of nsIDOMXULDocument. r=mystor
MozReview-Commit-ID: HUK8ahBwG0e
2018-01-31 14:49:28 -05:00
Boris Zbarsky
96e47c0319 Bug 1434399 part 11. Remove nsIDOMXULDocument::LoadOverlay. r=mystor
MozReview-Commit-ID: 4ad9AbkMcl0
2018-01-31 14:49:28 -05:00
Boris Zbarsky
006423b188 Bug 1434399 part 10. Remove nsIDOMXULDocument::GetBoxObjectFor. r=mystor
MozReview-Commit-ID: AvUdAtCMRRq
2018-01-31 14:49:28 -05:00
Boris Zbarsky
703e27ac8a Bug 1434399 part 9. Remove nsIDOMXULDocument::Persist. r=mystor
MozReview-Commit-ID: 8LKgjwt5Yi6
2018-01-31 14:49:28 -05:00
Boris Zbarsky
59398e9cad Bug 1434399 part 8. Remove nsIDOMXULDocument's broadcast listener bits. r=mystor
MozReview-Commit-ID: Auj7Lfu6ex3
2018-01-31 14:49:27 -05:00
Boris Zbarsky
f35c2bc77d Bug 1434399 part 7. Remove nsIDOMXULDocument's getElementsByAttribute(NS) methods. r=mystor
MozReview-Commit-ID: HN1le8EkeGr
2018-01-31 14:49:27 -05:00
Boris Zbarsky
cf38d244a2 Bug 1434399 part 6. Remove nsIDOMXULDocument's width/height attributes. r=mystor
MozReview-Commit-ID: 1pYKNXwqnGq
2018-01-31 14:49:27 -05:00