Commit Graph

15143 Commits

Author SHA1 Message Date
Andrea Marchesini
194f006ba9 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 22 - dom.indexedDB.storageOption.enabled, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
a08ebce8d8 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 21 - dom.enable_performance_observer, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
841dd1282e Bug 1489844 - Port DOMPrefs to StaticPrefs - part 20 - devtools.enabled, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
7de64f2060 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 19 - privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
f7d3352ce2 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 18 - privacy.resistFingerprinting, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
fda9223d0e Bug 1489844 - Port DOMPrefs to StaticPrefs - part 17 - dom.fetchObserver.enabled, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
82b6a8da30 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 16 - dom.netinfo.enabled, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
c47168b4b7 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 15 - dom.webkitBlink.dirPicker.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
7a7da121dc Bug 1489844 - Port DOMPrefs to StaticPrefs - part 14 - gfx.offscreencanvas.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
54cc64fa25 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 13 - dom.streams.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
50429ea3ae Bug 1489844 - Port DOMPrefs to StaticPrefs - part 12 - dom.push.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
eb04a59fb8 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 11 - dom.promise_rejection_events.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
deaf03b28e Bug 1489844 - Port DOMPrefs to StaticPrefs - part 10 - dom.storageManager.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
7cef10ddb5 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 9 - dom.serviceWorkers.testing.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Andrea Marchesini
70d8e635cf Bug 1489844 - Port DOMPrefs to StaticPrefs - part 8 - dom.serviceWorkers.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
ddda8d451e Bug 1489844 - Port DOMPrefs to StaticPrefs - part 7 - dom.webnotifications.requireinteraction.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
e3c7a44eb3 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 6 - dom.webnotifications.serviceworker.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
857ed47a4a Bug 1489844 - Port DOMPrefs to StaticPrefs - part 5 - dom.webnotifications.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
74d358af13 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 4 - dom.performance.enable_user_timing_logging, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
8288bddafb Bug 1489844 - Port DOMPrefs to StaticPrefs - part 3 - dom.caches.testing.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
d26d5425d9 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 2 - dom.caches.enabled, r=ehsan 2018-09-10 20:36:15 +02:00
Andrea Marchesini
84efbc6ccd Bug 1489844 - Port DOMPrefs to StaticPrefs - part 1 - canvas_imagebitmap_extensions_enabled, r=ehsan 2018-09-10 20:36:14 +02:00
Robert Helmer
7d4c15f217 Bug 1465251 - use PrioEncoder to encode Telemetry values for pilot project r=kmag
Use PrioEncoder to encode a few already-included histograms, so we can compare results on the Telemetry server side.

Differential Revision: https://phabricator.services.mozilla.com/D5088

--HG--
extra : moz-landing-system : lando
2018-09-09 00:23:52 +00:00
Sylvestre Ledru
aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

Differential Revision: https://phabricator.services.mozilla.com/D5249

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Francois Marier
1a9a0f0817 Bug 1489590 - Teach the URL classifier about the FastBlock lists. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D5297

--HG--
extra : moz-landing-system : lando
2018-09-07 20:31:18 +00:00
Nicholas Nethercote
ea6e6b7d15 Bug 1488649 - Convert the prefs table from PLDHashTable to mozilla::HashSet. r=glandium
Because it's hot, and mozilla::HashSet is much faster than PLDHashTable.

--HG--
extra : rebase_source : 65efb5c25a01d03201eb31845f627b503efe7c9b
2018-09-07 09:51:22 +10:00
Martin Stransky
eec457b056 Bug 1408360 - Make toplevel window transparent under mozilla.widget.titlebar-theme-round-corners pref, r=jhorak
Some Gtk+ themes use non-rectangular toplevel windows. To fully support
such themes we need to make toplevel window transparent with ARGB visual.
It may cause performance issue so let's put it under a preference
and allow distros to enable it per default theme.

Depends on D4664

Differential Revision: https://phabricator.services.mozilla.com/D4665

--HG--
extra : moz-landing-system : lando
2018-09-06 11:52:46 +00:00
Andrea Marchesini
9290eb7909 Bug 1488165 - Remove security.csp.enable_violation_events pref, r=dveditz 2018-09-06 09:05:10 +02:00
Jonathan Watt
e65c479846 Bug 1368555. Let -webkit-appearance ride the trains in v63. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D6765

--HG--
extra : rebase_source : 5fd575a64823079bc61f8f953bb871a282c6a1b7
2018-08-25 13:19:48 +01:00
Ryan VanderMeulen
d84cc002ea Bug 1493700 - Update brotli to version 1.0.6. r=jfkthame
--HG--
extra : rebase_source : 6668d3279ae9af5db03295b13981645fd4cff909
2018-09-24 11:26:37 -04:00
Kris Maglione
1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Kris Maglione
31cf107646 Bug 1486147: Part 1 - Add JS iterator support to nsIStringEnumerator. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4269

--HG--
extra : rebase_source : 5fe9d4c7717d65e1bc8d45bdd89bcc5384c6d0ee
extra : histedit_source : e8f5606a192f13524996faf2e179d2c2e58c933f%2C725c8f145a1f4d34f84e6818b61ec5b955862e70
2018-08-24 16:21:33 -07:00
Xidorn Quan
9bee3c7fdc Bug 1486325 - Enable webkit-prefixed unknown pseudo-element by default. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D5010

--HG--
extra : moz-landing-system : lando
2018-09-05 11:44:57 +00:00
Boris Chiou
8e384ca9b3 Bug 1487838 - Add a pref for |clip-path:path()|. r=xidorn
Add a preference, layout.css.clip-path-path.enabled, for |clip-path:path()|.

Differential Revision: https://phabricator.services.mozilla.com/D4965

--HG--
extra : moz-landing-system : lando
2018-09-05 04:50:33 +00:00
Miko Mynttinen
4938049810 Bug 1413546 - Fix e10s logic in nsLayoutUtils::AreRetainedDisplayListsEnabled() and set layout.display-list.retain.chrome to true r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D2953

--HG--
extra : moz-landing-system : lando
2018-09-04 14:53:18 +00:00
Kershaw Chang
766fce11a1 Bug 1357676 - Implement batch eviction r=jdm
1. Add network.cookie.QuotaPerHost, which has the default value 150.
2. When the cookies exceed more than 180, evict cookies to 150.
3. The concept of eviction is to sort all cookies by whether the cookie is expired and the cookie's last access time. Then, evict cookies by the given count.
4. Details of evict algorithm:
   4.1 Create a priority queue and push all cookies in it.
   4.2 Use custom comparator to compare the cookie by expiry and last access.
   4.3 Pop 30(180 - 150) cookies from the queue and append them to an output array.

Differential Revision: https://phabricator.services.mozilla.com/D3342

--HG--
extra : moz-landing-system : lando
2018-09-03 14:49:58 +00:00
Ting-Yu Lin
6f4a25f896 Bug 1347048 - Remove AccessibleCaret's selection bar support. r=mats
This UI feature was used by B2G only.

Differential Revision: https://phabricator.services.mozilla.com/D4040

--HG--
extra : moz-landing-system : lando
2018-08-31 13:51:51 +00:00
Narcis Beleuzu
3a8485e6e6 Backed out 6 changesets (bug 1492930) for build bustages on ImageMemoryReporter.cpp. CLOSED TREE
Backed out changeset 9d1ff0d0af47 (bug 1492930)
Backed out changeset bdb1bf2d8062 (bug 1492930)
Backed out changeset 2959314ecf7c (bug 1492930)
Backed out changeset 587e01daa080 (bug 1492930)
Backed out changeset 1a6b422c5a90 (bug 1492930)
Backed out changeset a3b3f4cdc9fa (bug 1492930)
2018-09-25 13:33:17 +03:00
Andrew Osmond
5d483b60ce Bug 1492930 - Part 4. Add ImageMemoryReporter to support extra shared surfaces reporting. r=tnikkel
By delegating responsibility for shared surfaces reporting to imagelib,
we can cross reference the GPU shared surfaces cache with the local
surface cache in a content process (or the main process). This will
allow us to identify entries that are in the GPU cache but not in the
content/main process cache, and aid in debugging memory leaks. This
functionality is pref'd off by default behind image.mem.debug-reporting.

Additionally, we want to report every entry that was mapped into the
compositor process, in the compositor process memory report. This will
give us a sense of how much of our resident memory is consumed by mapped
images in absence of the more detailed cross referencing above.
2018-09-25 06:18:06 -04:00
Ehsan Akhgari
414b60a6ca Bug 1487178 - Ensure that the Firefox configuration is up to date for the Content Blocking project; r=johannh 2018-08-31 10:20:17 +02:00
Xidorn Quan
63a8649721 Bug 1486297 - Add a pref for Pointer Lock API so that user can disable it. r=smaug!
Differential Revision: https://phabricator.services.mozilla.com/D4637

--HG--
extra : moz-landing-system : lando
2018-08-30 22:55:31 +00:00
Narcis Beleuzu
05d91d3e02 Merge inbound to mozilla-central. a=merge 2018-08-30 19:58:52 +03:00
Masayuki Nakano
be86e183fd Bug 1486370 - Change nsAutoCopyListener to a static class r=smaug
nsAutoCopyListener is a singleton class but refcountable and a selection
listener.  nsFrameSelection adds it to only normal Selection when it's on
macOS or it's enabled by the pref.  Additionally, it's always first selection
listener since it's added immediately after Selection instance is created.

So, we can make it a static class, and normal Selection instance should have
a bool to decide whether it should notify nsAutoCopyListener of its changes.
Then, we can save the cost of grabbing it with local RefPtr and the virtual
call.

Additionally, this patch renames nsAutoCopyListener to mozilla::AutoCopyListener
and optimizes constructor of nsFrameSelection (using bool var cache to retrieve
the pref, avoid retrieving the pref on macOS).

Differential Revision: https://phabricator.services.mozilla.com/D4504

--HG--
rename : layout/generic/nsAutoCopyListener.h => layout/generic/AutoCopyListener.h
extra : moz-landing-system : lando
2018-08-30 07:36:23 +00:00
Gijs Kruitbosch
a7895c75ea Bug 1460538, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D4469

--HG--
extra : rebase_source : 8653345c4029df4a9b80b268f1f23b628b158f77
2018-08-29 14:43:37 +01:00
Sebastian Hengst
e54cd05a69 Backed out changeset ecf1c85b657f (bug 1460538) for failing xpcshell test_GMPInstallManager.js and browser-chrome's browser_packaged_as_locales.js. CLOSED TREE 2018-08-30 12:56:14 +03:00
Nicholas Nethercote
fe34f19459 Bug 1486690 - Rename nsMemory::Clone() and remove unnecessary checks after it. r=glandium
The 'x' in the new name makes it clearer that it's infallible.

--HG--
extra : rebase_source : 51fd946c482befe8a8ca5bd88ecc967971f455da
2018-08-28 15:59:19 +10:00
Nicholas Nethercote
ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10:00
Ciure Andrei
d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Ting-Yu Lin
2c847c1eb9 Bug 1485495 - Move column-span preference to StaticPrefList.h. r=dholbert
We can access the bool pref in C++ by writing

  if (StaticPrefs::layout_css_column_span_enabled()) {
     // do something
  }

Differential Revision: https://phabricator.services.mozilla.com/D4020

--HG--
extra : moz-landing-system : lando
2018-08-27 18:38:58 +00:00
Xidorn Quan
7e1e060971 Bug 1424106 - Accept unknown webkit pseudo-element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4186

