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

13930 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 09d19b6c47 Bug 1419654 - Prevent possible pref default/user value type mismatches. r=glandium
Currently, you can create a pref that only has a user value, and then later
give it a default value with a different type. The entire pref is then recorded
as having this second type. This causes problems later when interpreting the
user value.

This patch makes SetValue() fail if it tries to set a default value whose type
differs from an existing user value. It also expands an existing test to cover
this case and some similar ones.

MozReview-Commit-ID: 89tvISQ7RNT

--HG--
extra : rebase_source : 6cf34da0ff24f5b90a88003445a4a7c88b1f3907
2017-11-21 16:00:23 +11:00
Gabriele Svelto 6250b4ad47 Bug 1402519 - Remove MOZ_CRASHREPORTER directives from modules/libpref; r=njn
MozReview-Commit-ID: 3Jr4Cfe9Bn1

--HG--
extra : rebase_source : 5d151212da86676adf195921423e5826a818891e
2017-09-29 16:27:44 +02:00
Nika Layzell 93c45cb3ef Bug 1419144 - Part 2: Remove unused gThrottledIdlePeriodLength, r=farre
MozReview-Commit-ID: GGMJC6HuCLa
2017-11-23 13:11:14 -05:00
Nicolas Silva ab49f34451 Bug 1420123 - Expose more WebRender debug flags to prefs. r=kvark 2017-11-23 16:01:48 +01:00
Cosmin Sabou a5d613086a Merge mozilla-inbound to mozilla-central r=merge a=merge 2017-11-23 11:42:46 +02:00
Phil Ringnalda f12ca11346 Backed out 3 changesets (bug 1407423) for Android permaorange in test_vrDisplay_getFrameData.html
Backed out changeset b9dbe5af9a06 (bug 1407423)
Backed out changeset 16d247b8091d (bug 1407423)
Backed out changeset 2b625d265761 (bug 1407423)

MozReview-Commit-ID: 6clRbH1Hodr
2017-11-22 18:15:10 -08:00
Florian Quèze 723d70b38a Bug 1226616 - The presence of the general.config.filename preference should be reported on telemetry. r=njn, data-review=francois 2017-11-23 00:59:38 +01:00
Nicholas Nethercote dccbe1fff8 Bug 1419648 - Remove and inline PREF_RegisterCallback(). r=glandium
This requires adding an aPriority argument (defaulting to false) to
Preferences::RegisterCallback(). And RegisterVarCacheCallback() is no longer
necessary.

MozReview-Commit-ID: BMDk3HuaQVV

--HG--
extra : rebase_source : 17a61cfd9a82f24854162fc993223691041ea46d
2017-11-21 12:57:53 +11:00
Nicholas Nethercote 1ea97b46f1 Bug 1419648 - Inline and remove PREF_UnregisterCallback(). r=glandium
MozReview-Commit-ID: GLUdbRjxDLR

--HG--
extra : rebase_source : df713f8f242618f8624640bf94bebcc996362b1f
2017-11-21 12:57:53 +11:00
Nicholas Nethercote b4b208fe70 Bug 1419648 - Remove and inline PREF_{LockPref,UnlockPref,PrefIsLocked}(). r=glandium
MozReview-Commit-ID: 7HatftTQwHr

--HG--
extra : rebase_source : 686cec1ece58dafb2227819db308c17f6d30cacd
2017-11-16 09:05:43 +11:00
Nicholas Nethercote 1bd63d481b Bug 1419648 - Inline and remove PREF_HasUserPref(). r=glandium
MozReview-Commit-ID: Dz2IgjrfEjQ

--HG--
extra : rebase_source : f0cc02751263b1a04f49b06115e407ab96dc8e69
2017-11-15 17:01:15 +11:00
Nicholas Nethercote 439ed6b332 Bug 1419648 - Inline and remove PREF_ClearUserPref(). r=glandium
MozReview-Commit-ID: EBb9hxtIwPz

