Commit Graph

6763 Commits

Author SHA1 Message Date
Sebastian Hengst
2181970726 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-11-01 00:39:58 +01:00
Nicholas Nethercote
af33aed804 Bug 1412718 (part 2) - Improve nsPrefBranch::DeleteBranch(). r=glandium.
This patch converts it to use Gecko strings instead of C strings, which makes
it much nicer.

MozReview-Commit-ID: KtRp3vaXwN5

--HG--
extra : rebase_source : c6788cbed5c4b932eb5b4119c407aea538cb1799
2017-11-01 08:28:10 +11:00
Nicholas Nethercote
89134cc30a Bug 1412718 (part 1) - Inline and remove PREF_DeleteBranch(). r=glandium.
It has a single call site.

MozReview-Commit-ID: BH7GuipEgl

--HG--
extra : rebase_source : fa13eb8be2a088b717d834686d60b4eea6b1df4d
2017-11-01 07:59:40 +11:00
Nicholas Nethercote
8bd05bfcc0 Bug 1412949 - Remove SystemMemoryReporter. r=erahm.
This was created for B2G and isn't really useful otherwise. It only works on
Linux, and it's behind the memory.system_memory_reporter pref, which is false
by default.

The patch also removes LinuxUtils.{h,cpp}, which is no longer used.

--HG--
extra : rebase_source : b97a018be11a79f83855a73b88020bfa86e60f78
2017-10-31 12:49:41 +11:00
Alessio Placitelli
5230ddc6b6 Bug 1412845 - Whitelist the "default" channel in Prferences.cpp. r=chutten
This is needed for local developer builds to enable extended
telemetry recording by default. As a consequence, other subsystems
relying on this prefs will turn on (e.g. experiments, BHR, ...).

MozReview-Commit-ID: W3RarufCdY

--HG--
extra : rebase_source : 8690e969baad1b9191ea3fef9fb7dd6e41e00de7
2017-10-31 08:53:32 +01:00
Bas Schouten
cbbc50786e Bug 1412850: Release capture drawtargets on the paint thread. r=rhunt
MozReview-Commit-ID: AD3F5DfGAkp
2017-10-30 15:50:25 +01:00
Chris H-C
84de24dd05 bug 1406391 - Lock toolkit.telemetry.enabled based on channel r=froydnj
In Unified Telemetry toolkit.telemetry.enabled controls whether we send base
collection data or extended collection. The difference is mostly in volume, not
in kind (though extended collection has a little stricter testing and monitoring
requirements).

Since the Preferences UI change in Firefox 56, users no longer have the ability
to change toolkit.telemetry.enabled. This is a good thing as for pre-release
users very few disabled extended collection, and even fewer release users
enabled it. This provides uniform collection based on channel which should
eventually net us some efficiencies.

Until then we need to align our use of the toolkit.telemetry.enabled pref with
the UI change that has already shipped. This is accomplished by locking t.t.e
to 'true' on pre-release channels and locking it to 'false' on everything else.

This doesn't apply to Android as it doesn't (yet) use Unified Telemetry. t.t.e
means something rather different there.

MozReview-Commit-ID: EOpWm8b0jWA
2017-10-30 10:47:39 -04:00
Coroiu Cristina
de62a69e14 Merge inbound to mozilla-central r=merge a=merge 2017-10-30 12:16:47 +02:00
Nicholas Nethercote
9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Sebastian Hengst
3792a177e6 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IZImXBBcbVQ
2017-10-28 10:25:57 +02:00
Phil Ringnalda
4bc2b1615d Backed out 4 changesets (bug 1408433, bug 1406391, bug 1408512) for crashing tests by touching the network contacting incoming.telemetry.mozilla.org on nightly builds
Backed out changeset 9bfd4b0927dc (bug 1408433)
Backed out changeset 555850d5107e (bug 1408512)
Backed out changeset 15d959b9123e (bug 1406391)
Backed out changeset e1f34ba9cecc (bug 1406391)

MozReview-Commit-ID: BVoGRsD73Hf
2017-10-27 21:08:27 -07:00
Chris H-C
be62507aa8 bug 1406391 - Lock toolkit.telemetry.enabled based on channel r=froydnj
In Unified Telemetry toolkit.telemetry.enabled controls whether we send base
collection data or extended collection. The difference is mostly in volume, not
in kind (though extended collection has a little stricter testing and monitoring
requirements).

