Commit Graph

13850 Commits

Author SHA1 Message Date
Nicholas Nethercote
367a4a65a2 Bug 1417806 - Move BoolVarChanged() next to AddBoolVarCache(). r=glandium
This makes it like the VarCache functions for int, uint, atomic unit, and float.

MozReview-Commit-ID: 4CRuvAjqGCj

--HG--
extra : rebase_source : 5780456f1f0cf18f98ab3b42efcaec514324a171
2017-11-16 16:02:07 +11:00
Nicholas Nethercote
0736ef385a Bug 1417806 - Add a comment about gCacheData. r=glandium
MozReview-Commit-ID: 1oVYUMtobRF

--HG--
extra : rebase_source : 3c7b35684b94b8aeabb73e0eb278a51ef8a4697b
2017-11-16 18:39:00 +11:00
Nicholas Nethercote
b547f1b959 Bug 1417806 - Reduce gPrefNameArena's alignment to 1. r=glandium.
Because it holds 8-bit strings, which only need 1 byte alignment.

For the profile on my Linux box, in every process this reduces the size of the
arena by 1 chunk, from 120 KiB to 112 KiB.

MozReview-Commit-ID: 8ozrLIq5ZZ4

--HG--
extra : rebase_source : 1f7d337875d5f554772bec6395e7f4241900a26c
2017-11-16 16:02:07 +11:00
Nicholas Nethercote
7abaa53d96 Bug 1417806 - Overhaul gWatchingPref et al. r=glandium
This patch renames it as gInstallingCallback, adds a comment, and reduces the
scope of the AUTO_INSTALLING_CALLBACK() objects to the minimum.

MozReview-Commit-ID: EGfnBPVFtmw

--HG--
extra : rebase_source : 9feafbb4c92c6b9dbe37466fefb777a8638b1c6e
2017-11-16 16:02:07 +11:00
Nicholas Nethercote
ba94f2d107 Bug 1417746 - Overhaul libpref's memory reporter. r=glandium
This splits the measurements into several buckets, like so:

> 718,528 B (00.40%) -- preferences
> ├──262,176 B (00.14%) ── hash-table
> ├──181,952 B (00.10%) ── callbacks
> ├──122,880 B (00.07%) ── pref-name-arena
> ├───91,872 B (00.05%) ── root-branches
> ├───38,296 B (00.02%) ── string-values
> ├───21,272 B (00.01%) ── cache-data
> └───────80 B (00.00%) ── misc

The patch also measures some things that were previously overlooked.

- String pref values. (The old code had a comment that incorrectly claimed they
  were allocated out of an arena.)

- The PrefCallback objects pointed to by entries in nsPrefBranch::mObservers.

And it makes the code more like typical reporters.

- It removes the "AndOtherStuff" from Preferences' measuring method, and
  measuring those global structures in
  PreferenceServiceReporter::CollectReports().

- It adds `const` where appropriate.

MozReview-Commit-ID: dyNg7ldQdh
2017-11-16 15:55:58 +11:00
Brindusan Cristian
89030a420a Merge mozilla-central to inbound r=merge a=merge on a CLOSED TREE 2017-11-16 00:51:41 +02:00
Nicholas Nethercote
9723f0f68e Bug 1416638 - Inline and remove PREF_Get*(). r=glandium.
MozReview-Commit-ID: CiCKpihJJJF

--HG--
extra : rebase_source : 82b512171925a44a79e65a8c08a278244a12c6e5
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
5403410705 Bug 1416638 - Inline and remove PREF_Set*(). r=glandium.
This patch also adds some Set*InAnyProcess() methods, and makes nsPrefBranch a
friend of Preferences so it can call those methods.

And it moves the thin Set*() wrapper functions to Preferences.h, alongside
SetUint().

MozReview-Commit-ID: 88HhmcTFZNc

--HG--
extra : rebase_source : 88a854d52afce86d93008a6e1a4b5f32bcf24a1a
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
5dc91f21fc Bug 1416638 - Rename SetCharPrefInternal() as SetCharPrefNoLengthCheck(). r=glandium.
Because it's clearer.

MozReview-Commit-ID: 4zfDnsaPQSK

--HG--
extra : rebase_source : 4f958130f46dc32b291f92d3b387d80064b5ac12
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
22cbf71329 Bug 1416638 - Move a couple of functions into Preferences. r=glandium.
This will allow other functions to be moved into Preferences and be marked as
`private` in subsequent patches.

The patch also renames SetPrefValue() as SetValueFromDom(), because that's a
clearer name.

MozReview-Commit-ID: CB1xmPSmac6