--HG--
extra : rebase_source : b7944677bf72e7e891551e81775659dd46b59fab
2017-11-15 17:01:15 +11:00
Nicholas Nethercote d03b40ebee Bug 1419648 - Inline and remove PREF_ClearAllUserPrefs(). r=glandium
MozReview-Commit-ID: Eud92V7qFS4

--HG--
extra : rebase_source : 9075832b2d0077a73e2268190e0a4a75aa89022c
2017-11-15 17:01:14 +11:00
shindli a0b20fcb81 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-22 23:42:02 +02:00
shindli fb855aa7ba Backed out 16 changesets (bug 1402519) for conflicts during merge r=backout on a CLOSED TREE
Backed out changeset 07fcf163241a (bug 1402519)
Backed out changeset c6d2ad45d8e2 (bug 1402519)
Backed out changeset 8a3caca61294 (bug 1402519)
Backed out changeset 01425eae2c48 (bug 1402519)
Backed out changeset cf298d3815de (bug 1402519)
Backed out changeset e1964f4389cd (bug 1402519)
Backed out changeset f405337f3569 (bug 1402519)
Backed out changeset a76356fd3359 (bug 1402519)
Backed out changeset d3bb350d1c34 (bug 1402519)
Backed out changeset 9d3bfd9f932c (bug 1402519)
Backed out changeset e3dd6e5b073f (bug 1402519)
Backed out changeset e801b0c00134 (bug 1402519)
Backed out changeset 8a4139fa5dca (bug 1402519)
Backed out changeset 8d01c14ac1ca (bug 1402519)
Backed out changeset 24e0dcd01898 (bug 1402519)
Backed out changeset f8fdf450613f (bug 1402519)
2017-11-23 00:11:44 +02:00
Kearwood "Kip" Gilbert 7e7cb086d3 Bug 1407423 - Ensure that any time we have loaded the Oculus runtime libary, we are polling ShouldQuit,r=daoshengmu
- Ensure ovr_GetSessionStatus is polled even when a VR presentation
  is not active.
- When we fail to initialize an Oculus Session or detect VR hardware,
  immediately unload the Oculus Library as we can't poll for ShouldQuit
  without a valid Oculus session.
- When we poll ovr_GetSessionStatus, we are now updating the mounted state
  in VRDisplayInfo::mIsMounted.
- Added prefs to control enumeration throttling and timeout to release
  VR hardware when inactive.
- Some refactoring to make frame loop more understandable and less
  brittle.
- When throttling enumeration, we ensure that all other VR apis
  also throttle enumeration so that they don't pick up the same device
  during throttling.
- Some long functions in VRManager have been broken up and
  had their inner-workings documented in more detail.

MozReview-Commit-ID: CEYwwQ9mYd0

--HG--
extra : rebase_source : b82cd9f200e6311528d4bed469d1b8044e9fc7f2
extra : amend_source : e74f56f5ec95641fd478deb71d6c7ba5d2cba7b1
2017-10-10 14:42:37 -07:00
Gabriele Svelto b32bdfa37b Bug 1402519 - Remove MOZ_CRASHREPORTER directives from modules/libpref; r=njn
MozReview-Commit-ID: 3Jr4Cfe9Bn1

--HG--
extra : rebase_source : 9584291478e44f988ace712e9fab0e97489c4693
2017-09-29 16:27:44 +02:00
Andrea Marchesini 1fd1731f81 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 3 - NS_NewInputStreamPump, r=smaug 2017-11-22 11:18:57 +01:00
Ciure Andrei c7cf019289 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-22 12:20:25 +02:00
Nicholas Nethercote 0d3f601004 Bug 1418847 - Move variable declarations within Parser::Parse(). r=glandium
MozReview-Commit-ID: FdgXKBKH4nr

--HG--
extra : rebase_source : 3433eb75f562c4d40aa32a2f617ffcbaebc9a1a7
2017-11-21 12:57:36 +11:00
Nicholas Nethercote 40c44bbf9d Bug 1418847 - Hardcode the value reader and error reporter in Parser. r=glandium
In practice we always use the same functions for these purposes.