Since the Preferences UI change in Firefox 56, users no longer have the ability
to change toolkit.telemetry.enabled. This is a good thing as for pre-release
users very few disabled extended collection, and even fewer release users
enabled it. This provides uniform collection based on channel which should
eventually net us some efficiencies.

Until then we need to align our use of the toolkit.telemetry.enabled pref with
the UI change that has already shipped. This is accomplished by locking t.t.e
to 'true' on pre-release channels and locking it to 'false' on everything else.

This doesn't apply to Android as it doesn't (yet) use Unified Telemetry. t.t.e
means something rather different there.

MozReview-Commit-ID: EOpWm8b0jWA
2017-10-27 10:59:36 -04:00
Xidorn Quan
b24625e376 Bug 1411532 part 1 - Add a pref for enabling stylo on chrome documents. r=bz
MozReview-Commit-ID: 7Zbh4Mf43xC

--HG--
extra : rebase_source : f9e4d0b6d1234cb8efcfbaaab2a349d2a082dd6e
2017-10-27 15:07:51 +11:00
Sebastian Hengst
5c15da1f08 merge mozilla-inbound to mozilla-central. r=merge a=merge
--HG--
rename : testing/talos/tests/__init__.py => testing/talos/talos/unittests/__init__.py
rename : testing/talos/tests/browser_output.ts.txt => testing/talos/talos/unittests/browser_output.ts.txt
rename : testing/talos/tests/browser_output.tsvg.txt => testing/talos/talos/unittests/browser_output.tsvg.txt
rename : testing/talos/tests/profile.tgz => testing/talos/talos/unittests/profile.tgz
rename : testing/talos/tests/ps-Acj.out => testing/talos/talos/unittests/ps-Acj.out
rename : testing/talos/tests/test_talosconfig_browser_config.json => testing/talos/talos/unittests/test_talosconfig_browser_config.json
rename : testing/talos/tests/test_talosconfig_test_config.json => testing/talos/talos/unittests/test_talosconfig_test_config.json
rename : testing/talos/tests/xrestop_output.txt => testing/talos/talos/unittests/xrestop_output.txt
2017-10-27 12:45:34 +03:00
Nicholas Nethercote
63f0f0af1c Bug 1411480 (attempt 2) - Change PrefSaveData's element type. r=glandium.
Because nsCString is nicer than UniqueFreePtr<char>.

The patch also streamlines pref_savePrefs(). And also changes StrEscape() to
always put quotations around the result, because that's needed in both call
sites.

MozReview-Commit-ID: HT7HZz4QiSN

--HG--
extra : rebase_source : 442bb6002e004803a9ecb637239a000f11ec5774
2017-10-26 16:48:11 +11:00
Nicholas Nethercote
bfdd7e8e70 Bug 1411480 (attempt 2) - Simplify pref_HashPref()'s workings. r=glandium.
First, the patch removes the return values from PrefTypeFlags::Set*(). They
allow chained calls, but they're barely used and they just make the code harder
to read.

Second, the patch changes pref_SetValue() to not modify and return the pref
flags. It's clearer if the flags changing is done separately. This requires
passing pref_SetValue() the old type instead of the flags.

MozReview-Commit-ID: HZVS2TIlBIY

--HG--
extra : rebase_source : 6638244214cda15ceae5a1930659aed434d8261b
2017-10-26 16:36:17 +11:00
Nicholas Nethercote
7a6dc9eed0 Bug 1411480 (attempt 2) - Make CallbackNode::mDomain const. r=glandium.
MozReview-Commit-ID: EvLC5FrMyKy

--HG--
extra : rebase_source : f31ddbc01716a539ad3a92154de1a6a49ad9a42a
2017-10-26 16:27:12 +11:00
Nicholas Nethercote
6e67b39c9c Bug 1411480 (attempt 2) - Make PrefValue::mStringVal const. r=glandium.
This makes it clear that the stored string values are never modified.

It requires some const_casts to free the strings, but that feels like an ok
trade-off.

MozReview-Commit-ID: JikBT3uwpfq

