Commit Graph

14395 Commits

Author SHA1 Message Date
Nicholas Nethercote
7f61125977 Bug 1436655 - Fix up two minor mistakes in comments. r=me
DONTBUILD because it's a comment-only change.

MozReview-Commit-ID: 4x58HTaPELJ

--HG--
extra : rebase_source : 16ca292d6b722fb30fd1822921e6a8aac9f79a25
2018-03-27 16:31:01 +11:00
Nicholas Nethercote
136f284c7d Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium
Currently VarCache prefs are setup in two parts:

- The vanilla pref part, installed via a data file such as all.js, or via an
  API call.

- The VarCache variable part, setup by an Add*VarCache() call.

Both parts are needed for the pref to actually operate as a proper VarCache
pref. (There are various prefs for which we do one but not the other unless a
certain condition is met.)

This patch introduces a new way of doing things. There is a new file,
modules/libpref/init/StaticPrefList.h, which defines prefs like this:

> VARCACHE_PREF(
>   "layout.accessiblecaret.width",
>   layout_accessiblecaret_width,
>   float, 34.0
> )

This replaces both the existing parts.

The preprocessor is used to generate multiple things from this single
definition:

- A global variable (the VarCache itself).

- A getter for that global variable.

- A call to an init function that unconditionally installs the pref in the
  prefs hash table at startup.

C++ files can include the new StaticPrefs.h file to access the getter.

Rust code cannot use the getter, but can access the global variable directly
via structs.rs. This is similar to how things currently work for Rust code.

Non-VarCache prefs can also be declared in StaticPrefList.h, using PREF instead
of the VARCACHE_PREF.

The new approach has the following advantages.

+ It eliminates the duplication (in all.js and the Add*VarCache() call) of the
  pref name and default value, preventing potential mismatches. (This is a real
  problem in practice!)

+ There is now a single initialization point for these VarCache prefs.
  + This avoids need to find a place to insert the Add*VarCache() calls, which
    are currently spread all over the place.
  + It also eliminates the common pattern whereby these calls are wrapped in a
    execute-once block protected by a static boolean (see bug 1346224).
  + It's no longer possible to have a VarCache pref for which only one of the
    pieces has been setup.

+ It encapsulates the VarCache global variable, so there is no need to declare
  it separately.

+ VarCache reads are done via a getter (e.g. StaticPrefs::foo_bar_baz())
  instead of a raw global variable read.
  + This makes it clearer that you're reading a pref value, and easier to
    search for uses.
  + This prevents accidental writes to the global variable.
  + This prevents accidental mistyping of the pref name.
  + This provides a single chokepoint in the code for such accesses, which make
    adding checking and instrumentation feasible.

+ It subsumes MediaPrefs, and will allow that class to be removed. (gfxPrefs is
  a harder lift, unfortunately.)

+ Once all VarCache prefs are migrated to the new approach, the VarCache
  mechanism will be better encapsulated, with fewer details publicly visible.

+ (Future work) This will allow the pref names to be stored statically, saving
  memory in every process.

The main downside of the new approach is that all of these prefs are in a
single header that is included in quite a few places, so any changes to this
header will cause a fair amount of recompilation.

Another minor downside is that all VarCache prefs are defined and visible from
start-up. For test-only prefs like network.predictor.doing-tests, having them
show in about:config isn't particularly useful.

The patch also moves three network VarCache prefs to the new mechanism as a
basic demonstration. (And note the inconsistencies in the multiple initial
values that were provided for
network.auth.subresource-img-cross-origin-http-auth-allow!) There will be
numerous follow-up bugs to convert the remaining VarCache prefs.

MozReview-Commit-ID: 9ABNpOR16uW
* * *
[mq]: fixup

MozReview-Commit-ID: 6ToT9dQjIAq
2018-03-26 09:39:40 +11:00
Nicholas Nethercote
e85bbc21df Bug 1436655 - Tweak assertions in Add*VarCache() functions. r=glandium
This avoids some repetition.

MozReview-Commit-ID: I7aD8JUCCK4
2018-03-23 15:15:20 +11:00
Nicholas Nethercote
b5ed6c2349 Bug 1436655 - Tweak the comment at the top of init/all.js. r=glandium
- The first two SYNTAX HINTS are wrong, and citing the syntax is more useful
  than specifying a single example of what isn't allowed.

- The sentence about #ifdefs is wrong. (#ifdefs appear all throughout, and
  prefs are only specified once.)

- I chose a better example file.