MozReview-Commit-ID: 4Be9pRhUeff

--HG--
extra : rebase_source : 3dfafd9479371d3a47ec263a66942ddbfbefdb46
2017-11-19 20:28:53 +11:00
Nicholas Nethercote eaa4ad1134 Bug 1418847 - Move some constants into class Parser. r=glandium
MozReview-Commit-ID: 1eZiyrUWjFp

--HG--
extra : rebase_source : feea72ef3cae05616d5368bcc0170ec17736422c
2017-11-19 20:10:39 +11:00
Nicholas Nethercote 71c4d64d05 Bug 1418847 - Refactor the Parser's state enum. r=glandium
MozReview-Commit-ID: 7csnknAAEtH

--HG--
extra : rebase_source : 639fb5f148a119af93c99b5fe921bd9629f03520
2017-11-19 20:10:10 +11:00
Nicholas Nethercote 8098ada3c9 Bug 1418847 - Morph struct PrefParserState into class Parser. r=glandium
This patch makes it a proper class, and moves existing functions into it.

MozReview-Commit-ID: 5pbT3ljq44R

--HG--
extra : rebase_source : ac7ba98f9d39b3cd6f71498a5e108cb6757034e0
2017-11-19 20:10:07 +11:00
Nicholas Nethercote 30ee72e5bb Bug 1418846 - Give CallbackNode a constructor and destructor. r=glandium
And use new/delete for them. And make mDomain a unique pointer so it doesn't
need explicit deallocation.

MozReview-Commit-ID: E1jLccXaSwT

--HG--
extra : rebase_source : 5a64135d5471297ab98f8ec4557f66dac8b7eff9
2017-11-19 14:55:40 +11:00
Nicholas Nethercote 6207a59f90 Bug 1418846 - Remove PrefType::Invalid. r=glandium
Maybe<PrefType> is a better way of representing "no type".

MozReview-Commit-ID: Fnha5RxbNg4

--HG--
extra : rebase_source : 8e8322b0443305ab71acd6d98ea2607f626c5bce
2017-11-19 14:42:20 +11:00
Nicholas Nethercote 7e91e21a8a Bug 1418846 - Privatize GetRootLength(). r=glandium
MozReview-Commit-ID: JzZ2ot83YwJ

--HG--
extra : rebase_source : bd782baec39823fb6352110124cf851c184ad201
2017-11-18 20:36:56 +11:00
Nicholas Nethercote b3a73b9721 Bug 1418846 - Rename ENSURE_MAIN_PROCESS as ENSURE_PARENT_PROCESS. r=glandium
So it matches XRE_IsParentProcess().

MozReview-Commit-ID: E5ARalJhttX

--HG--
extra : rebase_source : 8ff91a9f511c27837a4e6d5e79ce097e55e884d8
2017-11-18 20:32:20 +11:00
Nicholas Nethercote 3e0ae997ab Bug 1418846 - Give PrefHashEntry a destructor. r=glandium
MozReview-Commit-ID: 84IJ25ItUuY

--HG--
extra : rebase_source : 4fcecb3fc1ebdfc5efdda27e8adf6c8dc1776a55
2017-11-18 20:29:03 +11:00
Nicholas Nethercote d65e40e1b8 Bug 1418846 - Remove PrefHashEntry::mIsSticky's getter and setter. r=glandium
This field isn't accessed outside PrefHashEntry.

MozReview-Commit-ID: IvwQe5UtjjJ

--HG--
extra : rebase_source : 5447d4e24bbf0d0637ee29377cc749b9b77b4e1e
2017-11-18 13:15:46 +11:00
Nicholas Nethercote 1ff309b5fb Bug 1418846 - Remove PrefHasEntry()::SetHas{Default,User}Value(). r=glandium
We can move the setting into ReplaceValue() and ClearValue(), and then those
methods aren't needed any more.