--HG--
extra : rebase_source : 1720969ba2c1ae245dff91a6d3a85d48fb669ced
2017-10-26 16:27:09 +11:00
Nicholas Nethercote
ad06d5cebc Bug 1411480 (attempt 2) - Use |private| instead of |protected| in nsPrefBranch. r=glandium.
There's not much use using |protected| in a |final| class.

MozReview-Commit-ID: IECyfNGZsL5

--HG--
extra : rebase_source : e734b360c18e5e040bea186d5aedf91137711861
2017-10-26 16:26:24 +11:00
Nicholas Nethercote
2c49c63d40 Bug 1411480 (attempt 2) - Remove pref_savePrefs()'s argument. r=glandium.
It's always gHashTable, and all the other functions in this file work directly
on gHashTable rather than taking a parameter.

MozReview-Commit-ID: BDCEvcMlo8P

--HG--
extra : rebase_source : 8f136c100f2a4f7b2b34cfa884b8cc91c2d80e3a
2017-10-26 16:26:24 +11:00
Jeremy Chen
ce49bc7b7c Bug 1411517 - stylo: "layout.css.stylo-blocklist.enabled" pref's default value should be false. r=xidorn
At present, the "layout.css.stylo-blocklist.blocked_domains" pref is empty. It
is probably meaningless to set "layout.css.stylo-blocklist.enabled" pref to true
by default. We can set "layout.css.stylo-blocklist.enabled" pref to true by the
styloblocklist system add-on once the "layout.css.stylo-blocklist.blocked_domains"
pref is non-empty.

MozReview-Commit-ID: 2B5JnGEafLo

--HG--
extra : rebase_source : 7b694a2cbe70d2d09c1a5c2c2e4c6eec31f39a1e
2017-10-26 22:19:08 +02:00
Sebastian Hengst
5848bd39ab Merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 26KLqf6YOiM
2017-10-27 00:10:27 +02:00
Sebastian Hengst
b181c484ad merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: LcCWQzgwIBi
2017-10-26 23:57:40 +02:00
Nicholas Nethercote
5f344fea70 Bug 1411480 (attempt 2) - Remove the machinery for choosing the dirty callback. r=glandium.
It's unnecessarily general, because we only ever use
Preferences::DirtyCallback() as the callback.

And because it's no longer a callback, the patch renames DirtyCallback() as
HandleDirty().

MozReview-Commit-ID: Hl50dcxfVQq

--HG--
extra : rebase_source : 5807d2ed650466f85cd7325f2adccdc177ccb4d2
2017-10-26 16:14:01 +11:00
Nicholas Nethercote
0416bcac82 Bug 1411480 (attempt 2) - Inline and remove PREF_GetPrefType(). r=glandium.
It has a single call site.

MozReview-Commit-ID: o5CwR8Od7o

--HG--
extra : rebase_source : 85663f6414ae7214d2ba32a0bb3b3166da2c89c5
2017-10-26 16:14:00 +11:00
Nicholas Nethercote
9e821ded90 Bug 1411480 (attempt 2) - Inline and remove pref_[SG]etInitPhase(). r=glandium.
They both have a single use.

MozReview-Commit-ID: 4Jj64B6NV0o

--HG--
extra : rebase_source : 19c1d93393688daee5b7670be241785639df81d2
2017-10-26 16:14:00 +11:00
Nicholas Nethercote
3418db65be Bug 1411480 (attempt 2) - Inline and remove pref_SetWatchingPref(). r=glandium.
It's simple enough that having a separate function isn't helpful.

MozReview-Commit-ID: Ke9BIfp9yHU

--HG--
extra : rebase_source : 57aee451b8fd3450da4a604cefbf9fafda894b1c
2017-10-26 16:14:00 +11:00
Nicholas Nethercote
dc68184056 Bug 1411480 (attempt 2) - Inline and remove the parser's pref_DoCallback() function. r=glandium.
Preferences.cpp has two functions named pref_DoCallback(). One of them has a
single use in the parser. This patch inlines that single use to remove the name
duplication.

MozReview-Commit-ID: HnyteQ0N5M1