--HG--
extra : rebase_source : 0d597a800f2295c04af26d5abaac4aea0e0d3373
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
1e78ff66af Bug 1416638 - Use private instead of protected in Preferences. r=glandium.
It's a `final` class, so there's no need for `protected`.

MozReview-Commit-ID: 7n4DLpXo0el

--HG--
extra : rebase_source : b2d3eb9cf0e912689efa29d2255cc018fd8a7c64
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
502d16e87f Bug 1416638 - Change nsPrefBranch mIsDefault to a PrefValueKind. r=glandium.
This makes the next patches nicer.

MozReview-Commit-ID: 8EoAkmmMavY

--HG--
extra : rebase_source : 3bb751c8e1353f7e3814257cf41f2f8de4ed3ed5
2017-11-14 19:06:02 +11:00
Nicholas Nethercote
f553c82da0 Bug 1416638 - Add a PrefValueKind arg to Preferences::Get*(), and remove Preferences::GetDefault*(). r=glandium
MozReview-Commit-ID: LgnZAf1pAl1

--HG--
extra : rebase_source : 8ba7c4bfb331f70fd41c2ae1d428e4cb9058d069
2017-11-14 19:06:01 +11:00
Nicholas Nethercote
6d0e1df407 Bug 1416638 - Add a PrefValueKind arg to Preferences::Set*(). r=glandium
This is unused for now, but will be necessary for nsPrefBranch::Set*() to call
into Preferences::Set*().

The patch also renames some arguments from aPref to aPrefName, because that's a
better name.

MozReview-Commit-ID: 2OPB7CHOgpw

--HG--
extra : rebase_source : 232b7be3c33d185f13ce86d91feea3b55069a4e6
2017-11-13 09:20:45 +11:00
Nicholas Nethercote
51c0610d9a Bug 1416638 - Introduce PrefValueKind. r=glandium
This is nicer than a bool for tracking the Default vs. User distinction, and it
replaces the Preferences.cpp-only WhichValue type.

MozReview-Commit-ID: 8CrdDN2vBJQ

--HG--
extra : rebase_source : 0d49148c73e5aeb0a355a6d4189232c89295d2a7
2017-11-13 09:20:42 +11:00
Martin Stransky
cbdb92526c Bug 1415481 - make widget.allow-client-side-decoration visible, r=dao,glandium
MozReview-Commit-ID: 1FWAfjqxztV

--HG--
extra : rebase_source : e892cf831ce70834d5cbe405f0a47dedbb1b5682
2017-11-08 10:39:59 +01:00
Valentin Gosu
a77a5282f4 Bug 1416343 - Mark URI interfaces as [builtinclass] r=bagder
MozReview-Commit-ID: 4T0uCkHP1a6

--HG--
extra : rebase_source : fa720f35df16985bcd929a98aeeaf9fbc759c1e6
2017-11-15 13:34:23 +01:00
shindli
a9fa53057b Backed out 3 changesets (bug 1415481) for failing bcs in browser/base/content/test/general/browser_tabbar_big_widgets.js r=backout on a CLOSED TREE
Backed out changeset a00865a5bd43 (bug 1415481)
Backed out changeset 4d8dc538cb2d (bug 1415481)
Backed out changeset 53463889cdb6 (bug 1415481)
2017-11-15 14:00:54 +02:00
Margareta Eliza Balazs
3edf7872fb Backed out changeset cfe4b1e6be9b (bug 1416343) for ESlint failing in modules/test/browser/browser_SitePermissions_tab_urls.js:38:14 r=backout on a CLOSED TREE 2017-11-15 13:46:07 +02:00
Martin Stransky
e1887c7a6d Bug 1415481 - make widget.allow-client-side-decoration visible, r=dao,glandium
MozReview-Commit-ID: 1FWAfjqxztV

--HG--
extra : rebase_source : df68b54f709e373c52c917cb24e9c70185be4a59
2017-11-08 10:39:59 +01:00
Valentin Gosu
ba207f8c8c Bug 1416343 - Mark URI interfaces as [builtinclass] r=bagder
MozReview-Commit-ID: 4T0uCkHP1a6

--HG--
extra : rebase_source : 89c283360bc0b30aad34641b4cdce8f5c49615b3
2017-11-13 20:18:46 +01:00
Noemi Erli
fe054d4e08 Backed out changeset c2bf7ca0839c (bug 1382427) for failing reftests r=backout on a CLOSED TREE 2017-11-15 14:22:43 +02:00
Jonathan Watt
61b75cd481 Bug 1382427 - Support running reftests with retained display lists on for the test files only. r=mattwoodrow
MozReview-Commit-ID: 4n2kvXU2RYo
2017-10-30 18:09:41 +00:00
Nicholas Nethercote
20ffb0878f Bug 1416622 - Tighten up libpref's process checking. r=glandium
libpref only allows pref modifications in the parent process. This patch
tightens up the checking, which is a bit inconsistent.