The patch also removes some getter calls within PrefHashEntry by directly using
field names.

MozReview-Commit-ID: 42EAx1Kh9Et

--HG--
extra : rebase_source : 3393a80a9c5d2d7c660171cdda8d3914c35e96ea
2017-11-18 13:13:27 +11:00
Nicholas Nethercote ce60c37da0 Bug 1418846 - Fix string value leaks in libpref. r=glandium
There's an "XXX" comment suggesting a possible leak when string user values are
cleared. Turns out a lot of the time there won't be a leak, because the string
pointer isn't overwritten and ClearEntry() frees the string when the pref is
destroyed. However, if the user value is subsequently overwritten with a
different string, there will be a leak. Also, even in the non-leak case, we
currently hold onto the string for longer than necessary.

This patch introduces ClearUserValue() -- which frees the string when
appropriate -- and uses it in all the places where values are cleared.

MozReview-Commit-ID: ARuWUNzPTfy

--HG--
extra : rebase_source : 4567e37ba96ba3b4ae9b1972d887eeaed1257cb0
2017-11-18 13:05:02 +11:00
Nicholas Nethercote 34ba26b512 Bug 1418846 - Overhaul pref_DoCallback. r=glandium
Specifically:

- rename it as NotifyCallbacks();

- remove the return value, because it is always NS_OK;

- some minor naming and declaration clean-ups.

MozReview-Commit-ID: GcH81owPLsp

--HG--
extra : rebase_source : 501a85f76bb823cc45dba8e4601584f5218b1a9e
2017-11-18 12:34:25 +11:00
Coroiu Cristina d6a2b15dbc Merge inbound to mozilla-central r=merge a=merge 2017-11-22 01:32:34 +02:00
Cervantes Yu 1ba4e86d19 Bug 1416703 - Part 8: Remove dead security prefs in all.js. r=dveditz
MozReview-Commit-ID: 1wpITF2xbyK

--HG--
extra : rebase_source : 26cdaeed17adc2249ea5aa1cba4392f557a44c4c
2017-11-14 19:20:53 +08:00
Cervantes Yu d88ae56a5d Bug 1416703 - Part 7: Remove some dead prefs in all.js. r=baku
This removes from all.js some dom, browser, autocomplete, ui, and other prefs
that are no longer accessed in our code.

MozReview-Commit-ID: JGoBZ2GUbPD

--HG--
extra : rebase_source : cc87f28ca547ac5568a6df0dd5c3561712dc149d
2017-11-14 18:20:38 +08:00
Cervantes Yu 36d040eb2b Bug 1416703 - Part 6: Remove dead gfx prefs in all.js. r=nical
MozReview-Commit-ID: ARKn2l9xNqs

--HG--
extra : rebase_source : cd7954f8785ab9aa9b5515732300417f777831dc
2017-11-14 16:20:48 +08:00
Cervantes Yu 087da036a8 Bug 1416703 - Part 5: Remove dead prefs for profile management in all.js. r=mak
MozReview-Commit-ID: GlRtI9Xuf4R

--HG--
extra : rebase_source : ccb7120e9836484f6bf248ae12c7d17284ad5c66
2017-11-14 16:17:29 +08:00
Cervantes Yu 95b4c711d1 Bug 1416703 - Part 4: Remove dead devtools prefs in all.js. r=jdescottes
MozReview-Commit-ID: 8IbaRrY3dfK

--HG--
extra : rebase_source : 116bfe0fd284cd1edbd7d07513bf97a4c9bf5910
2017-11-14 16:14:16 +08:00
Cervantes Yu c4f82d6bd7 Bug 1416703 - Part 3: Remove dead media prefs in all.js. r=cpearce,jesup
MozReview-Commit-ID: KIVAnQPTvCp