--HG--
extra : rebase_source : 37a34f3fbe866eee71a7bf0bba07d9d67cc8c81d
2017-10-26 15:32:15 +11:00
Kris Maglione
257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
Phil Ringnalda
535f8401d0 Backed out 11 changesets (bug 1411480) for libpref xpcshell test failures
Backed out changeset 0f266ffacf0d (bug 1411480)
Backed out changeset 75212b4a8c0a (bug 1411480)
Backed out changeset 0c807a8e8b29 (bug 1411480)
Backed out changeset 21324f73db0c (bug 1411480)
Backed out changeset f7de6fa0ef2c (bug 1411480)
Backed out changeset b7cdbe5153fa (bug 1411480)
Backed out changeset 8a66ec3e8338 (bug 1411480)
Backed out changeset 3fdf2ac7762d (bug 1411480)
Backed out changeset eaa177ef5f60 (bug 1411480)
Backed out changeset e87ba9542cf8 (bug 1411480)
Backed out changeset f1cf84a50ebc (bug 1411480)

MozReview-Commit-ID: GEVRPZp5eSH
2017-10-25 20:03:25 -07:00
Nicholas Nethercote
14790e76d7 Bug 1411480 - Make CallbackNode::mDomain const. r=glandium.
MozReview-Commit-ID: EvLC5FrMyKy

--HG--
extra : rebase_source : d5998326dd40365903554094b9038248095020dc
2017-10-26 12:29:41 +11:00
Nicholas Nethercote
9222ab2401 Bug 1411480 - Make PrefValue::mStringVal const. r=glandium.
This makes it clear that the stored string values are never modified.

It requires some const_casts to free the strings, but that feels like an ok
trade-off.

MozReview-Commit-ID: JikBT3uwpfq

--HG--
extra : rebase_source : e611e57de4f059275ae2908f7300065cf953461d
2017-10-26 12:29:34 +11:00
Nicholas Nethercote
9702633811 Bug 1411480 - Change PrefSaveData's element type. r=glandium.
Because nsCString is nicer than UniqueFreePtr<char>.

The patch also streamlines pref_savePrefs(). And also changes StrEscape() to
always put quotations around the result, because that's needed in both call
sites.

MozReview-Commit-ID: HT7HZz4QiSN

--HG--
extra : rebase_source : f8d26a8c9f7ea911272113efc56744df639c5ccf
2017-10-25 10:22:39 +11:00
Nicholas Nethercote
d7b5b4b246 Bug 1411480 - Use |private| instead of |protected| in nsPrefBranch. r=glandium.
There's not much use using |protected| in a |final| class.

MozReview-Commit-ID: IECyfNGZsL5

--HG--
extra : rebase_source : bc9597ee45583e809f89f7e558cc325460390f98
2017-10-25 10:22:39 +11:00
Nicholas Nethercote
e52452101f Bug 1411480 - Remove pref_savePrefs()'s argument. r=glandium.
It's always gHashTable, and all the other functions in this file work directly
on gHashTable rather than taking a parameter.

MozReview-Commit-ID: BDCEvcMlo8P

--HG--
extra : rebase_source : e5d10e42401136a9a82d665d9717cf71ecf7e4ae
2017-10-25 10:22:39 +11:00
Nicholas Nethercote
f357e38587 Bug 1411480 - Simplify pref_HashPref()'s workings. r=glandium.
First, the patch removes the return values from PrefTypeFlags::Set*(). They
allow chained calls, but they're barely used and they just make the code harder
to read.

Second, the patch changes pref_SetValue() to not modify and return the pref
flags. It's clearer if the flags changing is done separately. This requires
passing pref_SetValue() the old type instead of the flags.

MozReview-Commit-ID: HZVS2TIlBIY

--HG--
extra : rebase_source : 32950f00975f7d9df63fa0af1c36e82b58516245
2017-10-25 10:22:39 +11:00
Nicholas Nethercote
74915ed170 Bug 1411480 - Remove the machinery for choosing the dirty callback. r=glandium.
It's unnecessarily general, because we only ever use
Preferences::DirtyCallback() as the callback.

And because it's no longer a callback, the patch renames DirtyCallback() as
HandleDirty().

MozReview-Commit-ID: Hl50dcxfVQq