--HG--
extra : source : 9537cee04b53aa60d3f40a1b9d05ab8f739a92f8
2018-08-24 22:17:37 +10:00
Patrick Walton
b8b76ab4fe Bug 1485538 - Expose WebRender's "show overdraw" debug mode behind a pref. r=jrmuizel 2018-08-10 20:17:01 -07:00
Kearwood "Kip" Gilbert
382df23968 Bug 1466700 - Refactor gfxVROculus.cpp to use gfxVRExternal interface, r=daoshengmu
Tags: #secure-revision

Bug #: 1466700

Differential Revision: https://phabricator.services.mozilla.com/D8177
2018-07-13 17:16:35 -07:00
Narcis Beleuzu
3b0f157728 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-12 00:59:25 +03:00
Randell Jesup
1e918164f2 Bug 1299118: Measure TTI (or TTFI at the moment) in Raptor TP6 r=rwood 2018-10-11 13:23:38 -04:00
Randell Jesup
92bdcfd0ad Bug 1299118: non-spec TimeToFirstInteractive implementation behind a pref r=mstange,bholley 2018-10-11 13:23:28 -04:00
shindli
0f211616dc Backed out 3 changesets (bug 1299118) for ES lint failures
Backed out changeset 14451eb9a2b8 (bug 1299118)
Backed out changeset e5adc30bdf7f (bug 1299118)
Backed out changeset 8f7bb583fbb5 (bug 1299118)
2018-10-11 20:47:58 +03:00
Randell Jesup
94b05e1202 Bug 1299118: Measure TTI (or TTFI at the moment) in Raptor TP6 r=rwood 2018-10-11 13:23:38 -04:00
Randell Jesup
2271cd99ed Bug 1299118: non-spec TimeToFirstInteractive implementation behind a pref r=mstange,bholley 2018-10-11 13:23:28 -04:00
Gijs Kruitbosch
7ccb094a30 Bug 1460538, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D4469

--HG--
extra : rebase_source : da483f0add427a60f9c435b6a4427ea98bab4e92
extra : amend_source : 4a0c50154372dd9172da286ac148cc65dde6f02c
2018-08-28 19:14:54 +01:00
Nicholas Nethercote
fb4191fda8 Bug 1490115 - Add extra tests for comment-only inputs. r=glandium
--HG--
extra : rebase_source : 5ef9accd9c6d7501ff2e54a4a81b3360f0bbc040
2018-09-11 09:41:40 +10:00
Nicholas Nethercote
46c70d27ee Bug 1490115 - Handle unaccompanied low surrogate pairs in the prefs parser. r=glandium
Currently they cause the `String::from_utf16()` call to return an error result,
and then the subsequent `unwrap()` on that result aborts.

--HG--
extra : rebase_source : 6be81d4d1e618444f762a1ba4e93b5ce648dd45b
2018-09-11 09:41:37 +10:00
Nicholas Nethercote
2e13ef79fb Bug 1489744 - Fix a bounds violation crash in the prefs parser. r=glandium
Currently, if a get_char() call returns EOF, the index moves beyond the
buffer's bounds and get_char() cannot be called again without triggering a
panic. As a result, everywhere that encounters an EOF and then does subsequent
parsing ungets the EOF... except there was one place that failed to do that:
the match case for CharKind::Slash in get_token(). This meant that a single '/'
at the end of the input could trigger a bounds violation (but only if it is the
start of a new token).

This EOF-unget requirement is subtle and easy to get wrong, so this patch
eliminates it. get_char() now can be called repeatedly after an EOF, and will
return EOF on each subsequent call. This means that some of the existing
unget_char() calls can be removed. Some others are still necessary to get line
numbers correct in error messages, but the outcome of mishandled cases is now
much less drastic -- an incorrect line number in an error message instead of a
panic.

The patch also clarifies a couple of related comments.

--HG--
extra : rebase_source : 62a3f07bb83b95495b2975724876b619a33b5c9d
2018-09-11 09:36:07 +10:00
Emilio Cobos Álvarez
7f1f4ab7f0 Bug 1425700 - Hook the use counters into StyleSheet parsing. r=heycam
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-08-28 15:58:19 +02:00
Ehsan Akhgari
1022d7475b Bug 1485839 - Remove the obsolete privacy.restrict3rdpartystorage.ui.enabled pref; r=nika 2018-08-28 08:29:33 -04:00
Ehsan Akhgari
2d62042b5c Bug 1486092 - Part 1: Move the browser.contentblocking.enabled pref to StaticPrefs; r=baku 2018-08-27 09:22:01 -04:00
Makoto Kato
7f9a17328d Bug 1155505 - Part 3. Use native Windows Toast backend on Nightly only. r=jaws
For feedback, I would like to turn on native Windows Toast backend on
Nightly only.

Differential Revision: https://phabricator.services.mozilla.com/D3004

--HG--
extra : rebase_source : 342ab889043bfacd495366ebf73e2b4eedd6a1c2
2018-08-09 20:37:08 +09:00
Anny Gakhokidze
edf3cdbd07 Bug 1453153 - Initial removal of moz* APIs in DataTransfer, r=enndeakin,r=nika
In DataTransfer, change mozItemCount, mozTypesAt, mozClearDataAt, mozSetDataAt,
mozGetDataAt APIs to be ChromeOnly.

MozReview-Commit-ID: 9uJ9ncrcBL2
2018-08-22 15:10:31 -04:00
Ryan Hunt
76325b1cff Bug 1485371 - Re-enable tiling for OpenBSD. r=nical
--HG--
extra : rebase_source : 83a8e6533312cf8db9aee9e70dfdbfa21ab13bb0
extra : histedit_source : 6ec64a8cb17d4e4b10a487c5c676d63edbfa9dc4
2018-08-22 09:34:22 -05:00
Noemi Erli
a3eb003ecf Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-001.html
2018-08-22 12:49:02 +03:00
Xidorn Quan
7119449f79 Bug 1484587 - Put the behavior that overflow-wrap: break-word affecting intrinsic size behind a pref and disable it by default. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D3749

--HG--
extra : moz-landing-system : lando
2018-08-22 06:55:13 +00:00
Ciure Andrei
40b18c41b7 Backed out 7 changesets (bug 1429298) for xpcshell failures properties-db.js CLOSED TREE
Backed out changeset 48214a8e1b6b (bug 1429298)
Backed out changeset cc2785ab879e (bug 1429298)
Backed out changeset c217209a3b04 (bug 1429298)
Backed out changeset 196fc7b48b84 (bug 1429298)
Backed out changeset 761e9bb54adb (bug 1429298)
Backed out changeset 0b9ec0d707b5 (bug 1429298)
Backed out changeset 38ad1cc1b0c8 (bug 1429298)

--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string-002.html => testing/web-platform/tests/css/motion/offset-path-string.html
2018-08-22 08:01:49 +03:00
Boris Chiou
ef9ee2f37d Bug 1429298 - Part 7: Tests. r=emilio
In wpt, now we support "offset-path: none | path()", so parsing none or
path function should be correct. Animations which animate "from none"
or "to none" will pass because we could serialize "none", even if we
don't support animations on offset-path.

Depends on D2968

Differential Revision: https://phabricator.services.mozilla.com/D2969

--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-001.html
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-002.html
extra : moz-landing-system : lando
2018-08-22 01:23:14 +00:00
Boris Chiou
471ca0041a Bug 1429298 - Part 1: Define the preference for motion-path. r=emilio
Define the preference. I will enable it only for debug usage and test
coverage in a different patch.

Differential Revision: https://phabricator.services.mozilla.com/D2962

--HG--
extra : moz-landing-system : lando
2018-08-22 01:18:59 +00:00
Boris Chiou
dbe6b4f2db Bug 1429298 - Part 7: Tests. r=emilio
In wpt, now we support "offset-path: none | path()", so parsing none or
path function should be correct. Animations which animate "from none"
or "to none" will pass because we could serialize "none", even if we
don't support animations on offset-path.

Differential Revision: https://phabricator.services.mozilla.com/D2969


--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-001.html
2018-08-21 22:41:46 -07:00
Boris Chiou
a3bac78905 Bug 1429298 - Part 1: Define the preference for motion-path. r=emilio
Define the preference. I will enable it only for debug usage and test
coverage in a different patch.

Differential Revision: https://phabricator.services.mozilla.com/D2962
2018-08-21 22:41:25 -07:00
Jorg K
cd598f0aaa Bug 1484809 - Put class nsRelativeFilePref into its own include file. r=njn
--HG--
extra : rebase_source : c775cdde24c8aa7134a7dd121abaf9233c8e2729
2018-08-21 00:28:00 +03:00
Tanushree Podder
efd8c4f4fb Bug 1357785 - Expose the Visual Viewport API to web content. r=botond, r=nika
--HG--
extra : amend_source : 8e5fe3e3195dd82aef19a4c79df31e2048024c99
2018-08-20 16:28:42 -04:00
Daosheng Mu
8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

Differential Revision: https://phabricator.services.mozilla.com/D2876

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Masayuki Nakano
d70e55af73 Bug 1449564 - part 4: Make users can show Gecko specific editing UIs with new prefs r=m_kato
Even after we disable Gecko specific editing UIs by default, web apps can
enable them with execCommand.  However, until such web apps change their
behavior, users cannot use Gecko specific UIs.  At least for now, we should
make users can enable them by default.

MozReview-Commit-ID: AuAdw4FQ4He

--HG--
extra : rebase_source : a1f88f2928df0d7afb4361c425d75c74872ac9d5
2018-08-16 13:51:36 +09:00
spillner
ae484ea026 Bug 260562 - Remove obsolete accessibility.typeaheadfind.enabletimeout preference. r=kmag
Summary:
Mike DeBoer correctly noted in a comment at https://bugzilla.mozilla.org/show_bug.cgi?id=254592 that enabletimeout is no longer used and should be removed.  I updated the timeout logic to treat a zero or negative value as effectively "no automatic timeout" for the quick-find dialog (otherwise, setting the timeout value to a small or negative value makes the feature unusable).

This is a corollary to the bugfix at https://phabricator.services.mozilla.com/D3404 ; I've split it out into a separate patch to avoid confusing that issue.

Update: this specific issue already had its own bug at https://bugzilla.mozilla.org/show_bug.cgi?id=260562, and another mention at https://bugzilla.mozilla.org/show_bug.cgi?id=265915 .

Reviewers: kmag

Reviewed By: kmag

Bug #: 260562

Differential Revision: https://phabricator.services.mozilla.com/D3504

--HG--
extra : rebase_source : 1c2b73d6af1343d536a2380dee784f8ea2339b61
extra : amend_source : cc00a2398b2c478003e842b4dc9b99bf53af6824
2018-08-19 08:47:57 +03:00
Ehsan Akhgari
e2e95ab324 Bug 1484109 - Part 3: Make nsRelativeFilePref final; r=njn 2018-08-17 10:27:24 -04:00
Ehsan Akhgari
2eb3a8ef76 Bug 1484109 - Part 2: Make nsIRelativeFilePref non-scriptable, since there are no script consumers; r=njn 2018-08-17 10:26:50 -04:00
Ehsan Akhgari
3debcecb46 Bug 1484109 - Part 1: Remove the XPCOM component registration for nsRelativeFilePref; r=njn 2018-08-17 10:26:25 -04:00
Margareta Eliza Balazs
6c198262de Merge inbound to mozilla-central. a=merge 2018-08-17 12:46:14 +03:00
Olli Pettay
9fb8ccf44c Bug 1471947, bug 1471948 - Enable Shadow DOM and Custom Elements in release builds, r=ehsan, emilio 2018-08-17 03:39:02 +03:00
Dorel Luca
fa2c143117 Backed out changeset 9b17b83509fd (bug 1471947) for leaks on mochitest 2018-08-16 19:24:06 +03:00
Xidorn Quan
464ef30ab4 Bug 1475033 part 3 - Add scrollbar-width property. r=heycam
MozReview-Commit-ID: CmCbaZosUrU