--HG--
extra : rebase_source : 983b3d79ebea8fa3bf878457931dcaf14c15595f
2017-11-14 16:10:31 +08:00
Cervantes Yu 9ea90c896d Bug 1416703 - Part 2: Remove dead prefs for printing in all.js. r=bobowen
This removes prefs for printing that are only declared in all.js but not accessed
elsewhere. Also correct the name of "print.print_in_color".

MozReview-Commit-ID: GrHNUjCiijA

--HG--
extra : rebase_source : 2d778dd6e517c10b569ff98af8da1ed9b80308e0
2017-11-14 15:10:10 +08:00
Cervantes Yu 08294f9c66 Bug 1416703 - Part 1: Remove dead accessibility prefs in all.js. r=Gijs
MozReview-Commit-ID: sKcuZ9abi0

--HG--
extra : rebase_source : 692d2bb2913f921b4a88bedca51da474b6d0b219
2017-11-14 13:55:33 +08:00
Tiberius Oros 797c93d81f Merge inbound to mozilla-central r=merge a=merge 2017-11-21 11:55:23 +02:00
Nicholas Nethercote 633725db69 Bug 1418467 - Privatize PrefHashEntry::m{Default,User}Value. r=glandium
MozReview-Commit-ID: 9Fzaf4ifF0N

--HG--
extra : rebase_source : 739933d801bfa7dc4580f5d1bd3c81e5d3f07c2e
2017-11-18 07:40:01 +11:00
Nicholas Nethercote 00d85378fb Bug 1418467 - Add PrefHashEntry::SetValue(). r=glandium
It's a horrible method, but the horribleness was pre-existing. I hope to make
it nicer in a follow-up bug.

MozReview-Commit-ID: 3tMTEeBNVax

--HG--
extra : rebase_source : b21d80ed6468b7c22689df64c1ae1bdda49a2a06
2017-11-18 07:38:24 +11:00
Nicholas Nethercote 48a1e0788f Bug 1418467 - Partly move value getting into PrefHashEntry. r=glandium
MozReview-Commit-ID: 4ouh3XFxPZr

--HG--
extra : rebase_source : d71c1db9a979bbd9fc8b1e0ed385e04b7cdb27cb
2017-11-18 07:28:29 +11:00
Nicholas Nethercote ce0ad5b0c0 Bug 1418467 - Add PrefHashEntry::UserValueToStringForSaving(). r=glandium
This moves part of pref_savePrefs() into PrefHashEntry.

This requires moving StrEscape() higher up to avoid a forward declaration.

Note that clang-format insists on indenting an unrelated comment, I don't know
why.

MozReview-Commit-ID: 7gww3r7t9y4

--HG--
extra : rebase_source : 63f19bb2c556cc806cc6ce43e70ac6c95e6d67bc
2017-11-18 07:27:06 +11:00
Nicholas Nethercote 236478c605 Bug 1418467 - Move pref_ValueChanged() into PrefValue. r=glandium
And invert its sense, renaming as Equals(), because that is easier to think
about.

The patch also reorders some conditions so that
HasDefaultValue()/HasUserValue() is tested before Equals(). This isn't strictly
necessary, but it reads better.

MozReview-Commit-ID: JeGrevDwqKz

--HG--
extra : rebase_source : 575758e11d7e66226fe196f92f2dd355b1444d1d
2017-11-18 07:19:42 +11:00
Nicholas Nethercote 3fe59e0566 Bug 1418156 - Remove unnecessary forward declaration of pref_SetPref(). r=glandium
MozReview-Commit-ID: KQHfpAKEEgt

--HG--
extra : rebase_source : 3c622413c72024889214c8ee5ff994fb6a0ad390
2017-11-17 16:29:18 +11:00
Nicholas Nethercote 9f8d2c21ff Bug 1418156 - Move pref_SetValue() into PrefHashEntry. r=glandium
MozReview-Commit-ID: LE7vQ8Iz5Dg

--HG--
extra : rebase_source : 563e2507cb1f4d74ec2f28f4644b4249605e3c81
2017-11-17 16:27:10 +11:00