- It removes ENSURE_MAIN_PROCESS_WITH_WARNING, which does NS_WARNING on
  failure, and replaces its uses with ENSURE_MAIN_PROCESS, which does NS_ERROR
  on failure. This required adding an XRE_IsParentProcess() check to one place
  in editor/.

- It converts XRE_IsContentProcess() tests to !XRE_IsParentProcess(), because
  we now have multiple kinds of non-parent process.

- It uses ENSURE_MAIN_PROCESS to replace other checking code in a few places.

- It improves a comment in HandleDirty().

MozReview-Commit-ID: D8znQWH7ery

--HG--
extra : rebase_source : ea0fc095b31525bde82a1be217923512d030b76d
2017-11-13 09:19:55 +11:00
Nicholas Nethercote
da4a6801da Bug 1416613 - Replace use of std::string and std::vector with Mozilla equivalents. r=glandium
MozReview-Commit-ID: 1Zcuespd4sn
2017-11-14 19:06:01 +11:00
Nicholas Nethercote
6750b1fde6 Bug 1416613 - Make Preferences::InitStaticMembers() slightly faster. r=glandium
InitStaticMembers() is the hottest function within libpref, because it is
called from all the getters and setters. This patch tweaks it so the common
case is handled with a single comparison, instead of two. This is valid because
sPreferences is nulled at the same time that sShutdown is set.

The patch also tweaks some other conditions to take advantage of this fact.

MozReview-Commit-ID: C74fLWOw7bE
2017-11-13 09:19:49 +11:00
Nicholas Nethercote
994d5726c4 Bug 1416613 - Improve comments about pref IPC. r=glandium
These would have saved me some time last week when I was figuring out how this
stuff works.

MozReview-Commit-ID: DUhxGDht6xT
2017-11-13 09:19:43 +11:00
Nicholas Nethercote
b15805ab71 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index

--HG--
extra : rebase_source : a46aa7078b98b4731ec96b66398c51aa6cb42d27
2017-11-13 17:16:06 +11:00
Christoph Kerschbaumer
9fe7e4ca2f Bug 1401895 - Block top-level navigations to data: URIs. r=bz 2017-11-13 21:22:59 +01:00
Matt Woodrow
b6997a1778 Bug 1416055 - Enable retained display lists for Nightly builds. r=miko 2017-11-10 21:27:39 +13:00
Ethan Lin
beaea27dc3 Bug 1415989 - Do not use 'ShouldUseAdvancedLayer' for button type display items. r=jrmuizel
MozReview-Commit-ID: 83qOTfTRUY0

--HG--
extra : rebase_source : 560f285f3092cd75d14d27cae4adcb8e9dca0e3a
2017-11-10 11:41:15 +08:00
Ryan VanderMeulen
3c232c4d24 Backed out changeset 2ed0ff57330d (bug 1411467) for test_interfaces bustage on Beta. 2017-11-10 17:31:03 -05:00
Ryan VanderMeulen
b16410f51c Merge inbound to m-c. a=merge 2017-11-10 16:13:15 -05:00
Paul Adenot
d712cb2e50 Bug 1221580 - Followup, don't enable full-duplex on unknown platforms.
MozReview-Commit-ID: 7yJmup9a35A
2017-11-10 15:29:49 +01:00
Paul Adenot
218f7ce203 Bug 1221580 - Use duplex when sndio is enabled. r=gaston
MozReview-Commit-ID: E5EhoakY6EM

--HG--
extra : rebase_source : 7b8ac5a9c01d66a0bcf6bd1a095455df0af33aa9
2017-11-03 16:12:35 +01:00
Noemi Erli
48988ddf27 Backed out changeset 944b91410e49 (bug 1416055) for failing in bc browser/components/originattributes/test/browser/browser_broadcastChannel.js r=backout on a CLOSED TREE
--HG--
extra : amend_source : f02661b0cda7f5cd030e916e1b77ff8ee3e6ce9b
2017-11-10 12:35:24 +02:00
Matt Woodrow
01a1a65f66 Bug 1416055 - Enable retained display lists for Nightly builds. r=miko 2017-11-10 21:27:39 +13:00
Nicholas Nethercote
9872074b14 Bug 1415799 - Rename pref_HashPref() as pref_SetPref(). r=glandium.
Because it sets the pref.

MozReview-Commit-ID: IlEVRWKU94X

--HG--
extra : rebase_source : 76847f4b32c4c45253e74ffccc251ccb796ad6a4
2017-11-09 18:00:42 +11:00
Nicholas Nethercote
680e88e4d4 Bug 1415799 - Inline and remove Preferences::Init(). r=glandium
It has a single call site.