--HG--
extra : rebase_source : 85136c729524fdd8b9cdfcbf30e2bb35accd0d4a
2018-08-01 14:13:41 +10:00
Olli Pettay
5f017bc6ae bug 1431255, disable ua widgets, since they break tests when shadow DOM is enabled, r=bustage, CLOSED TREE 2018-08-16 17:04:54 +03:00
Olli Pettay
11ef94c278 Bug 1471947, bug 1471948 - Enable Shadow DOM and Custom Elements in release builds, r=ehsan, emilio
--HG--
extra : rebase_source : 704b18a6795d94d47904abc9889bf98542a6261e
2018-08-16 15:30:54 +03:00
Junior Hsu
4cd0359acf Bug 1280629 - Part 1: Suspend the http channel if the child process is not able to consume on time r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D2745

--HG--
extra : moz-landing-system : lando
2018-08-15 22:35:58 +00:00
Timothy Guan-tin Chien
e1bae5c835 Bug 1431255 - Part I, Add dom.ua_widget.enabled pref and enable for Desktop Nightly only r=smaug
This would allow us to control this feature independently of the Shadow DOM pref.
The feature is only turned on when Shadow DOM is turned on.

MozReview-Commit-ID: 4g6BJigFUZs

--HG--
extra : rebase_source : d9e8ae0105fbe3dc18c9e163c612b9523db4c5b0
2018-07-06 08:46:43 +08:00
Kris Maglione
a881e6bbac Bug 1480244: Part 3b - Fix tests which rely on bad scoping assumptions for frame scripts. r=aswan
With the new loading model for frame scripts, lexical variables defined in a
global frame script are not available to other frame scripts.

Additionally, scripts loaded into a context object by the subscript loader
should not depend on being able to access properties of the message manager as
if they were globals.

MozReview-Commit-ID: 6QEyA1sBVOV

--HG--
extra : rebase_source : d3a7820104645dc356bdf8ea660b970e1f6c20e7
2018-08-03 10:59:12 -07:00
Daniel Varga
9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Andrea Marchesini
d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Daniel Stenberg
315e5ddcc0 bug 1466462 - TRR: disable EDNS Client Subnet by default r=mcmanus
Set the "network.trr.disable-ECS" pref to false to disable.

MozReview-Commit-ID: GE6L8Vpvuu0

Differential Revision: https://phabricator.services.mozilla.com/D2933

--HG--
extra : moz-landing-system : lando
2018-08-13 15:45:15 +00:00
Csoregi Natalia
81732c6774 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-13 18:44:46 +03:00
Daniel Stenberg
11c02fe803 bug 1475781 - revert the doubled DNS cache r=mcmanus
Almost no cache hit improvement was detected.

Differential Revision: https://phabricator.services.mozilla.com/D3189

--HG--
extra : moz-landing-system : lando
2018-08-13 14:41:42 +00:00
Jonathan Kew
150158e0bc Bug 1481031 - Add Noto Serif CJK to android font prefs. r=m_kato 2018-08-13 08:29:08 +01:00
Jean-Yves Avenard
f5fbe2c29b Bug 1480190 - Enable media-capablities extension by default. r=drno,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D3061

--HG--
extra : moz-landing-system : lando
2018-08-11 17:37:08 +00:00
Coroiu Cristina
c82bf65856 Backed out changeset 62e358f53fdd (bug 1480190) for mochitest failures at dom/workers/test/test_navigator.html 2018-08-11 12:53:27 +03:00
Jean-Yves Avenard
6e729aa19e Bug 1480190 - Enable media-capablities extension by default. r=drno,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D3061

--HG--
extra : moz-landing-system : lando
2018-08-11 09:04:25 +00:00
Bogdan Tara
dfe849c923 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-11 06:46:31 +03:00
Bogdan Tara
b6dabcd8c5 Backed out changeset 485fdf8e37e8 (bug 1453153) for clipboard failures on test_findbar.xul CLOSED TREE 2018-08-11 03:21:43 +03:00
Bogdan Tara
2f2b719960 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-11 01:01:18 +03:00
Bogdan Tara
9ea0f46168 Backed out changeset 93aabcabcdf7 (bug 1480190) for test_interfaces.html failures CLOSED TREE 2018-08-10 21:59:00 +03:00
Jean-Yves Avenard
26bb934fc5 Bug 1480190 - Enable media-capablities extension by default. r=drno
Differential Revision: https://phabricator.services.mozilla.com/D3061
2018-08-10 19:02:03 +02:00
Jean-Yves Avenard
f0a2a7c616 Bug 1482197 - P2. Make IsWebMEncoderEnabled usable off the main thread. r=bryce
It can be called on a worker.

Depends on D3054

Differential Revision: https://phabricator.services.mozilla.com/D3055
2018-08-10 19:02:03 +02:00
Anny Gakhokidze
be49493caf Bug 1453153 - Initial removal of moz* APIs in DataTransfer, r=enndeakin,nika
In DataTransfer, change mozItemCount, mozTypesAt, mozClearDataAt, mozSetDataAt,
mozGetDataAt APIs to be ChromeOnly.

MozReview-Commit-ID: 9uJ9ncrcBL2
2018-08-10 11:57:06 -04:00
Jeff Gilbert
8042ec3150 Bug 1482301 - Remove webgl.webgl2-compat-mode. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D3070

--HG--
extra : moz-landing-system : lando
2018-08-10 12:51:22 +00:00
Anny Gakhokidze
b502cdad85 Bug 1479935 - Enable async clipboard readText and writeText APIs by default, r=nika
MozReview-Commit-ID: LpdRgQCnMNN

Differential Revision: https://phabricator.services.mozilla.com/D2858

--HG--
extra : moz-landing-system : lando
2018-08-07 20:39:32 +00:00
Noemi Erli
0273f8788d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-10 00:46:13 +03:00
Noemi Erli
125e35c2c4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-10 00:35:08 +03:00
Valentin Gosu
72e03e0046 Bug 1478732 - Backed out changeset 9de74f5039a4 r=backout a=backout
--HG--
extra : source : ff11750d6c43dbbe420b64da03e6dde9fe3b22bb
extra : amend_source : dd3165605b910ee9882e32fc17ee75796ce8b84a
2018-08-09 18:56:02 +02:00
Masayuki Nakano
a5cfed23c5 Bug 1481153 - part 4: Should stop hacking the result of TSFTextStore::GetTextExt() when Win10 build 17643 only in Nightly or early Beta r=m_kato
We should get feedback from each CJKT testers at least one cycle after Win10
RS5 is released.  Until then, we should not stop hacking GetTextExt() result
in late Beta nor Release builds.
2018-08-07 21:30:52 +09:00
Daniel Varga
31ff8cd9c8 Merge mozilla-central to mozilla inbound. a=merge 2018-08-09 01:10:56 +03:00
Valentin Gosu
1030589ee4 Bug 1478732 - Change nsHostResolver to dispatch one resolver task per native lookup r=bagder
Differential Revision: https://phabricator.services.mozilla.com/D2431

--HG--
extra : moz-landing-system : lando
2018-08-07 07:03:57 +00:00
Xidorn Quan
346661e6fd Bug 1481125 - Put overflow: -moz-scrollbar-* behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2845

--HG--
extra : moz-landing-system : lando
2018-08-07 13:57:45 +00:00
Jean-Yves Avenard
11e8a29e1f Bug 1481176 - P4. Make CanHandleMediaType usable off the main thread. r=bryce
This is done by ensuring that all methods is called are usable off the main thread and creating the required preference accessors.

Differential Revision: https://phabricator.services.mozilla.com/D2790
2018-08-07 19:21:59 +02:00
Jean-Yves Avenard
0c0e01d5f9 Bug 1482243 - Place Screen's MediaCapabilities behind a different pref. r=bzbarsky
Screen's MediaCapabilities extensions aren't fully defined yet, but we don't want this to be blocking the release of the remaining features.
As such, we place those extensions behind a new pref: media.media-capabilities.screen.enabled

Differential Revision: https://phabricator.services.mozilla.com/D3060

--HG--
extra : moz-landing-system : lando
2018-08-09 21:05:55 +00:00
Jonathan Watt
d1601e1442 Bug 1480073 pt 2. Enable the '-webkit-appearance' alias for '-moz-appearance' for EARLY_BETA_OR_EARLIER. r=emilio 2018-08-01 12:01:33 +01:00
Emilio Cobos Álvarez
dc8f531c74 Bug 1480054: Restrict XUL tree pseudos on nightly and early-beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2598

MozReview-Commit-ID: I1dUPuGKkyX
2018-08-06 15:41:24 +02:00
Margareta Eliza Balazs
235bf9e602 Backed out 2 changesets (bug 1480054) for reftest failures in build/tests/reftest/tests/layout/reftests/bugs/664127-1.xul on a CLOSED TREE
Backed out changeset 854bba84bd34 (bug 1480054)
Backed out changeset 37861e92aa13 (bug 1480054)
2018-08-06 14:09:07 +03:00
Emilio Cobos Álvarez
85dc56828a Bug 1480054: Restrict XUL tree pseudos on nightly and early-beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2598

MozReview-Commit-ID: I1dUPuGKkyX
2018-08-06 10:36:49 +02:00
Jonathan Watt
071dc75f10 Bug 1428676 pt 4. Move pref layout.css.webkit-appearance.enabled to StaticPrefList.h. r=emilio 2018-07-12 12:48:20 +01:00
Dorel Luca
e10cc6aac4 Merge mozilla-central to mozilla-inbound
--HG--
extra : rebase_source : 8265ad85fc5376a71af7ed3afe8463b7178286f3
2018-08-04 01:08:25 +03:00
Luca Greco
4984c5ed77 Bug 1474562 - Enable ExtensionStorageIDB on Nightly. r=mixedpuppy
MozReview-Commit-ID: 2YzrVdMSE4q

--HG--
extra : rebase_source : ace9a8762f3299999183480ea7484541e40fffe5
2018-07-26 19:28:19 +02:00
Alex Gaynor
a826b27def Bug 1426100 - disable native event processing in content processes on macOS; r=haik
We originally thought that this would enable us to disconnect from the
windowserver local service (which is a significant sandbox escape risk),
however investigations revealed that that requires changes to WebGL and thus
will be handled separately.

This also corrects an incorrect usage of the (undocumented) APIs for closing
windowserver connections. If CGSSetDenyWindowServerConnections is called while
there are open connections it is a no-op, so it must be called after
disconnecting any open connections.

Differential Revision: https://phabricator.services.mozilla.com/D2478

--HG--
extra : moz-landing-system : lando
2018-08-02 15:18:51 +00:00
Matt Howell
3eedff1868 Bug 1473113 - Defer initializing the MAR index until it's needed. r=rstrong
--HG--
extra : source : 6ea6dde8422f745f10dbc004293d1c1bc96e6b8e
2018-07-11 10:12:08 -07:00
Noemi Erli
048f87627e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 12:03:09 +03:00
Noemi Erli
8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
Ryan Hunt
a2d89c778c Bug 1480139 - Disable tiling on linux due to high crash rate. r=jrmuizel
We're experiencing a high volume of content crashes on linux, most likely due to
free type thread unsafety seen in bug 1477444 and 1479498. This commit disables
tiling to stop the crashes for now while we investigate further.

