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

13912 Коммитов

Автор SHA1 Сообщение Дата
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