MozReview-Commit-ID: A96MRRa3W5N

--HG--
extra : rebase_source : 243cecf21ed0ad9c0850a5efb8217c5bb3770d25
2017-11-09 17:59:51 +11:00
Nicholas Nethercote
c09c797058 Bug 1415799 - Remove PREF_ClearUserPref() forward declaration. r=glandium
It's not needed.

MozReview-Commit-ID: AqKeBuxZJh3

--HG--
extra : rebase_source : e7ec4a2ef428ff84cd8cedf724e7f284a202bfa8
2017-11-09 17:59:12 +11:00
Nicholas Nethercote
9d9aef2c32 Bug 1415799 - Inline and remove PREF_Init() and PREF_CleanupPrefs(). r=glandium
They both have two callsites, but in one of those they appear together, where
much of the code can be replaced with a ClearAndPrepareForLength() call.

MozReview-Commit-ID: 1A771gsHWan

--HG--
extra : rebase_source : c6f26b9a825155c7b7c885540cf9f34f8b8eace7
2017-11-09 17:58:35 +11:00
Nicholas Nethercote
7421d3a552 Bug 1415799 - Inline and remove PREF_Cleanup. r=glandium
It has a single call site.

MozReview-Commit-ID: DoE5BlEA9a6

--HG--
extra : rebase_source : 590aad6dc0c0dbf84c05e8765bf0964fdd8c2d13
2017-11-09 17:56:29 +11:00
Nicholas Nethercote
8b37495d1c Bug 1415799 - Inline and remove pref_SizeOfPrivateData(). r=glandium
It has a single call site.

MozReview-Commit-ID: DhpO2vyeC61

--HG--
extra : rebase_source : eef9ba0f98748c2478316734c4860912008464a2
2017-11-09 17:54:32 +11:00
Stone Shih
b4b1ee6620 Bug 1411467 - Keeping PointerEvent enabled in early beta. r=smaug.
MozReview-Commit-ID: 9eD5bs2RwkC
2017-11-06 17:43:59 +08:00
Nicholas Nethercote
f4dd5e2636 Bug 1414096 (attempt 2) - Remove support for nsISupportsString values in nsPrefBranch::{get,set}ComplexValue(). r=florian.
Bug 1345294 introduced nsPrefBranch::{get,set}StringPref(), which allowed the
getting of utf8 strings from prefs, which previously required using
nsISupportsString with {get,set}ComplexValue. That bug also converted most
uses.

This patch finishes the job.

- It removes the nsISupportsString support.

- It converts existing code that relied on the nsISupportsString.

- It removes the lint that was set up to detect such uses of nsISupportsString.

--HG--
extra : rebase_source : b885ee784704819e181430200af5ef762e269d14
2017-11-10 09:07:48 +11:00
David Teller
a2b2ad337a Bug 1108587 - Extending the grace period of AsyncShutdown and the nsTerminator for ASAN builds;r=gsvelto
Bug 1108587 seems to suggest that the grace period for nsTerminator is
too short for ASAN builds, which take much longer to shutdown. This
patch changes the grace period from 1 minute to 3 minutes, hoping that
this will be sufficient. Somewhere along the way, we also extend the
duration of AsyncShutdown, because that's the simplest way to do both
at once.

MozReview-Commit-ID: 28eWO5m6Wh3

--HG--
extra : rebase_source : eae9db952d5395f986781f3cbd23507b715fa8c9
2017-11-09 16:21:34 +01:00
Nicholas Nethercote
c40b04cecd Bug 1415418 - Simplify GetUint(). r=glandium.
This makes it just like GetDefaultUint().

MozReview-Commit-ID: CSoLpLdstAv

--HG--
extra : rebase_source : 5ba8cb897c46197b7ef52c6c27b45ad223bc3d41
2017-11-08 16:45:42 +11:00
Nicholas Nethercote
882ae209b6 Bug 1415418 - Reorder Preferences.h. r=glandium.
The various getters and setters are in a confusing order. This patch puts them
in a more sensible order. It also streamlines the comments, which were
generally low-value and in some cases incorrect.

MozReview-Commit-ID: 3ngzZDSt0JI

--HG--
extra : rebase_source : 8a5a66f65621889483d2df9f4487194172f70804
2017-11-08 16:45:38 +11:00
Sebastian Hengst
a353221537 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-09 00:00:16 +02:00
Narcis Beleuzu
57d9eb5fb1 Backed out 1 changesets (bug 1414096) for dt1 failures "devtools/client/commandline/test/browser_cmd_pref3.js" r=backout on a CLOSED TREE
Backed out changeset e843de356b7e (bug 1414096)
2017-11-08 18:04:01 +02:00