--HG--
extra : rebase_source : f453d31215de3fdb0c5b6176becf2669e7ad55f1
2017-10-25 10:22:38 +11:00
Nicholas Nethercote
21290f6159 Bug 1411480 - Inline and remove PREF_GetPrefType(). r=glandium.
It has a single call site.

MozReview-Commit-ID: o5CwR8Od7o

--HG--
extra : rebase_source : 2f24a0bc7fa65af8cb60b820982c8d6cb8ee5298
2017-10-25 10:22:38 +11:00
Nicholas Nethercote
5eeb08fa63 Bug 1411480 - Inline and remove pref_[SG]etInitPhase(). r=glandium.
They both have a single use.

MozReview-Commit-ID: 4Jj64B6NV0o

--HG--
extra : rebase_source : 51297caa052281544383bc76f120b4b62b686015
2017-10-25 10:22:38 +11:00
Nicholas Nethercote
49e302c18e Bug 1411480 - Inline and remove pref_SetWatchingPref(). r=glandium.
It's simple enough that having a separate function isn't helpful.

MozReview-Commit-ID: Ke9BIfp9yHU

--HG--
extra : rebase_source : de1518544ddb28185635628c33d356ab07480c1c
2017-10-25 10:22:38 +11:00
Nicholas Nethercote
529db19e62 Bug 1411480 - Inline and remove the parser's pref_DoCallback() function. r=glandium.
Preferences.cpp has two functions named pref_DoCallback(). One of them has a
single use in the parser. This patch inlines that single use to remove the name
duplication.

MozReview-Commit-ID: HnyteQ0N5M1

--HG--
extra : rebase_source : 93f963d3ba445c1c3a482fa95dbab33e57dae188
2017-10-25 10:22:38 +11:00
Miko Mynttinen
e61db8e3f3 Bug 1411248 - Add some early exit heuristics to avoid complicated partial display list builds r=mattwoodrow
MozReview-Commit-ID: BRYYvGHptbw

--HG--
extra : rebase_source : e740e868bf6f1ce366286a4e8a3db8f1918b4160
extra : source : df60d43e89285978ca7ba6bab5a5c7ef49ffaf92
2017-10-24 14:54:16 +02:00
Attila Craciun
fb931a6ca7 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE.
--HG--
extra : amend_source : ebff7913d049184412278b01281ae44a483d63c3
2017-10-25 12:34:44 +03:00
Attila Craciun
7bcf901c3b Merge inbound to mozilla-central r=merge a=merge 2017-10-25 12:30:28 +03:00
Nicholas Nethercote
ce583d5ebe Bug 1410765 (part 3) - Remove nsPrefBranch::RemoveObserverFromMap declaration. r=glandium.
--HG--
extra : rebase_source : ab40d0f3430c9259a4fa4cc7fed3f114a946c158
2017-10-25 10:22:37 +11:00
Nicholas Nethercote
c67dabae5c Bug 1410765 (part 2) - Redo clang-format on libpref/. r=glandium.
--HG--
extra : rebase_source : 7bf014830baec7abfab51f71ac89a5bc3bec1860
2017-10-25 10:22:37 +11:00
Nicholas Nethercote
91f9b1d8e1 Bug 1410765 (part 1) - Remove unused PrefTypeFlags values. r=glandium.
--HG--
extra : rebase_source : f5d4ac642ddbfc720891c7a72cf735e0f77a460a
2017-10-25 10:22:37 +11:00
Masayuki Nakano
ad20ed277d Bug 1410988 - Add a debug mode pref to emulate odd touchpad utils which give focus to window under mouse cursor when user tries to scroll the content r=jimm
Some odd touchpad utils give focus to window under mouse cursor when user tries
to scroll the content with swiping or something.

This is really odd behavior because some windows like popup windows doesn't
want focus. However, such ones do actually. For making easier to check such
device's behavior, we should have a pref to emulate such behavior.

MozReview-Commit-ID: 6euwpHn7blf

--HG--
extra : rebase_source : cc23f08f422f25f2851404696e06e069c7936186
2017-10-19 02:28:37 +09:00
Sebastian Hengst
24b7b2eb7c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 23:59:14 +02:00
Sebastian Hengst
dbf343872c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 11:54:19 +02:00