--HG--
extra : rebase_source : 9becf3d4c5e41eb6a30ed12008ed342663660291
extra : intermediate-source : b9b178105f1bd1d794e53c2fb128bd9e505f8f32
extra : source : d28438c3e7596af6d6e482f3b227c7cb43dbbf26
2018-08-01 11:31:11 -05:00
Chris Pearce
2e3c4bd9af Bug 1478208 - Implement HTMLMediaElement.allowedToPlay. r=alwu,bz
Various web authors have expressed desire to know in advance whether autoplay
will work.

They want this in order to avoid paying the price for downloading media that
won't play. Or they want to take other action such as showing a poster image
instead.

This is of particular interest to Firefox, as we're planning on showing a
prompt to ask the user whether they would like a site to play. If sites want to
determine whether they can autoplay but avoid the prompt showing, they won't be
able to just call play() in Firefox and see whether it works, as that would
likely show the prompt if the user doesn't already have a stored permission.

We've been working out a spec here:
https://github.com/whatwg/html/issues/3617#issuecomment-398613484

This implements what is the consensus to date there;
HTMLMediaElement.allowedToPlay, which returns true when a play() call would not
be blocked with NotAllowedError by autoplay blocking policies.

MozReview-Commit-ID: AkBu0G7uCJ0

--HG--
extra : rebase_source : 3f31db79aa1e570fdd9fc7062d0ddac7c96a8931
2018-07-25 14:25:17 +12:00
Tiberius Oros
246ccc876f Backed out changeset b9b178105f1b (bug 1480139) for background-position-001.xht failures on a CLOSED TREE 2018-08-01 21:53:00 +03:00
Randall Barker
6d045ccecb Bug 1479549 Add a pref to disable double tap zooming in APZ r=botond
MozReview-Commit-ID: HK5RWuI6lIk
2018-08-01 11:25:32 -07:00
Ryan Hunt
1d007f3aa7 Bug 1480139 - Disable tiling on linux due to high crash rate. r=jrmuizel
We're experiencing a high volume of content crashes on linux, most likely due to
free type thread unsafety seen in bug 1477444 and 1479498. This commit disables
tiling to stop the crashes for now while we investigate further.

--HG--
extra : rebase_source : cedd55d2c8b96e298b2a96f84428abaf95dcde80
extra : source : d28438c3e7596af6d6e482f3b227c7cb43dbbf26
2018-08-01 11:31:11 -05:00
Sam Foster
30473eb88f Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : e267187766d221e4f865cb84065ea18231e7c012
2018-07-26 15:36:07 -07:00
alwu
e3159f95dd Bug 1466926 - part2 : add a new preference to control autoplay from background script. r=kmag
MozReview-Commit-ID: K4fX7gumON

--HG--
extra : rebase_source : 480e0052a920d573135358ee1a0fb562ce7e30e1
2018-07-31 09:03:31 -07:00
Andreea Pavel
e3d83161a1 Backed out changeset d69e19bad6c1 (bug 1477106) for eslint failure at builds/worker/checkouts/gecko/browser/components/payments/content/paymentDialogFrameScript.js 2018-08-02 02:11:57 +03:00
Sam Foster
5275a24aca Bug 1477106 - Use a pref to set default checkedness for "Save card to Firefox" and "Save address to Firefox" checkboxes. r=jaws
* Get default checkedness for the card persist checkbox from a new pref: dom.payments.defaults.saveCreditCard
* Get default checkedness for the address persist checkbox from a new pref: dom.payments.defaults.saveAddress
* Remember checked state from card page (only) so it doesnt change back when returning from add/edit address page
* Fix up card form tests to verify behavior in private/not-private windows, pref value, user opt-in for persisting the card
* Fix up address form tests to not conflate private/not-private windows with expected address persisting behaviour

MozReview-Commit-ID: GXMjqStlnlu

--HG--
extra : rebase_source : eb5931bff4ba348503144139d3f7f625e0a4af91
2018-07-26 15:36:07 -07:00
dvarga
09eac64963 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 01:19:44 +03:00
Andrea Marchesini
c0f96019e1 Bug 1430095 - Get rid of network.cookie.prefsMigrated, network.cookie.lifetime.enabled and network.cookie.lifetime.behavior prefs, r=valentin 2018-08-01 14:41:21 +02:00
Andrea Marchesini
5991b3ebdd Bug 1457170 - Get rid of nsICookieService::ACCEPT_FOR_N_DAYS, r=valentin 2018-08-01 14:41:21 +02:00
Francois Marier
9f161ab08f Bug 1461515 - Split tracking annotations from tracking protection. r=dimi
This makes it possible to use different lists for tracking protection
and for the features that rely on tracking annotations.

Differential Revision: https://phabricator.services.mozilla.com/D2484

--HG--
extra : moz-landing-system : lando
2018-08-01 20:45:41 +00:00
Dorel Luca
d0a0ae30d5 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-01 12:51:56 +03:00
Johannes Willbold
cacc747881 Bug 1477072: Enabled media.peerconnection.sdp.rust.enabled in Nightly, r=dminor
Enabled media.peerconnection.sdp.rust.enabled in Nightly
Enabled media.peerconnection.sdp.rust.compare in Nightly

MozReview-Commit-ID: BbfH1dYhRWG

--HG--
extra : rebase_source : c6ab4ef469ae2e5e799c852ebb38c876e6c443d2
2018-07-28 11:52:52 -07:00
Anny Gakhokidze
469c8c4a94 Bug 1461465 - Implement async Clipboard APIs, r=nika,r=enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-31 13:13:02 -04:00
Robert Longson
3116ab5e06 Bug 1479272 - remove svg.marker-improvements.enabled pref r=heycam 2018-07-31 21:45:29 +01:00
Nicholas Nethercote
8c1a2345bc Bug 1479631 - Fix media.memory_caches_combined_limit_kb value on Android. r=drno
It was accidentally changed from 524288 to 32768 on Android by bug 1448222.
This commit changes it back.

--HG--
extra : rebase_source : 9181928dccf0cfcd0f70c1c3840d43c378f38ca4
2018-07-31 10:19:51 +10:00
Cosmin Sabou
bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Coroiu Cristina
38f8ebc675 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-07-31 01:03:29 +03:00
Nathan Froyd
017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Johannes Willbold
0911d849a0 Bug 1476750: Updated preferences controlling Rust SDP Parse behavior, r=dminor,drno
Renamed the pref media.webrtc.rsdparsa_enabled to media.peerconnection.sdp.rust.compare
Added the pref media.peerconnection.sdp.rust.enabled
Added both to all.js

media.peerconnection.sdp.rust.compare: Controls whether the parsing result comparer for sipcc and rsdparsa runs or not.
media.peerconnection.sdp.rust.enabled: Controls whether the rsdparsa runs in parallel to the sipcc parser.

MozReview-Commit-ID: Ac5P7T2NBYD

--HG--
extra : rebase_source : afd60243ccba27965bea193bbe29d91bf7bf2644
2018-07-24 12:36:23 -07:00
Andrea Marchesini
c8f7722310 Bug 1479405 - Remove comments related to pref network.cookie.lifetimePolicy == 1-dontUse, r=valentin 2018-07-30 14:16:21 +02:00
Tarek Ziadé
22f99a12a7 Bug 1468550 - Track webextension activity - r=kmag
Adds a performance counter in ParentAPIManager to track the
number and duration of API calls by webextensions.

MozReview-Commit-ID: PTpaSCkE6A

--HG--
extra : rebase_source : 21c6c7f2e38c8808771fe4fea90d2750196202bd
2018-07-27 19:26:12 +02:00
Coroiu Cristina
27148b0bc9 Backed out changeset 9fee865dcbf5 (bug 1468550) for xpcshell failures at toolkit/components/extensions/test/xpcshell/test_ext_performance_counters.js on a CLOSED TREE 2018-07-27 19:45:56 +03:00
Tarek Ziadé
13db3cdb42 Bug 1468550 - Track webextension activity - r=kmag
Adds a performance counter in ParentAPIManager to track the
number and duration of API calls by webextensions.

MozReview-Commit-ID: PTpaSCkE6A

--HG--
extra : rebase_source : e9a61cf0cf755db96f1fd0dacbc2744fe19fe08e
2018-07-27 14:11:54 +02:00
Ehsan Akhgari
56cf43358e Bug 1478428 - Move the network.cookie.cookieBehavior pref to StaticPrefList.h; r=baku 2018-07-25 15:02:31 -04:00
Kris Maglione
f01e35b885 Bug 1477904: Correctly handle static var caches with changed default values. r=njn
MozReview-Commit-ID: H2ImQrmrtAV

--HG--
extra : rebase_source : bc1c43aba3d19b48e9ee3fc3d477138404009d10
2018-07-23 22:50:03 -07:00
Brian Hackett
8f246a4b12 Bug 1465477 Part 1 - Add menu items and prefs for recording/replaying tabs, r=markh.
--HG--
extra : rebase_source : 23307266b2df128845df3ee9972fab240754019d
2018-07-24 21:32:16 +00:00
Narcis Beleuzu
80c1cde899 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-25 01:22:42 +03:00
Nathan Froyd
695cb9d23b Bug 1477081 - remove TARGET_CPU use from moz.build files; r=ted.mielczarek
TARGET_CPU is not canonicalized, whereas CPU_ARCH is, so we should be
using CPU_ARCH to get consistent values everywhere.
2018-07-24 16:08:55 -04:00
Nathan Froyd
5158597854 Bug 1477048 - part 1 - remove '86' in CONFIG['OS_TEST'] stanzas from moz.build files; r=gps
The current code is somewhat non-obvious to a first-time reader, and
OS_TEST is a bizarre thing anyway, since it's actually the name of the
CPU we're running on.  We'd do well to minimize the use of OS_TEST.

Note that the complete nuking of the xptcall/md/unix/moz.build lines are
because we don't support OS X/x86 anymore.
2018-07-24 16:08:56 -04:00
Gurzau Raul
f2e1e857f1 Merge inbound to mozilla-central. a=merge 2018-07-24 12:49:23 +03:00
Kris Maglione
d56573ecd5 Bug 1475836: Clear cached callback pref when deleting branch. r=njn
MozReview-Commit-ID: C60kGkoFBL8

