Commit Graph

13969 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
98e2a16031 Bug 1418156 - Rename PrefHashEntry::mKey as mName, and make it private. r=glandium
This requires adding a constructor, which is used in a placement new.

MozReview-Commit-ID: 3v6843D5DMu

--HG--
extra : rebase_source : 780902ae8e761bdf1141f24bf5594ce910ea32b4
2017-11-17 15:57:08 +11:00
Nicholas Nethercote
20dcc4a828 Bug 1418156 - Move pref_EntryHasAdvisablySizedValues() into PrefHashEntry. r=glandium
MozReview-Commit-ID: 4p0KnaOOi2j

--HG--
extra : rebase_source : 4f1513ca77efa42a44d818e9f3a2b44af0e15199
2017-11-17 15:29:30 +11:00
Nicholas Nethercote
32b0c9bb22 Bug 1418156 - Move pref_GetPrefFromEntry into PrefHashEntry. r=glandium
And rename it as ToSetting(). This requires also moving
AssignPrefValueToDomPrefValue into PrefHashEntry.

MozReview-Commit-ID: 8ntNZJt9rhv

--HG--
extra : rebase_source : 5dd5a2c570b2ceefb506b4051c414b06d27a95f2
2017-11-17 15:29:30 +11:00
Nicholas Nethercote
645fe6b3a0 Bug 1418156 - Overhaul GetPrefValueFromEntry. r=glandium
This patch:

- partially inlines GetPrefValueFromEntry() at its two call sites, to avoid
  repeating the kind check;

- renames it as AssignPrefValueToDomPrefValue().

MozReview-Commit-ID: BUBk3ML6h5O

--HG--
extra : rebase_source : eb12adf4af2ee05356af6b2b4f346aa3425ff438
2017-11-17 15:29:29 +11:00
Nicholas Nethercote
e7c913bc12 Bug 1418156 - Move the PLDHashTable ops into PrefHashEntry. r=glandium
MozReview-Commit-ID: HJfjz2PzW0I

--HG--
extra : rebase_source : 717a3d5121a33ca01da5c0b5298386f4c8345eae
2017-11-17 15:29:29 +11:00
Nicholas Nethercote
cb911105fb Bug 1418156 - Merge PrefTypeFlags into PrefHashEntry. r=glandium
PrefTypeFlags is a class with a lot of smarts (i.e. methods). PrefHashEntry is
a class with little smarts. This is silly, because PrefTypeFlags is essentially
an internal implementation detail of PrefHashEntry.

This patch merges PrefTypeFlags into PrefHashEntry, so that PrefHashEntry has
all the smarts. This means lots of `pref->mPrefFlags.Foo()` calls become
`pref->Foo()`.

The patch also changes the representation of the type and flags within
PrefHashEntry to use bitfields, which avoids the need for a Flags type and is
much simpler than the old approach.

MozReview-Commit-ID: 4Yt9OtBzh9e

--HG--
extra : rebase_source : 18fc01217aeaee7057b3d9a54b18cae45be5538f
2017-11-17 15:29:14 +11:00
Nicholas Nethercote
a0f04ed4e6 Bug 1418156 - Don't zero newly added PrefHashEntrys. r=glandium
They are guaranteed to be zeroed already by PLDHashTable.

MozReview-Commit-ID: LBeGa9ABYc3

--HG--
extra : rebase_source : f767d0d20cfb1c187496be20fff4cce43c768ccd
2017-11-17 13:30:38 +11:00
Nicholas Nethercote
6b354a0077 Bug 1418156 - Remove forward declaration of PrefHashEntry. r=glandium
MozReview-Commit-ID: 1KRWnjp9VW4

--HG--
extra : rebase_source : 8da909d5e92b71399e1d9981d1e255cdecf9bd75
2017-11-17 13:27:00 +11:00
Tooru Fujisawa
5e6c2faca5 Bug 1416252 - Remove conditional catch consumers in modules/libjar/. r=mossop 2017-11-18 22:57:17 +09:00
Michal Novotny
6d87315b29 Bug 1392841 - Enable RCWN on Nightly, r=valentin 2017-11-18 11:31:06 +01:00
Noemi Erli
c7026c5a77 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE
--HG--
rename : devtools/client/responsive.html/components/DprSelector.js => devtools/client/responsive.html/components/DevicePixelRatioSelector.js
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/pyasn1/codec/native/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/codec/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/codec/ber/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/codec/cer/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/codec/der/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/codec/native/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/compat/__init__.py
rename : third_party/python/pyasn1/test/__init__.py => third_party/python/pyasn1/tests/type/__init__.py
extra : rebase_source : d9b683c2142cb0edada8891c1c3539fd2f3593ee
2017-11-18 00:33:17 +02:00
Ryan Hunt
ab27b063e3 Remove layers.omtp.force-sync preference (bug 1416941, r=dvander)
This commit removes the `layers.omtp.force-sync` preference and replaces
it with a preprocessor define that is commented out. This commit also
changes the behavior of force-sync so that it also does synchronization
with CompositorBridgeChild like normal OMTP. This simplifies the code
and makes using a preprocessor define easier.

MozReview-Commit-ID: 6RfuFTFBdMh

--HG--
extra : rebase_source : 0778a3087324b9e87f44587efbb49c71edf47f23
2017-11-14 14:05:55 -05:00
Nicholas Nethercote
a7f9fffa3f Bug 1417806 - Name variables more consistently. r=glandium
Specifically:

- PrefHashEntry --> `pref`
- PrefName      --> `prefName`
- PrefSetting   --> `setting`

MozReview-Commit-ID: CSse2jVro3E

--HG--
extra : rebase_source : 3f31b4d9ecf4158fa6cf21e184678a0b38d79737
2017-11-16 18:59:27 +11:00
Nicholas Nethercote
8184466bdb Bug 1417806 - Rename m{User,Default}Pref as m{User,Default}Value.
Because they are the pref's values, not the pref itself.

MozReview-Commit-ID: 1N4Fh2TF8lL

--HG--
extra : rebase_source : 5645a0e5897fc825e6bbc6da2c6d40fb852a9efb
2017-11-16 18:48:08 +11:00
Nicholas Nethercote
a5034e04df Bug 1417806 - Avoid "sticky default" terminology. r=glandium
It's the user value that's sticky, not the default value. Though we typically
talk about the entire pref being sticky, so that's what this patch does.

MozReview-Commit-ID: 8THuRCTZ7uw

--HG--
extra : rebase_source : 8164f71065bcae1376c3e2bf241593c62c90b702
2017-11-16 16:16:03 +11:00
Nicholas Nethercote
248335166c Bug 1417806 - Rename kPrefSticky as kStickyPref. r=glandium
This matches the corresponding string "sticky_pref".

MozReview-Commit-ID: 8bqM5x8bIoG

--HG--
extra : rebase_source : 20b5b8b8df8b936a22849766552d11f659ffc84b
2017-11-16 18:45:53 +11:00
Nicholas Nethercote
b60b81ec31 Bug 1417806 - Rename some things in PrefTypeFlags. r=glandium
So that "default value" and "user value" are used consistently.

MozReview-Commit-ID: Hmfct8STu33

--HG--
extra : rebase_source : 3f27992630e6e834ce470693a15d8f6b99706cfe
2017-11-16 16:02:07 +11:00
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
Rob Wu
5b7fed7163 Bug 1418287 - Add preference to disable the system notification service r=baku
MozReview-Commit-ID: 5D1yJ8o0BgA

--HG--
extra : rebase_source : d4972854e5e8fab117dd6cdae82c2cebca002e5d
2017-11-17 13:29:15 +01:00
Tom Ritter
d38adaf1d5 Bug 1411742 Remove all references to media.getusermedia.screensharing.allowed_domains as we have removed all uses of it in the code r=jib
MozReview-Commit-ID: 7lziGDZZ3E4

--HG--
extra : rebase_source : 16e48a6f57fe4c8a05f386db68de01e42ae1e0bb
2017-10-26 11:46:37 -05:00
Tom Ritter
5e81122570 Bug 1411742 Remove the pref media.getusermedia.playout_delay and the field as they are not used anywhere r=jib
MozReview-Commit-ID: Gjbeg0zWtJ1

--HG--
extra : rebase_source : 55ad0e8f5e8ec45e7ed365ea516da9ecbc498253
2017-11-16 21:57:07 -06:00
Tom Ritter
3b8bd8d918 Bug 1411742 Remove the media.navigator.video.default_minfps pref and all uses of it as the field is never actually used r=jib
MozReview-Commit-ID: 3WsdL18BF75

--HG--
extra : rebase_source : 9c0016e5045f50876c8db13930408b54fb8e1ac4
2017-10-26 11:37:16 -05:00
Tim Huang
f4abe5782a Bug 1417741 - Add support of Atmoic<> for Preferences::Add*VarCache(). r=baku,njn
MozReview-Commit-ID: 9aeLvgWdZxy

--HG--
extra : rebase_source : b6130610ad8f80257022cb6e103addfe58b96af2
2017-11-16 11:02:50 +08:00
Valentin Gosu
d2d8524673 Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder
This also changes URIUtils.cpp:DeserializeURI() to use the mutator to instantiate new URIs, instead of using their default constructor.

MozReview-Commit-ID: JQOvIquuQAP

--HG--
extra : rebase_source : e146624c5ae423f7f69a738aaaafaa55dd0940d9
2017-11-20 17:11:30 +01:00
Timothy Guan-tin Chien
a2128b4cba Bug 1419277 - Follow-up, remove old & duplicate fonts from macOS default r=m_kato
Given that we only support macOS >= 10.9 nowadays, we don't need
to consider fallbacks on old systems anymore.

Removing LiHei Pro & LiSong Pro because they are old.
Removing STSong & STHeiti because they are simply old font names aliased to new Songti/Heiti SC.

MozReview-Commit-ID: BNYBjXCpQOr

--HG--
extra : rebase_source : 4c19607d183ac4033c8bdc05bd05b92c906a5e9d
2017-11-21 13:43:36 +08:00
Timothy Guan-tin Chien
f093ba24c0 Bug 1419277 - Set Songti TC/SC as default zh-{CN/HK/TW} font in release r=m_kato
MozReview-Commit-ID: 4TUNSFK0Fu9

--HG--
extra : rebase_source : c615125ba0e773c46f584c7a9c07e7344b33a46b
2017-11-21 13:39:00 +08: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
Robin Grenet
34508b32f6 Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6

--HG--
extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
2017-11-16 13:35:58 +01: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