MozReview-Commit-ID: JyYFyutqrFD
2018-03-15 14:59:29 +11:00
Nicholas Nethercote
0dfbeba283 Bug 1436655 - Rename pref_SetPref()'s aFromFile argument as aFromInit. r=glandium
Currently all pref initialization is done from file, but soon we will also be
initializing prefs from code compiled into the binary. The new name encompasses
both cases.

MozReview-Commit-ID: 5g0jfjHTvnE

--HG--
extra : rebase_source : 938b33626594992846377c5d1b684b1dbf96cb57
2018-02-14 18:50:53 +11:00
Nicholas Nethercote
e41e8bc23c Bug 1444275 - Reinstate an assertion. r=me
This change was supposed to happen in the previous patch from this bug.

MozReview-Commit-ID: 93dFyFBbWwO

--HG--
extra : rebase_source : d348dd4a4140f4482bcf493346cf58bd5ef6475b
2018-03-26 14:56:43 +11:00
Andrea Marchesini
a90cff1ced Bug 1447210 - Upper-case log levels for Console.createInstance(), r=bgrins 2018-03-24 08:21:01 +01:00
Boris Zbarsky
de9297b4bf Bug 1448048. Restrict the window.Components shim to non-nightly-only to see whether sites actually use it. r=mccr8
MozReview-Commit-ID: 6W1nEyKGlER
2018-03-23 12:53:48 -04:00
Emilio Cobos Álvarez
800551a615 Bug 1448415: Hide getPropertyCSSValue on nightly. r=bz
MozReview-Commit-ID: ItqKUMZEpoX
2018-03-24 01:00:43 +01:00
Gurzau Raul
f2571e02d0 Backed out changeset 94a8e9c4c345 (bug 1448048) for Robocop failures on Android on a CLOSED TREE 2018-03-23 23:29:02 +02:00
Boris Zbarsky
0327e321d5 Bug 1448048. Restrict the window.Components shim to non-nightly-only to see whether sites actually use it. r=mccr8
MozReview-Commit-ID: 6W1nEyKGlER
2018-03-23 12:53:48 -04:00
Cosmin Sabou
c17fce3462 Merge mozilla-central to inbound. a=merge on a CLOSED TREE 2018-03-23 15:32:33 +02:00
Cosmin Sabou
d5f5fb893c Backed out 3 changesets (bug 1446233) for permafailing on dom/media/tests/mochitest/test_peerConnection_replaceTrack.html. a=backout
Backed out changeset 9b72102a99b3 (bug 1446233)
Backed out changeset 6f3488ff7c60 (bug 1446233)
Backed out changeset 20301e359a4e (bug 1446233)
2018-03-23 15:18:23 +02:00
Jonathan Kew
3d5c891570 Bug 1447163 - Enable support for OpenType variation fonts. r=dbaron 2018-03-23 10:35:28 +00:00
Dan Glastonbury
ac492b197c Bug 1446233 - P3: Add prefs to control audioipc client thread pool. r=kinetik
MozReview-Commit-ID: 7TVfYE9DEwp

--HG--
extra : rebase_source : e725ea784360e8d2061dbf4193c7074fde3cfdd1
2018-03-22 15:33:25 +10:00
shindli
5d297279b1 Backed out 3 changesets (bug 1446233) for Wr failures in /html/semantics/embedded-content/media-elements/track/track-element/track-webvtt-two-cue-layout-after-first-end.html on a CLOSED TREE
Backed out changeset ed217fb39a92 (bug 1446233)
Backed out changeset f5bec009a111 (bug 1446233)
Backed out changeset a71dd6219f8a (bug 1446233)
2018-03-23 04:11:01 +02:00
Dan Glastonbury
ac696a0587 Bug 1446233 - P3: Add prefs to control audioipc client thread pool. r=kinetik
MozReview-Commit-ID: I4BL7Ad2xtI

--HG--
extra : rebase_source : 984378bf2fbca347762b3096f75069b7721c97be
2018-03-22 15:33:25 +10:00
Mathieu Leplatre
76bc359e79 Bug 1397230 - Generalize blocklist clients to remote settings clients r=mgoodwin
MozReview-Commit-ID: 9VAsTFCuZUf