--HG--
extra : source : 3b9846062755b05de6729a84aa2b0acf6ddfd0bc
2018-07-20 11:57:37 -07:00
Kris Maglione
4ef55072b9 Bug 1477254: Assert that varcache prefs match pref values at content process startup. r=njn
In order to avoid the overhead of doing a full pref lookup for every static
var cache at content process startup, we currently assume that the default
value of any static varcache pref will always match the default value of its
database entry (as long as the pref isn't locked). This lets us only perform
lookups for preferences which have a user value, or are locked.

If the default values of those preferences are changed in a bundled preference
file, though, the varcache value will be correct in the parent process, but
not in child processes. Since this is an easy mistake to make, we should
assert that it doesn't happen.

Note: This change only affects applications which use e10s. Applications like
Thunderbird can still override default values of any static pref with
impunity. Repacks and distributors can only do so by changing user values or
locking the preference after the change (which is the standard practice for
enterprise deployments).

MozReview-Commit-ID: JMHQBrp9HN

--HG--
extra : source : 1b389b00030ed38cdb3543aa5d1a67795be47565
extra : amend_source : 16f2dccf40664db9daa42a6edaabb933acbc6204
2018-07-23 17:32:54 -07:00
shindli
e0391b2197 Backed out 2 changesets (bug 1477254, bug 1475836) for bustages in builds/worker/workspace/build/src/modules/libpref/Preferences.cpp:4791:1 on a CLOSED TREE
Backed out changeset 1b389b00030e (bug 1477254)
Backed out changeset 3b9846062755 (bug 1475836)
2018-07-24 03:52:40 +03:00
Kris Maglione
e6eb6b8ea2 Bug 1477254: Assert that varcache prefs match pref values at content process startup. r=njn
In order to avoid the overhead of doing a full pref lookup for every static
var cache at content process startup, we currently assume that the default
value of any static varcache pref will always match the default value of its
database entry (as long as the pref isn't locked). This lets us only perform
lookups for preferences which have a user value, or are locked.

If the default values of those preferences are changed in a bundled preference
file, though, the varcache value will be correct in the parent process, but
not in child processes. Since this is an easy mistake to make, we should
assert that it doesn't happen.

Note: This change only affects applications which use e10s. Applications like
Thunderbird can still override default values of any static pref with
impunity. Repacks and distributors can only do so by changing user values or
locking the preference after the change (which is the standard practice for
enterprise deployments).

MozReview-Commit-ID: JMHQBrp9HN

--HG--
extra : rebase_source : 2f51295def52cbca316227f202158cb22656441a
2018-07-23 17:32:54 -07:00
Kris Maglione
bfc9a0bdfa Bug 1475836: Clear cached callback pref when deleting branch. r=njn
MozReview-Commit-ID: C60kGkoFBL8

--HG--
extra : rebase_source : 3c10097afb406750fe1c2f7410372f3dea4ce52a
2018-07-20 11:57:37 -07:00
Liang-Heng Chen
a1785d29f1 Bug 1474280 - Part 1: Cancel timed-out trackers; r=mayhemer 2018-07-23 05:28:00 +03:00
Brindusan Cristian
dcbbf37b84 Backed out changeset 7b42110e827b (bug 1461465) for android mochitest failures on test_ext_async_clipboard.html. CLOSED TREE 2018-07-23 22:11:26 +03:00
Coroiu Cristina
220232e2f4 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-07-24 00:45:40 +03:00
Tim Nguyen
cb6d2f84ed Bug 1477775 - Remove extensions.webextensions.themes.enabled preference. r=jaws
MozReview-Commit-ID: 2dnFhMGRLbG

--HG--
extra : rebase_source : 72e92fbcce1d15f7fd800241b7db9bc7224f1d31
2018-07-23 19:20:30 +01:00
Cosmin Sabou
d160ac574a Merge mozilla-inbound to mozilla-central. a=merge 2018-07-23 18:48:54 +03:00
Andrea Marchesini
04bf64da6a Bug 1470111 - Enable Clear-Site-Data header by default, r=ckerschb 2018-07-23 14:04:24 +02:00
Cosmin Sabou
51ed9f0129 Backed out changeset d0cb9041aa08 (bug 1477553) for browser chrome mochitest failures on /browser_parsable_css.js. 2018-07-23 13:17:09 +03:00
Emilio Cobos Álvarez
6eb98a1602 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 10:33:32 +02:00
Valentin Gosu
7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

Differential Revision: https://phabricator.services.mozilla.com/D2239

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +00:00
Anny Gakhokidze
05520e664b Bug 1461465 - Implement async Clipboard APIs, r=nika,enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-23 13:41:07 -04:00
Cosmin Sabou
3144e04a98 Backed out changeset 86bce8df5152 (bug 1461465) for build bustages on dom/Clipboard.h. CLOSED TREE 2018-07-23 19:16:37 +03:00
Anny Gakhokidze
2e0358b999 Bug 1461465 - Part 1: Implement async Clipboard APIs, r=nika,enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-23 11:59:13 -04:00
Cosmin Sabou
c42ea64d0b Merge mozilla-central to mozilla-inbound. a=merge
--HG--
rename : devtools/client/inspector/fonts/test/browser_fontinspector.html => devtools/client/inspector/fonts/test/doc_browser_fontinspector.html
extra : rebase_source : 176b90278222fa0e5334b71bd898396651e061f7
2018-07-23 18:55:14 +03:00
Jean-Yves Avenard
c219e50b81 Bug 1476975 - P1. Make media.av1.enabled pref public. r=dminor
Makes it easier to toggle for tests.

--HG--
extra : rebase_source : 4e2090178e6b4da8ae495c50d43f26f26ed73449
2018-07-20 10:39:01 +02:00
Emilio Cobos Álvarez
0c01140e18 Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 17:27:17 +02:00
Cosmin Sabou
39220f357c Backed out 2 changesets (bug 1477553) for reftest failures on xulscroll.html.
Backed out changeset a5bebad6bb23 (bug 1477553)
Backed out changeset 8d4b97056365 (bug 1477553)
2018-07-23 18:03:10 +03:00
Emilio Cobos Álvarez
e8373c682f Bug 1477553: Hide display: -moz-box|-moz-inline-box from content on Nightly and early beta. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2288

MozReview-Commit-ID: F9BeAneKY6e
2018-07-23 15:31:30 +02:00
Tom Schuster
d385a93dfb Bug 1477477 - Add preference for autoplaying muted media. r=cpearce
--HG--
extra : rebase_source : 61589dbd15331d48527c3513e832c6d9e0117941
2018-07-22 15:21:48 +02:00
Noemi Erli
76fe049448 Backed out 3 changesets (bug 1476975) for mochitest failures on test_can_play_type_webm.html
Backed out changeset 91585d095420 (bug 1476975)
Backed out changeset 798f4894ffd5 (bug 1476975)
Backed out changeset b5377ceef34f (bug 1476975)
2018-07-20 21:27:01 +03:00
Jean-Yves Avenard
b73b5533d3 Bug 1476975 - P1. Make media.av1.enabled pref public. r=dminor
Makes it easier to toggle for tests.
2018-07-20 19:04:46 +02:00
Nils Ohlmeier [:drno]
ba74e5e446 Bug 1477253: Turn off AV1. r=jya 2018-07-20 19:04:46 +02:00
Tiberius Oros
5955cda3e1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-20 13:00:01 +03:00
Tiberius Oros
10e6320abc Merge inbound to mozilla-central. a=merge 2018-07-20 12:56:59 +03:00
Andrea Marchesini
a71f17276e Bug 1472661 - Enable and ship CSP Policy violation events, r=ckerschb 2018-07-20 10:10:57 +02:00
Chris Pearce
33cfb93398 Bug 1476853 - Don't block WebAudio autoplay by default. r=padenot
Pending figuring out how we want to block autoplay of WebAudio content, we
should just not block it by default for the initial release of block autoplay,
and follow up once we've figured out how to not break the web.

MozReview-Commit-ID: ClfdrHcugLs

--HG--
extra : rebase_source : 54f61b0765f1d0ed9c754c90da9c2809a7de8676
2018-07-16 16:08:49 +12:00
Alex Chronopoulos
cf8c19c806 Bug 1152401 - Create pref to enable enumeration of output devices. r=jib
MozReview-Commit-ID: G1oB6hlBcsl

--HG--
extra : rebase_source : f966c58496394947094ca66de0079a79b33a745d
2018-07-16 11:30:46 +02:00
Nicholas Nethercote
fc1f4bb4ae Bug 1476820 - Convert some VarCache prefs in dom/security/ to use StaticPrefs. r=ckerschb
Specifically:
- "security.csp.enable"
- "security.csp.experimentalEnabled"
- "security.csp.enableStrictDynamic"
- "security.csp.reporting.script-sample.max-length"
- "security.csp.enable_violation_events"

MozReview-Commit-ID: G1ie4ut9QaK

--HG--
extra : rebase_source : d6b5a0e79eb7046a13a8b4fe957c82c11831c86c
2018-07-19 10:43:29 +10:00
Nicholas Nethercote
2162d78097 Bug 1476820 - Re-alphabetize the sections in StaticPrefList.h. r=glandium
MozReview-Commit-ID: 3qPddiQY18N

--HG--
extra : rebase_source : f1a9e7e76a2393c6096d7fe4f792a07fa52fe687
2018-07-19 09:44:22 +10:00
Kartikaya Gupta
e750c8c1b4 Bug 1475637 - Add a mechanism for dumping an interleaved display list. r=jrmuizel
The prefs, when enabled, will dump the gecko DL items followed by the
WR DL items that were generated from that gecko item. This allows us to
easily go from a DOM element with known id/class attributes to e.g. an
ImageKey of an image that was generated for that element.

Also, this logging can be enabled in CI builds just like gecko display-list
dumping, instead of the ifdef that we previously had in WebRenderLayerManager.

MozReview-Commit-ID: Eeo4iO62YY1

--HG--
extra : rebase_source : b4a348b2e8bced976489257b966f70b29c56df25
2018-07-19 15:30:30 -04:00
Margareta Eliza Balazs
0cf58ddcab Backed out 9 changesets (bug 1152401) for android gv-junit failures org.mozilla.geckoview.test.PermissionDelegateTest.media on a CLOSED TREE
Backed out changeset 987f2e0b2cb1 (bug 1152401)
Backed out changeset e45630a7c7b1 (bug 1152401)
Backed out changeset 95661c6cd914 (bug 1152401)
Backed out changeset d68ab111809f (bug 1152401)
Backed out changeset 10b039210911 (bug 1152401)
Backed out changeset aebabaa96ad3 (bug 1152401)
Backed out changeset 93457990e40f (bug 1152401)
Backed out changeset 1630f67ac197 (bug 1152401)
Backed out changeset aef64bf5b024 (bug 1152401)
2018-07-19 13:35:58 +03:00
Gurzau Raul
636e7285e3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-19 12:57:55 +03:00
Gurzau Raul
8a871a6c46 Merge inbound to mozilla-central. a=merge 2018-07-19 12:54:18 +03:00
Xidorn Quan
34c9dd8f3f Bug 1473180 part 3 - Use the new algorithm for setting property. r=emilio
MozReview-Commit-ID: HQsVwWAGPBL

--HG--
extra : rebase_source : 7280d1a0278e698ebc2fb664874aea53a19a3d3f
extra : source : 08a40cf9746a83fceb124dd148d02ccb0d2e4864
2018-07-19 10:11:04 +10:00
Alex Chronopoulos
fb5a69fe6f Bug 1152401 - Create pref to enable enumeration of output devices. r=jib
MozReview-Commit-ID: G1oB6hlBcsl

--HG--
extra : rebase_source : f966c58496394947094ca66de0079a79b33a745d
2018-07-16 11:30:46 +02:00
Cosmin Sabou
88199de427 Merge mozilla-inbound to mozilla-central. a=merge 2018-07-18 20:19:59 +03:00
Ryan Hunt
7bc84671ff Bug 1471704 - Enable tiling on Linux. r=nical
MozReview-Commit-ID: JzqdK5abvSC

--HG--
extra : source : ab6068778e3011979b0d92c2c3551d3020b1268e
2018-06-27 13:07:21 -05:00
Tiberius Oros
d6492ca47e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-18 00:59:21 +03:00
Tiberius Oros
d701ae940f Merge inbound to mozilla-central. a=merge 2018-07-18 00:55:33 +03:00
Andreea Pavel
eb8aaacd2d Backed out 3 changesets (bug 1471704) for failing css/css-transforms/transform3d-preserve3d-013.html on a CLOSED TREE
Backed out changeset e4d9e6cdd630 (bug 1471704)
Backed out changeset 0bd6762c91fb (bug 1471704)
Backed out changeset 065a16bd6b0a (bug 1471704)
2018-07-17 20:10:01 +03:00
Brian Birtles
8ab6ee61ba Bug 1471814 - Add a preference for {Document,Element}.getAnimations(); r=bz,hiro
This is probably the last thing we will ship since it needs the most spec work.

MozReview-Commit-ID: LLmDBLCsCBJ

--HG--
extra : rebase_source : c06752c9201a9ede87e1ac200ab12577bf784ce6
2018-07-14 09:23:03 +09:00
Brian Birtles
382fd2fe39 Bug 1471814 - Add a preference for animation composite modes; r=bz,hiro
This feature should not be shipped until the various definitions of addition for
each additive property are properly specified.

Unlike other patches in this series, compositing is not frequently used
internally (e.g. by DevTools etc.) so there is no need to enable this by default
for system code.

Also, it turns out we have inadvertently been shipping part of this feature for
some time now. The next patch in this series will add tests for that case and
disable that part of the feature (a suitable intent to unship will follow). This
patch merely adapts and extends the existing tests without affecting the surface
area covered by the combination of the newly-added pref and the existing
dom.animations-api.core.enabled pref.

MozReview-Commit-ID: Htr6mlyCBav

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_compositing.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_compositing.html
extra : rebase_source : 7715a25e59568eb122ba3f7dbd2c2b2ffdd19954
2018-07-14 09:23:03 +09:00
Brian Birtles
fc657410ff Bug 1471814 - Add a preference for implicit keyframes; r=bz,hiro
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.

We intend to ship this soon but this preference acts as a safeguard in case we
discover we need to disable it.

This feature is very convenient and commonly used so this patch ensures it is
always enabled for system content.

MozReview-Commit-ID: BHTsuS2xO61

--HG--
rename : dom/animation/test/mozilla/file_disable_animations_api_core.html => dom/animation/test/mozilla/file_disable_animations_api_implicit_keyframes.html
rename : dom/animation/test/mozilla/test_disable_animations_api_core.html => dom/animation/test/mozilla/test_disable_animations_api_implicit_keyframes.html
extra : rebase_source : 04fd93dd26a4765c14b0b22febdb0311b650ea59
2018-07-14 09:23:03 +09:00
Brian Birtles
5d13151cb9 Bug 1471814 - Add a preference for Web Animations timelines; r=bz,hiro
We don't intend to ship this in the near future until the integration with
AnimationWorklet is clear (although we might ship a read-only version).

That said, we use this feature extensively internally (e.g. in DevTools etc.) so
we enable this feature for system callers.

MozReview-Commit-ID: AhB7ZmU1Xzw

--HG--
extra : rebase_source : 630d7dc56b44a9261bb34aa5417cb9b7050efba4
2018-07-14 09:23:03 +09:00
Ryan Hunt
53a8f253d1 Bug 1471704 - Enable tiling on Linux. r=nical
MozReview-Commit-ID: JzqdK5abvSC

--HG--
extra : source : bd55fef362819acd6d29ee56f540dc5e8ea58749
2018-06-27 13:07:21 -05:00
Ehsan Akhgari
16d186f4ec Bug 1475697 - Part 3: Update the security UI when blocking 3rd party cookies from trackers; r=baku 2018-07-17 06:12:00 +03:00
Andrea Marchesini
375af7205f Bug 1476190 - Clear-Site-Data enabled in nightly, r=me 2018-07-17 11:12:13 +02:00
Kris Maglione
8d585408dc Bug 1473631: Part 0b - Add helper for registering instance methods as pref callbacks. r=njn
I also tried to avoid this change but, again, given the number of times I was
repeating the same pattern of defining a static method just to forward a
callback to an instance method, decided it was probably necessary. Without an
easy way to do this, people are more likely to register observers rather than
callbacks, for which we'll wind up paying a continued memory and performance
penalty.

This patch adds a helper which creates a type-safe preference callback
function which forwards calls to an instance method on its closure object.

The implementation is somewhat complicated, mainly due to the constraint that
unregistering a callback requires passing the exact same function pointer that
was used to register it. The patch achieves this by creating the callback
function as a template, with the method pointer as a template parameter. As
long as the Register and Unregister calls happen in the same translation unit,
the same template instance is guaranteed to be used for both.

The main difficulty is that, until C++ 17, there's no way match a value as a
template parameter unless you know its complete type, or can at least compute
its complete type based on earlier template parameters. That means that we
need a macro to extract the type of the method, and construct the template
with the full set of explicit parameters.

MozReview-Commit-ID: 10N3R2SRtPc

--HG--
extra : rebase_source : 7d0a8ddeb77e01d4a6f421459514e93bc0875598
2018-07-13 18:54:11 -07:00
Kris Maglione
0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
Kris Maglione
a2be039491 Bug 1473634: Part 1 - Add preference callback variant which matches multiple prefs. r=njn
Preference callbacks consume a non-trivial amount of memory, which adds up
fast given the number of callbacks we register.

Many of our consumers, however, register a large number of callbacks with the
same function and closure object, but different preference names or prefixes.
Since our callback matching is nothing more complicated than iteration over
all of our registered callbacks, there's nothing that prevents us from
combining all of these into a single callback, with an array of preferences
rather than a single string.

And since we already allocate an extra 8 bytes for each callback object, we
can add a variant tag without increasing our allocation size.

MozReview-Commit-ID: I497lWfMUp3

--HG--
extra : rebase_source : bac374d9a590c325728551d1669ebc6ef8ca3884
2018-07-04 19:06:00 -07:00
Polly Shaw
226a5beff6 Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: 4xFQz3tOLEx

--HG--
extra : rebase_source : dfd5c588406a8b0d92f91cc8a0038ca722b7140a
2018-06-07 23:07:28 +01:00
Kris Maglione
041ceee442 Bug 1471025: Part 8 - Add tests for shared memory preferences. r=njn
MozReview-Commit-ID: 8452JoTBHCU

--HG--
extra : intermediate-source : 200bec7e766a7937e71a4805083fb71e16c5e111
extra : absorb_source : 6d765b55cc120d8cb4aa842a4e1a3a1b33cfe2ba
extra : source : 398ccedc20dc1c3f29332dd5a4791b9ab96eb547
extra : histedit_source : f86dc1d1fdc4341799157ca8051fa0fd3dd3b975
2018-07-03 20:17:15 -07:00
Kris Maglione
9b42ce0a94 Bug 1471025: Part 7c - Clear the dynamic hashtable in the parent process after snapshotting. r=njn
The preference storage in the shared memory snapshot is much more compact than
the dynamic hashtable, and is already mapped in memory, so there's no need to
keep the full hashtable in memory in the parent process after the snapshot is
created.

This patch empties the hashtable and the name string arena after the snapshot.
It also removes the accounting for preferences which have changed after init,
since those are, by definition, exactly the set of entries in the dynamic
hashtable.

MozReview-Commit-ID: L6VGq2z4foH

--HG--
extra : intermediate-source : 6c72dc1bff88e81f6c754b0971a44b9592d17ee1
extra : absorb_source : 321a2ac3a2d26bbe089c2183e25fccc85d8689f3
extra : source : 599895de063ef005dbd34847db9ee555410a878f
extra : histedit_source : 5905f462ea3d1c935addbe847e53a7d8589f6f38
2018-07-02 22:48:40 -07:00
Kris Maglione
f2f08faf67 Bug 1471025: Part 7b - Don't load preference files in the content process. r=njn
With the parent sending a snapshot of its preference state at content process
startup, we're guaranteed to have the full set of built-in preferences in the
shared map at initialization time, so there's no need to load them again.

This also applies to static preference default values, so we skip setting
those, as well.

However, we do need to make sure that we update static preference cache
entries whose default values don't match the value in the shared map, since
they may have been changed by user preference files. In order to deal with
that, we iterate over all preferences in the map, and dispatch callbacks for
any that have user values.

MozReview-Commit-ID: DlRUbg7Qor3

--HG--
extra : intermediate-source : 7f4cc96fae1212cb2220770ac7311b9cc51af744
extra : absorb_source : 7c71a5994c26c2a1e34b291947a49ac5b3d633cb
extra : source : dc7ec17179d1961d91b897cec9f409786363ec9e
extra : histedit_source : f7c7a935e72af65446c2abc502744a066a6e2ae5%2C5cd3235724af3e5f22b772de171cea735ec4c047
2018-07-07 12:45:57 -07:00
Kris Maglione
ec11171950 Bug 1471025: Part 7a - Look up preferences from both dynamic and shared preference tables. r=njn
This patch changes our preference look-up behavior to first check the dynamic
hashtable, and then fall back to the shared map.

In order for this to work, we need to make several other changes as well:

- Attempts to modify a preference that only exists in the shared table
  requires that we copy it to the dynamic table, and change the value of the
  new entry.

- Attempts to clear a user preference with no default value, but which also
  exists in the shared map, requires that we keep an entry in the dynamic
  table to mask the shared entry. To make this work, we change the type of
  these entries to None, and ignore them during look-ups and iteration.

- Iteration needs to take both hashtables into consideration. The
  serialization iterator for changed preferences only needs to care about
  dynamic values, so it remains unchanged. Most of the others need to use
  PrefsIter() instead.

MozReview-Commit-ID: 9PWmSZxoC9Z

--HG--
extra : intermediate-source : b4f9178f132de2b5f7064df9a9e1b489ea6576c3
extra : absorb_source : 57fd90ea8195adff9d314b813e94dc643fd085e4
extra : source : 5051f15fc2005667cfe76ccae0afb1fb0657c103
extra : histedit_source : 2ebf0e90a5e1b65795b20e9269def7cbbf2d1f11
2018-07-02 22:52:53 -07:00
Kris Maglione
dd3de9e6b6 Bug 1471025: Part 6 - Optimize preference lookups while dispatching callbacks. r=njn
Since lookups in the snapshotted hashtable are currently O(log n) rather than
O(1), they're expected to be slightly more expensive than the previous
purely-dynamic lookups.

In general, I expect this not to be a major issue. The main concern is pref
cache lookups while initializing the database. Initialization in the parent
process will still always use only a dynamic hashtable, so the performance
characteristics there won't change.

In the child process, though, we'll still need to notify observers of
preferences in the snapshot when they have user values, which could require
any number of lookups at startup (though in practice probably will not).

This patch solves that problem by caching the wrapper for the current known
preference value when dispatching callbacks, and optimizing lookups for that
value when it is present.

MozReview-Commit-ID: 2CAn0rM0bE9

--HG--
extra : intermediate-source : 8eff817d2f7e07409269899c048a9091220dec07
extra : absorb_source : 2609b4d9d1d994e19f884de1d1fba38347d35729
extra : source : faef4df47b2089592df7637f5b8f4ae193e98046
extra : histedit_source : b8a1e41ac70ad3eea354c375fb5f6813c0284a0d
2018-07-07 12:47:34 -07:00
Kris Maglione
667653bbb3 Bug 1471025: Part 5 - Add a range iterator helper for iterating both static and dynamic preferences. r=njn
For memory efficiency in content processes, we need to be able to store
changed preferences in a separate dynamic hashtable when their values don't
match the snapshot values.

That makes iteration over the full set of preferences somewhat more
complicated, since not only do we need to iterate over two tables, but we also
need to ignore preferences in the snapshot table if they also exist in the
dynamic hashtable.

This patch solves that problem by adding an iterator helper which iterates
over values in both tables, and skips values in the static table if they also
exist in the dynamic table.

In order to support completely deleting preferences that exist in the base
table, it also ignores all dynamic entries with the None type, so that they
can completely mask deleted base table values.

MozReview-Commit-ID: LCIwyPJMByj

--HG--
extra : intermediate-source : f9362cf1add47c2f62529e42764ed6088d274170
extra : absorb_source : fdaf890e85af43271cffd2371cf6fbf408c6cc50
extra : source : d344247b870668f53fa645e72bda4bb4309346c8
extra : histedit_source : 6cd565727eff617eeba386b563477ce4d4bfbd0a
2018-07-02 18:17:48 -07:00
Kris Maglione
48cfff2489 Bug 1471025: Part 4 - Add a wrapper class that can access either static or dynamic prefs. r=njn
The in-memory format of shared-memory preferences is significantly different
from the format used by dynamic preferences, which means that we need
different classes to access their properties.

Virtual classes would be a potential solution to this problem, but I don't
think the performance characteristics would be acceptable for preferences
code. And since the wrapper classes used for static prefs are temporary, they
would add the additional snag of figuring out how to keep a valid pointer
alive.

So, instead, this patch adds a wrapper class that can access either type of
preference, based on known type flags in a Variant. It also moves some of the
logic for deciding which preference value to return to the wrapper, so that it
doesn't need to be duplicated for each representation.

MozReview-Commit-ID: LameIIbYcD3

--HG--
extra : intermediate-source : ce379eaab17905f39f1665c3e40f683ebd3f8824
extra : absorb_source : eb5ed3380613e070eff5f9c9501e2640a6d398f9
extra : source : 83d98ea5ebaccded8a20929c0f3316e5618f1f76
extra : histedit_source : 634d033608f72294f6fc34d4449fe0f003758c74
2018-07-01 23:23:48 -07:00
Kris Maglione
d7bd212b40 Bug 1471025: Part 3a - Pass shared preference map to (non-Android) content processes at startup. r=jld,njn
This adds an additional file descriptor to the set sent at content process
startup, for the read-only preference map that we share between all content
processes. This forms the base set of preferences. The other preferences FD
contains changes that the content process will need to apply on top of the
snapshot.

MozReview-Commit-ID: 6hc0HIxFmHg

--HG--
extra : intermediate-source : 46a6f9d0773ba2d756d8801cee79bfa994165d44
extra : absorb_source : a725a095946946797fd4f3abe6461e810b15d899
extra : source : e3bbc87b71af2f2ce1fa8bdf2cf26857c071ba5e
extra : histedit_source : 958212e804df7f9e1be6af182e73edc956b9a576
2018-07-02 15:40:38 -07:00
Kris Maglione
82bc4d713f Bug 1471025: Part 2 - Add a helper class creating and accessing shared preference map snapshots. r=njn,erahm
This is based on the SharedStringMap that's currently used for shared memory
string bundles.

When the parent process is ready to launch its first content process, it
creates a snapshot of the current state of the preference database, maps that
as read-only, and shares it with each content process. Look-ups in the
snapshotted map are done entirely using data in the shared memory region. It
doesn't require any additional per-process state data.

MozReview-Commit-ID: BdTUhak7dmS

--HG--
extra : intermediate-source : 434106f1b75e3ba900912f261bd22a1b7f5c931d
extra : absorb_source : 647ad37590448ad3c1eb8eb512bf671f262fa96e
extra : source : 68bb03c63b3cee1d47cbddfd3abf919f5783c04b
extra : histedit_source : 2228a9f8395929f5072a3c5ebda6ae3221e4a62d
2018-07-01 18:28:31 -07:00
Kris Maglione
9b5cf7e9da Bug 1471025: Part 1 - Store preference access counts in a separate hashtable. r=njn
Once the majority of preferences are stored in a read-only shared map, it
won't be possible to modify the access counts in their entries. Which means we
need a separate map for the access counts.

Fortunately, this code is only active in debug builds, so it shouldn't affect
release users. And the net impact on memory usage of this patchset will still
be decidedly downward.

MozReview-Commit-ID: EuLXlMQJP1M

--HG--
extra : intermediate-source : c490838c8329f6b0c21fa57ef078c44bf7a9ba8d
extra : absorb_source : 37a0f7a5fecba6c28bd6ce30644543c6d60ac823
extra : source : 4a8fbb472c91f13554cac3d0ea638cf9f368ff11
extra : histedit_source : 0e5a5f1cded97bcc959be15aa7194c017fd7efcc%2Cc0ae2011b9b40e6445ee366303f8ec4bb10cc87b
2018-07-02 23:33:28 -07:00
Brindusan Cristian
fe91a8922e Backed out 13 changesets (bug 1471025) for reftest failures on variation-format-hint-1a.html; bc failures performance/browser_preferences_usage.js; wpt failures on format-specifiers-variations.html. CLOSED TREE
Backed out changeset 6b672d70f335 (bug 1471025)
Backed out changeset 200bec7e766a (bug 1471025)
Backed out changeset 6c72dc1bff88 (bug 1471025)
Backed out changeset 7f4cc96fae12 (bug 1471025)
Backed out changeset b4f9178f132d (bug 1471025)
Backed out changeset 8eff817d2f7e (bug 1471025)
Backed out changeset f9362cf1add4 (bug 1471025)
Backed out changeset ce379eaab179 (bug 1471025)
Backed out changeset 7c03b7dd00e9 (bug 1471025)
Backed out changeset ff41551f5ff1 (bug 1471025)
Backed out changeset 46a6f9d0773b (bug 1471025)
Backed out changeset 434106f1b75e (bug 1471025)
Backed out changeset c490838c8329 (bug 1471025)
2018-07-14 01:16:06 +03:00
Kris Maglione
96d75a387b Bug 1471025: Part 8 - Add tests for shared memory preferences. r=njn
MozReview-Commit-ID: 8452JoTBHCU

--HG--
extra : source : 398ccedc20dc1c3f29332dd5a4791b9ab96eb547
extra : histedit_source : 99d4dc8fa03488b791fdbcc4104396255cf84960
2018-07-03 20:17:15 -07:00
Kris Maglione
b9a91c1106 Bug 1471025: Part 7c - Clear the dynamic hashtable in the parent process after snapshotting. r=njn
The preference storage in the shared memory snapshot is much more compact than
the dynamic hashtable, and is already mapped in memory, so there's no need to
keep the full hashtable in memory in the parent process after the snapshot is
created.

This patch empties the hashtable and the name string arena after the snapshot.
It also removes the accounting for preferences which have changed after init,
since those are, by definition, exactly the set of entries in the dynamic
hashtable.

MozReview-Commit-ID: L6VGq2z4foH

--HG--
extra : source : 599895de063ef005dbd34847db9ee555410a878f
extra : histedit_source : a3bcc573e29a60a61abaa1b2cc6daa87d6b1a946
2018-07-02 22:48:40 -07:00
Kris Maglione
9e09f205af Bug 1471025: Part 7b - Don't load preference files in the content process. r=njn
With the parent sending a snapshot of its preference state at content process
startup, we're guaranteed to have the full set of built-in preferences in the
shared map at initialization time, so there's no need to load them again.

This also applies to static preference default values, so we skip setting
those, as well.

However, we do need to make sure that we update static preference cache
entries whose default values don't match the value in the shared map, since
they may have been changed by user preference files. In order to deal with
that, we iterate over all preferences in the map, and dispatch callbacks for
any that have user values.

MozReview-Commit-ID: DlRUbg7Qor3

--HG--
extra : source : dc7ec17179d1961d91b897cec9f409786363ec9e
extra : histedit_source : 285a99038c6731fed427cd8bc783b65f56e34ebb
2018-07-07 12:45:57 -07:00
Kris Maglione
79870c09c8 Bug 1471025: Part 7a - Look up preferences from both dynamic and shared preference tables. r=njn
This patch changes our preference look-up behavior to first check the dynamic
hashtable, and then fall back to the shared map.

In order for this to work, we need to make several other changes as well:

- Attempts to modify a preference that only exists in the shared table
  requires that we copy it to the dynamic table, and change the value of the
  new entry.

- Attempts to clear a user preference with no default value, but which also
  exists in the shared map, requires that we keep an entry in the dynamic
  table to mask the shared entry. To make this work, we change the type of
  these entries to None, and ignore them during look-ups and iteration.

- Iteration needs to take both hashtables into consideration. The
  serialization iterator for changed preferences only needs to care about
  dynamic values, so it remains unchanged. Most of the others need to use
  PrefsIter() instead.

MozReview-Commit-ID: 9PWmSZxoC9Z

--HG--
extra : source : 5051f15fc2005667cfe76ccae0afb1fb0657c103
extra : histedit_source : 28f2216b8c1e9d08ed9b2c03910d4b8434e55421
2018-07-02 22:52:53 -07:00
Kris Maglione
3bd442ec01 Bug 1471025: Part 6 - Optimize preference lookups while dispatching callbacks. r=njn
Since lookups in the snapshotted hashtable are currently O(log n) rather than
O(1), they're expected to be slightly more expensive than the previous
purely-dynamic lookups.

In general, I expect this not to be a major issue. The main concern is pref
cache lookups while initializing the database. Initialization in the parent
process will still always use only a dynamic hashtable, so the performance
characteristics there won't change.

In the child process, though, we'll still need to notify observers of
preferences in the snapshot when they have user values, which could require
any number of lookups at startup (though in practice probably will not).

This patch solves that problem by caching the wrapper for the current known
preference value when dispatching callbacks, and optimizing lookups for that
value when it is present.

MozReview-Commit-ID: 2CAn0rM0bE9

--HG--
extra : source : faef4df47b2089592df7637f5b8f4ae193e98046
extra : histedit_source : 3af498eac94f481523e86c31b9c2b3e55b3cd1fb
2018-07-07 12:47:34 -07:00
Kris Maglione
ee2ddcd56c Bug 1471025: Part 5 - Add a range iterator helper for iterating both static and dynamic preferences. r=njn
For memory efficiency in content processes, we need to be able to store
changed preferences in a separate dynamic hashtable when their values don't
match the snapshot values.

That makes iteration over the full set of preferences somewhat more
complicated, since not only do we need to iterate over two tables, but we also
need to ignore preferences in the snapshot table if they also exist in the
dynamic hashtable.

This patch solves that problem by adding an iterator helper which iterates
over values in both tables, and skips values in the static table if they also
exist in the dynamic table.

In order to support completely deleting preferences that exist in the base
table, it also ignores all dynamic entries with the None type, so that they
can completely mask deleted base table values.

MozReview-Commit-ID: LCIwyPJMByj

--HG--
extra : source : d344247b870668f53fa645e72bda4bb4309346c8
extra : histedit_source : bb670afc815f3953ccadebddd04962836569b281
2018-07-02 18:17:48 -07:00
Kris Maglione
bdb3eac1dd Bug 1471025: Part 4 - Add a wrapper class that can access either static or dynamic prefs. r=njn
The in-memory format of shared-memory preferences is significantly different
from the format used by dynamic preferences, which means that we need
different classes to access their properties.

Virtual classes would be a potential solution to this problem, but I don't
think the performance characteristics would be acceptable for preferences
code. And since the wrapper classes used for static prefs are temporary, they
would add the additional snag of figuring out how to keep a valid pointer
alive.

So, instead, this patch adds a wrapper class that can access either type of
preference, based on known type flags in a Variant. It also moves some of the
logic for deciding which preference value to return to the wrapper, so that it
doesn't need to be duplicated for each representation.

MozReview-Commit-ID: LameIIbYcD3

--HG--
extra : source : 83d98ea5ebaccded8a20929c0f3316e5618f1f76
extra : histedit_source : b3fc33ea04357e15323c7bcb1d02e73c1a9b0c76
2018-07-01 23:23:48 -07:00
Kris Maglione
088e306955 Bug 1471025: Part 3a - Pass shared preference map to (non-Android) content processes at startup. r=jld,njn
This adds an additional file descriptor to the set sent at content process
startup, for the read-only preference map that we share between all content
processes. This forms the base set of preferences. The other preferences FD
contains changes that the content process will need to apply on top of the
snapshot.

MozReview-Commit-ID: 6hc0HIxFmHg

--HG--
extra : source : e3bbc87b71af2f2ce1fa8bdf2cf26857c071ba5e
extra : histedit_source : dc1c7c8015e0443eed218f826fda9f5b38b3e062%2C4cfa2f90104ca3e907607d884ac86f73ad4995bf
2018-07-02 15:40:38 -07:00
Kris Maglione
7f2567e3d9 Bug 1471025: Part 2 - Add a helper class creating and accessing shared preference map snapshots. r=njn,erahm
This is based on the SharedStringMap that's currently used for shared memory
string bundles.

When the parent process is ready to launch its first content process, it
creates a snapshot of the current state of the preference database, maps that
as read-only, and shares it with each content process. Look-ups in the
snapshotted map are done entirely using data in the shared memory region. It
doesn't require any additional per-process state data.

MozReview-Commit-ID: BdTUhak7dmS

--HG--
extra : source : 68bb03c63b3cee1d47cbddfd3abf919f5783c04b
2018-07-01 18:28:31 -07:00
Kris Maglione
6949abebf4 Bug 1471025: Part 1 - Store preference access counts in a separate hashtable. r=njn
Once the majority of preferences are stored in a read-only shared map, it
won't be possible to modify the access counts in their entries. Which means we
need a separate map for the access counts.

Fortunately, this code is only active in debug builds, so it shouldn't affect
release users. And the net impact on memory usage of this patchset will still
be decidedly downward.

MozReview-Commit-ID: EuLXlMQJP1M

--HG--
extra : source : 4a8fbb472c91f13554cac3d0ea638cf9f368ff11
2018-07-02 23:33:28 -07:00
Brindusan Cristian
a68383b333 Backed out 12 changesets (bug 1471025) for build bustages on dom/ipc/ContentProcess.cpp. CLOSED TREE
Backed out changeset 398ccedc20dc (bug 1471025)
Backed out changeset 599895de063e (bug 1471025)
Backed out changeset dc7ec17179d1 (bug 1471025)
Backed out changeset 5051f15fc200 (bug 1471025)
Backed out changeset faef4df47b20 (bug 1471025)
Backed out changeset d344247b8706 (bug 1471025)
Backed out changeset 83d98ea5ebac (bug 1471025)
Backed out changeset 38f690f30e78 (bug 1471025)
Backed out changeset 4b7a8a35ed95 (bug 1471025)
Backed out changeset e3bbc87b71af (bug 1471025)
Backed out changeset 68bb03c63b3c (bug 1471025)
Backed out changeset 4a8fbb472c91 (bug 1471025)
2018-07-13 22:11:24 +03:00
Kris Maglione
0fb080d242 Bug 1471025: Part 8 - Add tests for shared memory preferences. r=njn
MozReview-Commit-ID: 8452JoTBHCU

--HG--
extra : rebase_source : dadc22ef0909102f93f6de3afb99f5b6e65db2f5
extra : absorb_source : 62a77303c36c3af308ee5529d81c637f81449370
2018-07-03 20:17:15 -07:00
Kris Maglione
e9a980f931 Bug 1471025: Part 7c - Clear the dynamic hashtable in the parent process after snapshotting. r=njn
The preference storage in the shared memory snapshot is much more compact than
the dynamic hashtable, and is already mapped in memory, so there's no need to
keep the full hashtable in memory in the parent process after the snapshot is
created.

This patch empties the hashtable and the name string arena after the snapshot.
It also removes the accounting for preferences which have changed after init,
since those are, by definition, exactly the set of entries in the dynamic
hashtable.

MozReview-Commit-ID: L6VGq2z4foH

--HG--
extra : rebase_source : d4ba3b6a0ae3d46cf797fd6aaf4502d7a74f49c9
extra : absorb_source : e8b2648578a880d43a5a3a075e60ce1433c737ce
2018-07-02 22:48:40 -07:00
Kris Maglione
c1de3fe2de Bug 1471025: Part 7b - Don't load preference files in the content process. r=njn
With the parent sending a snapshot of its preference state at content process
startup, we're guaranteed to have the full set of built-in preferences in the
shared map at initialization time, so there's no need to load them again.

This also applies to static preference default values, so we skip setting
those, as well.

However, we do need to make sure that we update static preference cache
entries whose default values don't match the value in the shared map, since
they may have been changed by user preference files. In order to deal with
that, we iterate over all preferences in the map, and dispatch callbacks for
any that have user values.

MozReview-Commit-ID: DlRUbg7Qor3

--HG--
extra : rebase_source : 93cad19e27d3aaf5d4cad358cdebd6d80b76f668
extra : absorb_source : 06cb8911c92b66f8863b5e184d88b923cdbd6adc
2018-07-07 12:45:57 -07:00
Kris Maglione
9128f02116 Bug 1471025: Part 7a - Look up preferences from both dynamic and shared preference tables. r=njn
This patch changes our preference look-up behavior to first check the dynamic
hashtable, and then fall back to the shared map.

In order for this to work, we need to make several other changes as well:

- Attempts to modify a preference that only exists in the shared table
  requires that we copy it to the dynamic table, and change the value of the
  new entry.

- Attempts to clear a user preference with no default value, but which also
  exists in the shared map, requires that we keep an entry in the dynamic
  table to mask the shared entry. To make this work, we change the type of
  these entries to None, and ignore them during look-ups and iteration.

- Iteration needs to take both hashtables into consideration. The
  serialization iterator for changed preferences only needs to care about
  dynamic values, so it remains unchanged. Most of the others need to use
  PrefsIter() instead.

MozReview-Commit-ID: 9PWmSZxoC9Z

--HG--
extra : rebase_source : 054f4dcd534b41da889304c3c6d3365d56e8edda
extra : absorb_source : de81199e174f2d3604c803a5c016ba2f3baf3558
2018-07-02 22:52:53 -07:00
Kris Maglione
50cbc3c826 Bug 1471025: Part 6 - Optimize preference lookups while dispatching callbacks. r=njn
Since lookups in the snapshotted hashtable are currently O(log n) rather than
O(1), they're expected to be slightly more expensive than the previous
purely-dynamic lookups.

In general, I expect this not to be a major issue. The main concern is pref
cache lookups while initializing the database. Initialization in the parent
process will still always use only a dynamic hashtable, so the performance
characteristics there won't change.

In the child process, though, we'll still need to notify observers of
preferences in the snapshot when they have user values, which could require
any number of lookups at startup (though in practice probably will not).

This patch solves that problem by caching the wrapper for the current known
preference value when dispatching callbacks, and optimizing lookups for that
value when it is present.

MozReview-Commit-ID: 2CAn0rM0bE9

--HG--
extra : rebase_source : 4a7e9611efe5b554309df18f7b18ba9c807b72b2
extra : absorb_source : 185442bd69d616c2d2512df954dde7d1b54f2c30
2018-07-07 12:47:34 -07:00
Kris Maglione
f1dd4a1a40 Bug 1471025: Part 5 - Add a range iterator helper for iterating both static and dynamic preferences. r=njn
For memory efficiency in content processes, we need to be able to store
changed preferences in a separate dynamic hashtable when their values don't
match the snapshot values.

That makes iteration over the full set of preferences somewhat more
complicated, since not only do we need to iterate over two tables, but we also
need to ignore preferences in the snapshot table if they also exist in the
dynamic hashtable.

This patch solves that problem by adding an iterator helper which iterates
over values in both tables, and skips values in the static table if they also
exist in the dynamic table.

In order to support completely deleting preferences that exist in the base
table, it also ignores all dynamic entries with the None type, so that they
can completely mask deleted base table values.

MozReview-Commit-ID: LCIwyPJMByj

--HG--
extra : rebase_source : 833abea0620f75410f9922e5d4b5cf36b84e9e50
extra : absorb_source : 89690c674120eb99ad25804408b1c3864c7b1fc8
2018-07-02 18:17:48 -07:00
Kris Maglione
62e557b598 Bug 1471025: Part 4 - Add a wrapper class that can access either static or dynamic prefs. r=njn
The in-memory format of shared-memory preferences is significantly different
from the format used by dynamic preferences, which means that we need
different classes to access their properties.

Virtual classes would be a potential solution to this problem, but I don't
think the performance characteristics would be acceptable for preferences
code. And since the wrapper classes used for static prefs are temporary, they
would add the additional snag of figuring out how to keep a valid pointer
alive.

So, instead, this patch adds a wrapper class that can access either type of
preference, based on known type flags in a Variant. It also moves some of the
logic for deciding which preference value to return to the wrapper, so that it
doesn't need to be duplicated for each representation.

MozReview-Commit-ID: LameIIbYcD3

--HG--
extra : rebase_source : bf986b6008123661547949f615c8416403321835
extra : absorb_source : e86aae959325a9c3198e0259468a47a656739278
2018-07-01 23:23:48 -07:00
Kris Maglione
607cc0aec9 Bug 1471025: Part 3a - Pass shared preference map to (non-Android) content processes at startup. r=jld,njn
This adds an additional file descriptor to the set sent at content process
startup, for the read-only preference map that we share between all content
processes. This forms the base set of preferences. The other preferences FD
contains changes that the content process will need to apply on top of the
snapshot.

MozReview-Commit-ID: 6hc0HIxFmHg

--HG--
extra : rebase_source : f5de7462438e33cf4983be3fcef3c781c25ec492
extra : absorb_source : 9f9861546fc0b11333e575bb3c164dfe07575d99
2018-07-02 15:40:38 -07:00
Kris Maglione
68c9610957 Bug 1471025: Part 2 - Add a helper class creating and accessing shared preference map snapshots. r=njn,erahm
This is based on the SharedStringMap that's currently used for shared memory
string bundles.

When the parent process is ready to launch its first content process, it
creates a snapshot of the current state of the preference database, maps that
as read-only, and shares it with each content process. Look-ups in the
snapshotted map are done entirely using data in the shared memory region. It
doesn't require any additional per-process state data.

MozReview-Commit-ID: BdTUhak7dmS

--HG--
extra : rebase_source : e7cb96dd52380f2ed2fbd79b4e157e4efab65cb0
extra : absorb_source : ed95ed85388875353458eb65e41727e606ebf097
2018-07-01 18:28:31 -07:00
Kris Maglione
ea9eafabda Bug 1471025: Part 1 - Store preference access counts in a separate hashtable. r=njn
Once the majority of preferences are stored in a read-only shared map, it
won't be possible to modify the access counts in their entries. Which means we
need a separate map for the access counts.

Fortunately, this code is only active in debug builds, so it shouldn't affect
release users. And the net impact on memory usage of this patchset will still
be decidedly downward.

MozReview-Commit-ID: EuLXlMQJP1M

--HG--
extra : rebase_source : 6a32f03c37622093c67e7ee7a0e935d1e63c4fc8
2018-07-02 23:33:28 -07:00