--HG--
rename : services/common/tests/unit/test_blocklist_updater.js => services/common/tests/unit/test_remote_settings_poll.js
extra : rebase_source : 9da338f18f3860e124b315a8be3340997343e2f3
2018-03-13 16:23:57 +01:00
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
arthur.iakab
5e8092339a Merge mozilla-central to inbound
--HG--
rename : browser/base/content/test/general/bug364677-data.xml => browser/components/feeds/test/bug364677-data.xml
rename : browser/base/content/test/general/bug364677-data.xml^headers^ => browser/components/feeds/test/bug364677-data.xml^headers^
rename : browser/base/content/test/general/test_bug364677.html => browser/components/feeds/test/test_bug364677.html
rename : services/sync/tps/extensions/tps/bootstrap.js => services/sync/tps/extensions/tps/components/tps-cmdline.js
rename : testing/talos/talos/pageloader/bootstrap.js => testing/talos/talos/pageloader/components/tp-cmdline.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js => testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js
rename : testing/talos/talos/talos-powers/bootstrap.js => testing/talos/talos/talos-powers/components/TalosPowersService.js
rename : tools/quitter/bootstrap.js => tools/quitter/QuitterObserver.js
extra : rebase_source : 5801e95a945b54754f27571e7b211e1eac132d67
2018-03-21 22:27:21 +02:00
arthur.iakab
abcb47d8cc Merge inbound to mozilla-central. a=merge 2018-03-21 21:13:11 +02:00
Jan Odvarko
990ab32239 Bug 1223726 - Customize response body interception; r=ochameau
* Introduce pref for custom response body limit
* Introduce pref for saving request/response bodies

MozReview-Commit-ID: 7DrAU1did1a

--HG--
extra : rebase_source : 86117d796357defad79afac890655c28f4d44587
2018-03-12 08:10:39 +01:00
Valentin Gosu
9bff145dee Bug 1442242 - Make the constructor of nsJARURI private r=mayhemer
MozReview-Commit-ID: 2X1mu5576u1

--HG--
extra : rebase_source : 9cfc50d74c407f5fb88768db072cb0fdfbd8ad1c
2018-03-20 12:52:47 +01:00
Noemi Erli
3e8b48fa31 Backed out 3 changesets (bug 1442242) for fatal error LNK1120: 1 unresolved externals bustages on a CLOSED TREE
Backed out changeset 9f37df3c62e1 (bug 1442242)
Backed out changeset 65b8727bfe76 (bug 1442242)
Backed out changeset 88130a542fb3 (bug 1442242)
2018-03-20 16:45:34 +02:00
Valentin Gosu
332caf8d4f Bug 1442242 - Make the constructor of nsJARURI private r=mayhemer
MozReview-Commit-ID: 2X1mu5576u1

--HG--
extra : rebase_source : 9cfc50d74c407f5fb88768db072cb0fdfbd8ad1c
2018-03-20 12:52:47 +01:00
Liang-Heng Chen
9a06318245 Bug 1373708 - Convert Jar channels to stop using main thread I/O, r=nwgh 2018-03-01 08:12:00 +00:00
Ryan Hunt
e34eeaaa86 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 05bda872389db5cc61e805c3eb48e70eb5d95cbe
2018-02-21 09:29:49 -06:00
Emilio Cobos Álvarez
a0d49d986b Bug 1447611: Cleanup prefs that do nothing now. r=jwatt
Still more followup cleanup to come.

MozReview-Commit-ID: 83j7DTVb0Ti
2018-03-21 19:13:56 +01:00
Emilio Cobos Álvarez
24cf27d33c Bug 1447611: Remove --enable-stylo and --enable-stylo-build-bindgen. r=froydnj
Will remove the prefs and stuff in a followup.

MozReview-Commit-ID: HVyfbHOEQYI
2018-03-21 19:13:26 +01:00
Csoregi Natalia
d6c6d38406 Backed out 4 changesets (bug 1447611) for mass failures due to --enable-stylo removal. CLOSED TREE
Backed out changeset c6193142bbcf (bug 1447611)
Backed out changeset 01ada1c5a95f (bug 1447611)
Backed out changeset 86c9fed44da2 (bug 1447611)
Backed out changeset bb84ac6e1468 (bug 1447611)
2018-03-21 19:01:07 +02:00
Emilio Cobos Álvarez
f8eadb8613 Bug 1447611: Cleanup prefs that do nothing now. r=jwatt
Still more followup cleanup to come.

MozReview-Commit-ID: 83j7DTVb0Ti
2018-03-21 17:25:00 +01:00
Emilio Cobos Álvarez
330ddd82bf Bug 1447611: Remove --enable-stylo and --enable-stylo-build-bindgen. r=froydnj
Will remove the prefs and stuff in a followup.

MozReview-Commit-ID: HVyfbHOEQYI
2018-03-21 17:24:41 +01:00
shindli
55e9f63bac Merge inbound to mozilla-central. a=merge 2018-03-20 12:11:27 +02:00
Nicholas Nethercote
6aff850dcd Bug 1444275 - Remove the *InAnyProcess() functions. r=glandium
All pref-modifying operations now only occur in the parent process. Hooray!

MozReview-Commit-ID: GDVsda4rw5f

--HG--
extra : rebase_source : 4f8484f0751212120078b3ba1a32930bc9c5ed8a
2018-03-13 14:34:14 +11:00
Nicholas Nethercote
22b2a2e3c2 Bug 1444275 - Don't set the telemetry pref in content processes. r=glandium
It'll be set via the normal parent-to-child pref setting process.

MozReview-Commit-ID: By4mG7brc55

--HG--
extra : rebase_source : 480a289edf81b36395619a3bb9f5a1e065cb33d8
2018-03-13 14:33:48 +11:00
Nicholas Nethercote
6b81d0b99f Bug 1436911 - Avoid the early/late prefs split. r=glandium
All prefs that need to be sent to a new content process are now put into the
shared memory segment, and they are identified by the pref name instead of an
index into a list. The old IPC used at process startup (in XPCOMInitData) is
removed.

Benefits:

- It removes the need for the early prefs list
  (dom/ipc/ContentProcesses.{h,cpp}) and the associated checking, which is ugly
  and often trips people up (e.g. bug 1432979, bug 1439406).

- Using prefnames instead of indices fixes some fragility (fixing bug 1419432).

- It fixes the problem of early prefs being installed as unlocked default
  values even if they are locked and/or have user values.

MozReview-Commit-ID: FRIzHF8Tjd
2018-03-08 15:47:24 +11:00
Andreea Pavel
d0f089f05d Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-03-20 00:43:40 +02:00
Andreea Pavel
7062e6b6a2 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-20 00:39:56 +02:00
Honza Bambas
0998499d37 Bug 1444975 - Switch to HTTP throttling v2 algorithm. r=valentin
--HG--
extra : amend_source : fcda726deb971ab73cd5df288af104064243351c
2018-03-12 11:23:00 -04:00
Honza Bambas
c940bbdf06 Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04:00
Tom Ritter
ddc1a8bd70 Bug 1422245 Disable @-moz-document in content pages r=emilio
Previously we had disabled them in content pages on Nightly and Early Beta,
now we're ready to let this ride the trains in 61.

We're going to land this ahead of Bug 1446470 which is specifically about
url-prefix().

MozReview-Commit-ID: AGDHt1snyjU

--HG--
extra : rebase_source : 7f26f898ff887cd4915d5b5a7bd7c3de0476a803
2018-03-18 12:48:18 -05:00
Csoregi Natalia
3c08257ba3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-18 23:49:30 +02:00
Robert Longson
32c95b809e Bug 1443314 - remove the svg.path-caching.enabled pref r=jwatt 2018-03-18 14:05:28 +00:00
Noemi Erli
7d3bd4c6aa Backed out 2 changesets (bug 1373708) for frequent xpcshell failures in xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_startup_perf.js a=backout
Backed out changeset b3bb4c38a0ef (bug 1373708)
Backed out changeset a06dc76c6ed8 (bug 1373708)

--HG--
extra : amend_source : 79ebbfd9e9cccc081cc3211f814f3ab9df70d41c
2018-03-17 23:37:27 +02:00
Liang-Heng Chen
e0247381b3 Bug 1373708 - Convert Jar channels to stop using main thread I/O, r=nwgh 2018-03-01 08:12:00 +02:00
Sebastian Hengst
d247fb5f4e Bug 1445763 - Update moz.build meta data with "Firefox Build System". r=froydnj
MozReview-Commit-ID: 3FrWJ6441pe

--HG--
extra : rebase_source : c8f1dc45041132252e28869ada6a386270267431
2018-03-14 21:44:46 +01:00
Andreea Pavel
e5950c0d39 Backed out 2 changesets (bug 1442239) for xpcshell failures at widget/tests/unit/test_taskbar_jumplistitems.js on a CLOSED TREE
Backed out changeset 513cd669aca1 (bug 1442239)
Backed out changeset aef4c73f736f (bug 1442239)
2018-03-19 21:19:26 +02:00
Valentin Gosu
f0c7a1ae13 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 8ebb459445cab23288a6c4c86e4e00c6ee611e34
2018-03-08 13:35:10 +01:00