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

5754 Коммитов

Автор SHA1 Сообщение Дата
Alex Gaynor 0f01791ffc Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Alex Gaynor 984f0333ea Bug 1512990 - Part 3 - remove declarations of Alloc/Dealloc methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Alloc/Dealloc methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:07 +00:00
Alex Gaynor 75c7d1fa76 Bug 1512990 - Part 2 - implement direct calls in the IPDL compiler; r=froydnj
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.

There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:57:37 +00:00
Mike Conley e663f0736b Bug 1523974 - Make ProcessPriorityManager pay attention to video and audio playing WakeLocks. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D18393

--HG--
extra : moz-landing-system : lando
2019-02-04 22:57:03 +00:00
Jed Davis bcff2dd108 Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8
In order to enable asynchronous launch, destruction of
GeckoChildProcessHost (and its subclasses) has to be delayed until after
launching (or anything else that might be made asynchronous in the
future) has completed, to prevent use-after-free.  However, there are
other dependencies on process hosts always being destroyed on the I/O
thread, so refcounting would be difficult to use.

Instead, GeckoChildProcessHost now may not be destroyed directly, but
must go through a method that handles the scheduling.

There are also some minor cleanups to the affected headers (removed
duplicate access modifiers, and made PluginProcessParent final).

Depends on D18010

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

--HG--
extra : moz-landing-system : lando
2019-02-05 00:15:20 +00:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Mike de Boer 481ae95c00 Bug 1524593 - nsISearchService (aka nsIBrowserSearchService, previously) refactor to be mostly an asynchronous, in preparation of WebExtension engines. r=daleharvey
This is a rollup of all the patches that have landed on the cedar project branch:

891252fdd0
Bug 1492475 - Part 1: Migrate most, if not all nsSearchService consumers to use async APIs. r=florian

79b2eb2367
Bug 1492475 - Part 2: Move nsIBrowserSearchService.idl to toolkit/components/search/nsISearchService.idl and update references. r=florian

a947d3cdf0
Bug 1492475 - Part 3: The search service init() method should simply return a Promise. r=florian

c1e172dfac
Bug 1492475 - Part 4: Remove the synchronous initialization flow. r=florian

cd41189eac
Bug 1492475 - Part 5: Since async initialization of the search service now is implicit behavior, remove the distinctive verbiage used internally. r=florian

2ae7189dfa
Bug 1492475 - Part 6: Update the cache build task to work with an actual Promise and re-initialize only once at the same time - all to fix race conditions here. r=florian

c8ee92973f
Bug 1492475 - Part 7: Make the region fetch not block the init flow, to ensure it's as fast as possible. r=florian

c44e674e16
Bug 1492475 - Part 8: Introduce an init flag, which can only be used privately, that allows to explicitly skip waiting for the region check process to complete. r=florian

6c79eaf1d3
Bug 1492475 - Part 9: Update unit tests to stop using 'currentEngine', in favor of 'defaultEngine'. r=Standard8

21b3aa17ee
Bug 1492475 - Part 10: Update unit tests to be fully aware of the new, async signatures of the search service API and remove sync init flow tests. r=mkaply,florian

ce5ba69019
Bug 1492475 - Part 11: Repair incorrect usage of the `identifier` property of nsISearchEngine instances. r=florian

fd177a7994
Bug 1518543 - Fix up the Android (Fennec) nsISearchService shim to work with the new asynchronous API. r=florian

3653d8ee22
Bug 1523708 - Change the search service interaction in the show-heartbeat action to use the new async API. r=florian

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

--HG--
rename : netwerk/base/nsIBrowserSearchService.idl => toolkit/components/search/nsISearchService.idl
extra : moz-landing-system : lando
2019-02-02 11:27:21 +00:00
Blake Kaplan 3eed3c5f94 Bug 1517406 - Proxy these calls to the parent when required. r=asuth
Summary:

The push notifier needs to proxy its calls to the proper process in order to
notify service workers. With parent-intercept enabled, that means making sure
we notify in the parent and without it, that we notify in the content process.
Fortunately, we already have to do this proxying for the observer
notifications, so we can just piggyback on top of that code to make things
work for service workers.

Reviewers: asuth

Reviewed By: asuth

Bug #: 1517406

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

--HG--
extra : rebase_source : a29216f3a6638592a784e7e830fe9f7842cce7e9
2019-01-29 15:27:03 -05:00
Myk Melez 25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
shindli f7752f11b1 Merge inbound to mozilla-central. a=merge 2019-01-30 06:07:01 +02:00
Andreas Farre a93a5cfa92 Bug 1519910 - Rename ChromeBrowsingContext to CanonicalBrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D17957

--HG--
rename : docshell/base/ChromeBrowsingContext.cpp => docshell/base/CanonicalBrowsingContext.cpp
rename : docshell/base/ChromeBrowsingContext.h => docshell/base/CanonicalBrowsingContext.h
extra : moz-landing-system : lando
2019-01-29 17:32:28 +00:00
Cosmin Sabou 599a15d354 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-29 12:01:56 +02:00
Emilio Cobos Álvarez 362338e593 Bug 1523362 - Validate cursor data in TabParent::RecvSetCursor. r=tnikkel
I think the `stride < width * bpp` is the right thing to check for, since I
don't know if there's any guarantee of it of the stride being equal, but let me
know if I'm wrong.

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

--HG--
extra : moz-landing-system : lando
2019-01-28 21:42:15 +00:00
John Dai f2524a5b86 Bug 1513878 - Part 3: Add getActor test for WindowGlobalParent/WindowGlobalChild. r=nika
Depends on D16845

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

--HG--
extra : moz-landing-system : lando
2019-01-28 19:01:40 +00:00
John Dai 7b1dd6aef8 Bug 1513878 - Part 2: Implement a getter method to WindowGlobalParent/WindowGlobalChild. r=nika
Depends on D16844

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

--HG--
extra : moz-landing-system : lando
2019-01-28 19:02:02 +00:00
Nika Layzell 9b58a2ab87 Bug 1521189 - Asynchronously destroy WindowGlobalChild, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D17030

--HG--
extra : moz-landing-system : lando
2019-01-28 18:09:13 +00:00
Randell Jesup 76bd9e73cc Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Ciure Andrei 30444a49bd Backed out changeset 1e68675bce75 (bug 1521189) for causing browser_dbg_rr_breakpoints-01.js to perma fail a=backout 2019-01-26 14:58:54 +02:00
Emilio Cobos Álvarez ef7d8198eb Bug 1520502 - Set the standard cursor and the custom cursor in the same IPC message. r=jmathies
This cleans up a bit and allows us to be smarter about which cursors
should we allow from content or what not, which will help with bug 1445844 and
co.

Differential Revision: https://phabricator.services.mozilla.com/D16711
2019-01-26 07:49:28 +01:00
Nika Layzell 771297a51a Bug 1521189 - Asynchronously destroy WindowGlobalChild, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D17030

--HG--
extra : moz-landing-system : lando
2019-01-25 15:59:30 +00:00
Dorel Luca 2702a37d2c Backed out 3 changesets (bug 1513878) for build bustage. CLOSED TREE
Backed out changeset a480d92de046 (bug 1513878)
Backed out changeset 0333640041bb (bug 1513878)
Backed out changeset 48b36980fe1c (bug 1513878)
2019-01-25 21:16:50 +02:00
John Dai 3e9e8f9274 Bug 1513878 - Part 3: Add getActor test for WindowGlobalParent/WindowGlobalChild. r=nika
Depends on D16845

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

--HG--
extra : moz-landing-system : lando
2019-01-25 18:45:36 +00:00
John Dai bb99ebce70 Bug 1513878 - Part 2: Implement a getter method to WindowGlobalParent/WindowGlobalChild. r=nika
Depends on D16844

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

--HG--
extra : moz-landing-system : lando
2019-01-25 18:45:28 +00:00
Ehsan Akhgari 08e1954154 Bug 1520879 - Port the onContentBlockingEvent notifications inside WebProgressChild.jsm to C++; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D17157

--HG--
extra : moz-landing-system : lando
2019-01-25 14:44:09 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Dylan Roeh 44dab4cd06 Bug 1514364 - Add appendRawFilter to nsIFilePicker to expose actual accept filters to GV for onFilePrompt. r=snorp, smaug 2019-01-24 10:21:05 -06:00
Kris Maglione eb14dd1d2c Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040

--HG--
extra : rebase_source : d89ac470241cb6f6a43c29c6e90b1c0e4fc78028
extra : source : b0444e0bc801f828b49f9953a73498cf5ff5024b
2018-12-16 17:27:58 -08:00
Kris Maglione b83df4e952 Bug 1478124: Part 8a - Update toolkit module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15039

--HG--
extra : rebase_source : 1683d6ced9a6c10e6fa19425debbb51950b9b629
extra : source : d94039b199437180309264cb4c206ae7ebb7d21d
2018-12-16 16:03:00 -08:00
Nika Layzell b2ddc107de Bug 1467223 - Part 4: Add support for piping redirected channels through nsDocShell's loading functions, r=qdot
This code largely skips the logic in load methods, and tries to simply get the
channel opened & connected to the correct listener ASAP, without breaking any
loading state.

Depends on D15610

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

--HG--
extra : moz-landing-system : lando
2019-01-23 21:07:08 +00:00
Nika Layzell be5f88174d Bug 1467223 - Part 1: Move CrossProcessRedirect Message to PContent, r=valentin
This is needed because early in a content process's lifecycle, NeckoParent may
not have been created yet. This leads to issues when trying to redirect into a
fresh process which hasn't performed network loads yet. By sending the message
over PContent, we can be sure the APIs are available.

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

--HG--
extra : moz-landing-system : lando
2019-01-23 21:27:44 +00:00
Nathan Froyd a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Jon Coppeard a96229ddb3 Bug 1512749 - Convert JS::gcreason::Reason to enum class JS:GCReason r=jonco r=mccr8 2019-01-21 13:09:12 +00:00
Cosmin Sabou 7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Nika Layzell 083cc0a7c3 Bug 1520372 - Add an ownerElement property to nsITabParent, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D16713

--HG--
extra : moz-landing-system : lando
2019-01-16 20:00:17 +00:00
Dimi Lee 632a821b8a Bug 1501458 - Remove unused tracking protection code from nsUrlClassifierDBService. r=baku
No one is using the aUseTrackingProtection parameter and also tracking
protection related preference in Classify API. And we shouldn't use it
that way in the future.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 21:24:43 +00:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Mike Conley 6d606d9ec5 Bug 1498079 - Use a var cache for the PreallocatedProcessManager delay pref. r=jld
This should allow us to avoid accessing this pref too many times during start-up.

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

--HG--
extra : moz-landing-system : lando
2019-01-15 20:17:13 +00:00
Alastor Wu 9ac741bd4b Bug 1516482 - part3 : reset user gesture activation flag when top level document changes. r=nika
As the user gesture activation flag is a flag which is used to reflect whether the corresponding document of browsing context has been activated by user or not, we should reset the flag when the top level window changes its document.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 23:21:05 +00:00
Alastor Wu 0b67992fb9 Bug 1516482 - part2 : update user gesture activation flag across IPC. r=nika
Everytime we set the flag on top level BrowsingContext, it would automatically be sync to its corresponding ChromeBrowsingContext.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 16:08:06 +00:00
Csoregi Natalia 4a86022f41 Merge mozilla-central to autoland. CLOSED TREE 2019-01-14 19:19:46 +02:00
Csoregi Natalia dbb80cb51f Merge inbound to mozilla-central. a=merge 2019-01-14 19:17:06 +02:00
Ehsan Akhgari d855987de1 Bug 1518491 - Reduce the amount of UTF encodings we do when reporting content blocking events; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D16217
2019-01-14 09:36:12 -05:00
Dimi Lee 53158f3fcb Bug 1514488 - Check if IPC still opens before sending classify result. r=baku
The crash happens when parent process tries to send classify result to
the content process while the IPC connection is already closed.

The only case that we needs IPC for classification is for Flash classification, but flash
classification is moved to parent process after Bug 1514202.

Although right now there is no consumer for the IPC version of
nsUrlClassifierDBService::AsyncClassifyLocalWithFeatures, we should
still fix this bug.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 08:24:39 +00:00
Ryan Scherich 6a034fe154 Bug 1489095 - Change nsITooltipListener to use XPCOM strings. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D15602

--HG--
extra : moz-landing-system : lando
2019-01-14 14:06:07 +00:00
Michael Froman c475e5754c Bug 1514874 - start RDD process on-demand r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D15775

--HG--
extra : moz-landing-system : lando
2019-01-12 04:51:20 +00:00
Kershaw Chang 9973068a10 Bug 1513057 - P1.1: Create a reusable class to pass prefs to child processes r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D14970

--HG--
extra : moz-landing-system : lando
2019-01-11 18:39:22 +00:00
Kershaw Chang 0b336d5545 Bug 1513057 - P1: Start the new socket process basics (prefs, full xpcom init, logging, no sandboxing) r=mayhemer,dragana
Differential Revision: https://phabricator.services.mozilla.com/D14148

--HG--
extra : moz-landing-system : lando
2019-01-11 18:57:23 +00:00
Razvan Maries 642dd2cc11 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-01-11 17:33:16 +02:00
Christoph Kerschbaumer fbb4bafd5c Bug 1513241: Update loadURI interface and pass a loadURIOptions dictionary from frontend to docshell loads. r=bz 2019-01-11 12:43:39 +01:00
Andreea Pavel 21ad33d612 Backed out 10 changesets (bug 1513057) for build bustages on a CLOSED TREE
Backed out changeset 56329b5f1844 (bug 1513057)
Backed out changeset 46411c5de3da (bug 1513057)
Backed out changeset de65c456aad6 (bug 1513057)
Backed out changeset f648b5f1a7c2 (bug 1513057)
Backed out changeset 460bbf0849e1 (bug 1513057)
Backed out changeset 86032a14d26f (bug 1513057)
Backed out changeset a81f83df08d5 (bug 1513057)
Backed out changeset edbda5ee5fd5 (bug 1513057)
Backed out changeset c900ac2519f5 (bug 1513057)
Backed out changeset 4e94bbb90315 (bug 1513057)
2019-01-11 17:02:44 +02:00
Kershaw Chang d0f8c9de61 Bug 1513057 - P1.1: Create a reusable class to pass prefs to child processes r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D14970

--HG--
extra : moz-landing-system : lando
2019-01-11 14:12:53 +00:00
Kershaw Chang 0c2943008a Bug 1513057 - P1: Start the new socket process basics (prefs, full xpcom init, logging, no sandboxing) r=mayhemer,dragana
Differential Revision: https://phabricator.services.mozilla.com/D14148

--HG--
extra : moz-landing-system : lando
2019-01-11 14:07:47 +00:00
Cameron McCormack 8106cebcf9 Bug 1519001 - Rename some style sheet accessors on nsLayoutStylesheetCache to indicate they can return null r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D16150

--HG--
extra : moz-landing-system : lando
2019-01-11 03:12:05 +00:00
Cosmin Sabou af0ac088e5 Backed out changeset 8d953c25fdef (bug 1514874) for windows asan mda failures on RemoteDecoderModule.cpp. 2019-01-11 02:03:38 +02:00
Michael Froman 1a75356195 Bug 1514874 - start RDD process on-demand r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D15775

--HG--
extra : moz-landing-system : lando
2019-01-10 18:35:06 +00:00
Brian Grinstead f6c12a437b Bug 1441935 - Modifications on top of the generated MozBrowser Custom Element r=mconley
In order to make the history easier to navigate, this changeset includes the
modifications required to make <xul:browser> actually work as a Custom Element,
and switches the app to use it instead of the XBL browser.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 01:45:43 +00:00
Margareta Eliza Balazs 9dda825205 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-18 12:31:59 +02:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ehsan Akhgari 06c3d29113 Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre
Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

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

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
2019-01-18 10:12:56 +01:00
Nika Layzell a522802720 Bug 1518212 - Fire an observer notification when window globals are created/destroyed, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D15850

--HG--
extra : moz-landing-system : lando
2019-01-08 22:54:42 +00:00
Mike Conley 65813684e5 Bug 1503002 - Don't register WakeLockObserver for ProcessPriorityManagerImpl. r=gsvelto
The WakeLockObserver is being used to set a boolean that's never being read.

This also makes it so that dom.ipc.processPriorityManager.enabled can be set to
true by default. Without this patch, setting that pref to true by default means
that the WakeLockObserver attempts to be registered before Hal has had a chance
to initialize which causes an assertion failure.

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

--HG--
extra : moz-landing-system : lando
2019-01-08 22:46:16 +00:00
Nika Layzell f1f86e050a Bug 1516179 - Unregister ProcessHangMonitor as a hang annotator on shutdown, r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D15614

--HG--
extra : moz-landing-system : lando
2019-01-07 17:02:59 +00:00
Cosmin Sabou 3b1edf526b Merge mozilla-central to mozilla-inbound.
--HG--
rename : toolkit/modules/Task.jsm => toolkit/modules/tests/modules/Task.jsm
extra : rebase_source : 52141f691cc72d4a80c7c5d4d35aad67a51b660d
2019-01-04 18:38:34 +02:00
Andrea Marchesini 647b040b0f Bug Bug 1515272 - Get rid of nsIURIClassifier.classifyLocal(), r=dimi, r=froydnj 2019-01-04 14:46:30 +01:00
Andrea Marchesini e34612e16e Bug 1514202 - Port flash url-classifier to nsIUrlClassifierFeature - part 1 - Flash feature, r=dimi, r=edgar, r=valentin 2019-01-04 14:45:42 +01:00
Cosmin Sabou d8e384fc5e Bug 1513876 - Add missing commas. r=eslint-fix 2019-01-04 13:07:29 +02:00
Tooru Fujisawa ba1b11b334 Bug 1509384 - Use IPC::Principal instead of Principal URI string in Drag-and-Drop. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13728

--HG--
extra : moz-landing-system : lando
2019-01-04 03:16:46 +00:00
John Dai e65b6abd33 Bug 1513876 - Implement register a toplevel window global actor. r=nika
Implement register a toplevel window global actor.

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

--HG--
extra : moz-landing-system : lando
2019-01-03 16:45:42 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Bogdan Tara 954395da08 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-01-02 23:41:59 +02:00
Nathan Froyd 9acf5a0c63 Bug 1517276 - thread callbacks through MemoryReportRequestClient; r=mccr8
The guts of MemoryReportRequestClient's supporting runnables contain
switches on the particular type of process we're running.  If you're
bringing up a new process type, having to add extra cases for your
process type here is a bit onerous.  These runnables really shouldn't
know anything about the process types that they're running on, either.

The easiest thing to do is modify MemoryReportRequestClient::Start to
take callbacks for what to do when a report is created and when
reporting is finished.  Then all process-specific knowledge can be
pushed out to the clients themselves, leaving MemoryReportRequestClient
and friends process-type agnostic.  We could even, at some later date,
move this code into xpcom/base/ to sit near nsMemoryReporterManager,
where it belongs.
2019-01-02 16:18:13 -05:00
Peter Van der Beken 066d891adb Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656

--HG--
extra : moz-landing-system : lando
2019-01-02 13:29:18 +00:00
Peter Van der Beken 58c7fc4d20 Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:27:05 +00:00
Peter Van der Beken a17049feac Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2019-01-02 13:26:56 +00:00
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Bogdan Tara 3eb2f351ae Backed out 6 changesets (bug 1353867) for nsDocShell.cpp failures CLOSED TREE
Backed out changeset aa9b106b15d9 (bug 1353867)
Backed out changeset 8c05f4d3f7ad (bug 1353867)
Backed out changeset 00869bed4121 (bug 1353867)
Backed out changeset 700aeb906fd2 (bug 1353867)
Backed out changeset 8b60851b93da (bug 1353867)
Backed out changeset ebdf4531b3bd (bug 1353867)
2018-12-31 17:47:12 +02:00
Peter Van der Beken e25810f1d4 Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656

--HG--
extra : moz-landing-system : lando
2018-12-31 12:44:07 +00:00
Peter Van der Beken 831826fe41 Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

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

--HG--
extra : moz-landing-system : lando
2018-12-31 10:51:32 +00:00
Peter Van der Beken 68a88553fa Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

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

--HG--
extra : moz-landing-system : lando
2018-12-31 10:50:36 +00:00
Emilio Cobos Álvarez f131713362 Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug
This is a big step in order to merge both.

Also allows to remove some very silly casts, though it causes us to add some
ToSupports around to deal with ambiguity of casts from nsIDocument to
nsISupports, and add a dummy nsISupports implementation that will go away later
in the series.

Differential Revision: https://phabricator.services.mozilla.com/D15352
2018-12-29 20:41:28 +01:00
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Michael Froman c0a8a08f40 Bug 1500454 - remove PVideoDecoder, etc from dom namespace. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15156

--HG--
extra : moz-landing-system : lando
2018-12-21 22:34:57 +00:00
Kyle Machulis ef297735b5 Bug 1478742 - IPDLize nsDocShellLoadState; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13958

--HG--
extra : moz-landing-system : lando
2018-12-19 22:22:09 +00:00
Jan Varga e1fd96b2df Bug 1515647 - Fix bustages on PContentChild.h in non-Nightly builds; r=asuth 2018-12-20 20:39:21 +01:00
Jan Varga 849998a8e0 Bug 1513859 - CPOWs can still cause a hang with LSNG enabled; r=asuth 2018-12-19 12:38:23 +01:00
Blake Kaplan e131893a41 Bug 1514844 - Fix notification events in service workers. r=asuth
The current code assumes that it can get the ServiceWorkerManager in the child
process to send a message to the proper service worker. That isn't true, we
need to ask the parent to do it for us.

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

--HG--
extra : moz-landing-system : lando
2018-12-18 00:42:53 +00:00
Ehsan Akhgari e8796fe60d Bug 1512625 - Ensure that the allow-mode argument in the PContent::FirstPartyStorageAccessGrantedForOrigin() IPC call doesn't get converted down to 0/1 r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14478

--HG--
extra : moz-landing-system : lando
2018-12-17 16:19:43 +00:00
Tim Huang 1e2c28f939 Bug 1446472 - Part 1: Showing the identity block icon for canvas permission without the doorhanger when canvas extraction is auto detected. r=baku,Gijs
For a better user experience of auto-blocking canvas extraction, this
patch changes the behavior when detecting a canvas extraction without
user interaction. It will show a canvas identity block icon with a
hidden doorhanger when auto-blocking the canvas extraction. Users can
make their choice to either block or allow the canvas extraction by
clicking the identity block icon and then refresh the page to make
the canvas permission taking effect.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 21:30:59 +00:00
Jed Davis d845f69798 Bug 1510934 - Ensure that pref changes during content process launch are delivered to the process. r=njn
Some prefs need to be available before IPC is started, so we serialize a
snapshot when we start launching the process, and then stream further
changes over IPC messages.  However, async launch introduces a window
between the snapshot and when the parent can start sending messages,
during which other code can run on the main thread and change prefs.

In order to not lose those updates, they're queued and sent when the
launch is complete.

Depends on D14089

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

--HG--
extra : moz-landing-system : lando
2018-12-14 05:28:56 +00:00
Jed Davis 4213a3e9b6 Bug 1510934 - Change ContentParent's alive/dead tracking to launching/alive/dead. r=mrbkap
We need content processes that are created but not finished launching
(not "alive" yet) to be treated differently from ones that have exited
(no longer "alive"), so the boolean mIsAlive is expanded to a 3-state
enumeration, which could be expanded more in the future if needed.

(This is similar to GeckoChildProcessHost::mProcessState, but it's
synchronized with the rest of the ContentParent's state, which can lag
the GeckoChildProcessHost state due to runnable dispatch.)

This patch also removes mIsAvailable/IsAvailable/MarkAsTroubled, which
are unused as of bug 1459212.

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

--HG--
extra : moz-landing-system : lando
2018-12-15 01:38:27 +00:00
Andrea Marchesini 6b9fe3a6cf Bug 1511436 - Cleanup URL-Classifier code - part 3 - AsyncUrlChannelClassifier, r=dimi 2018-12-14 12:40:17 +01:00
Andrea Marchesini 71b120ca17 Bug 1511436 - Cleanup URL-Classifier code - part 2 - nsUrlClassifierDBService::AsyncClassifyLocalWithFeatures, r=dimi 2018-12-14 12:40:17 +01:00
Gijs Kruitbosch 70281bf326 Bug 1499092 - rename/move code from 'feeds' and 'web content' to more appropriate/obvious versions for registerProtocolHandler, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13699

--HG--
rename : browser/components/feeds/WebContentConverter.js => browser/components/protocolhandler/WebProtocolHandlerRegistrar.js
rename : browser/components/feeds/moz.build => browser/components/protocolhandler/moz.build
rename : browser/components/feeds/test/.eslintrc.js => browser/components/protocolhandler/test/.eslintrc.js
rename : browser/components/feeds/test/browser/.eslintrc.js => browser/components/protocolhandler/test/browser/.eslintrc.js
rename : browser/components/feeds/test/browser/browser.ini => browser/components/protocolhandler/test/browser/browser.ini
rename : browser/components/feeds/test/browser/browser_registerProtocolHandler_notification.html => browser/components/protocolhandler/test/browser/browser_registerProtocolHandler_notification.html
rename : browser/components/feeds/test/browser/browser_registerProtocolHandler_notification.js => browser/components/protocolhandler/test/browser/browser_registerProtocolHandler_notification.js
rename : browser/components/feeds/test/mochitest.ini => browser/components/protocolhandler/test/mochitest.ini
rename : browser/components/feeds/test/test_registerHandler.html => browser/components/protocolhandler/test/test_registerHandler.html
rename : browser/components/feeds/test/test_registerHandler_disabled.html => browser/components/protocolhandler/test/test_registerHandler_disabled.html
rename : dom/interfaces/sidebar/nsIWebContentHandlerRegistrar.idl => dom/interfaces/sidebar/nsIWebProtocolHandlerRegistrar.idl
extra : moz-landing-system : lando
2018-12-13 13:34:11 +00:00
Gijs Kruitbosch 7ab8abdd16 Bug 1499092 - move bulk of registerProtocolHandler checks into compiled code so we don't need a dedicated component in the child process, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13697

--HG--
extra : moz-landing-system : lando
2018-12-13 13:47:39 +00:00
adam.kolodko 8859b55ad1 Bug 1508990 - Enable ESLint for dom/ipc/ (manual changes) r=Standard8,mrbkap
Depends on D13887

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

--HG--
extra : moz-landing-system : lando
2018-12-13 00:45:24 +00:00
adam.kolodko 1a8fd9262f Bug 1508990 - Enable ESLint for dom/ipc/ (automatic changes) r=Standard8,mrbkap
Differential Revision: https://phabricator.services.mozilla.com/D13887

--HG--
extra : moz-landing-system : lando
2018-12-13 00:43:55 +00:00
Coroiu Cristina 3160ddc1f0 Merge inbound to mozilla-central a=merge 2018-12-12 07:12:07 +02:00
Tom Ritter bb57f44268 Bug 1512690 - Add a mechanism to omit logging specified Message Manager topics r=tjr
The topic will be skipped if the topic name appears anywhere as a substring
of the env var MOZ_LOG_MESSAGEMANAGER_SKIP.

Example:
  MOZ_LOG_MESSAGEMANAGER_SKIP="foobar|extension"
    Will match the topics 'foobar', 'foo', 'bar', and 'ten' (even though you may not
    have intended to match the latter three) and it will not match the topics
    'extensionresult' or 'Foo'.

--HG--
extra : histedit_source : 911b7572481c618551c6faeacfd4a46b6873ed8d
2018-12-11 13:28:26 -06:00
Tom Ritter 04ad4da5ff Bug 1512690 - Introduce a MesageManager log topic for MM topics and data r=tjr
This logging topic will output the topic of MEssageManager data at log
level 4 (debug); and will output the entire content of the data at level
5 (verbose).

--HG--
extra : histedit_source : 7be60b456a1652f9a9985fd4a01571b207a5f9e6
2018-12-11 11:31:24 -06:00
Jean-Yves Avenard 48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Brindusan Cristian 989d78f3d0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-11 00:10:08 +02:00
Neil Deakin 09ecdaf662 Bug 1492326, don't use QueryInterface to get nsIBrowser as it may be implemented in a custom element, r=paolo 2018-12-04 11:33:06 -05:00
Sylvestre Ledru ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Nika Layzell e1e08d3d11 Bug 1512085 - Don't overlap IDs between content and middleman process, r=bhackett
Differential Revision: https://phabricator.services.mozilla.com/D13763
2018-12-05 10:18:46 -05:00
Nika Layzell 614b663032 Bug 1510460 - Record the current WindowGlobal on ChromeBrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D13156
2018-12-05 10:18:43 -05:00
Nika Layzell f18502de7a Bug 1500949 - Include innerWindowId/outerWindowId in PWindowGlobal, r=farre
This will be useful as both an ID for PWindowGlobal, as well as a mechanism for
taking advantage of already synchronized information. As an example, LoadInfo
objects contain the inner window IDs of the window requesting the load, which
can now be used to obtain a reference to the corresponding WindowGlobalParent
in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D9396
2018-12-05 10:18:38 -05:00
Nika Layzell 554bfd2811 Bug 1500948 - Expose BrowsingContext on nsFrameLoader objects, r=farre
This should make BrowsingContext more usable by making it much easier to obtain
for a given frame or browser. BrowsingContext and nsFrameLoader should have
the same lifetime.

Differential Revision: https://phabricator.services.mozilla.com/D9395
2018-12-05 10:18:36 -05:00
Nika Layzell 91dd6c616f Bug 1500944 - Part 2: Expose WindowGlobal actors to Chrome JS, r=farre
This serves 2 purposes:
1. Provides an object corresponding to an inner window which Chrome JS can hold onto.
2. Provides the object to JS which Chrome JS per-window actors will be attached to.
3. Provides useful information to Chrome JS in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D9394
2018-12-05 10:18:34 -05:00
Nika Layzell b4954ede43 Bug 1500944 - Part 1: Store the set of active WindowGlobalParent objects in ChromeBrowsingContext, r=farre
This allows getting the set of all window globals for a given browsing context.
This is less useful at the moment as the active window global is not exposed as
such. That will be added as a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D9393
2018-12-05 10:18:33 -05:00
Nika Layzell 4e07a0c5f9 Bug 1487249 - Part 3: Add the WindowGlobal actor representing a single window global, r=bzbarsky
This actor can be used for communicating with individual frames, without
depending on walking the tree in the content process.

This is not yet complete. No tests have been written for it, the
WindowGlobalParent objects need to be exposed to chrome JS, and a form of JS
actors should be installed under them.

In addition, BrowsingContextChrome objects should be updated to allow access to
the current WindowGlobalParent in that context.

Differential Revision: https://phabricator.services.mozilla.com/D4623
2018-12-05 10:18:31 -05:00
Kris Maglione d79b3fbaf4 Bug 1505522: Part 2 - Migrate MemoryTelemetry.jsm to C++. r=erahm,chutten
This has benefits both in terms of performance and memory usage. Aside from
the obvious savings of not loading additional JS scripts in every process,
this also allows us to move more of our expensive data collection work to a
background thread, where it doesn't risk janking both parent and content
processes.

MozReview-Commit-ID: 2A593R7bIKB

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

--HG--
extra : rebase_source : ec634ee3a3b975809f542aa8077ad32236781452
2018-12-05 15:44:53 -05:00
Michael Froman a94c2df4cc Bug 1512023 - fixes for mochitest failures when RDD pref'd on for Win/OSX. r=drno
Differential Revision: https://phabricator.services.mozilla.com/D13734

--HG--
extra : moz-landing-system : lando
2018-12-04 20:43:56 +00:00
Noemi Erli c9261f8a58 Backed out changeset b3c8a3a052ea (bug 1452146) for mochitest automation.py failures 2018-12-03 05:13:57 +02:00
Nils Ohlmeier [:drno] 31d3bd0b33 Bug 1452146 - flip av1 and rdd on for OSX and Win. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D13638

--HG--
extra : moz-landing-system : lando
2018-12-02 15:23:37 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan Varga 6e40a9dccb Bug 1286798 - Part 22: Add support for preloading of datastores; r=asuth
Datastores are preloaded only for content principals. The preloading is triggered as soon as possible to lower the chance of blocking the main thread in content process. If there is no physical database on disk for given origin, datastore is not created. Preloaded datastores are kept alive for 20 seconds.
2018-11-29 21:48:25 +01:00
Jan Varga 60831f2e38 Bug 1286798 - Part 3: New basic (memory only) implementation of LocalStorage; r=asuth,mccr8
The implementation is based on a cache (datastore) living in the parent process and sync IPC calls initiated from content processes.
IPC communication is done using per principal/origin database actors which connect to the datastore.
The synchronous blocking of the main thread is done by creating a nested event target and spinning the event loop.
2018-11-29 21:47:20 +01:00
Coroiu Cristina da4da94439 Merge mozilla-central to inbound a=merge 2018-11-29 06:39:53 +02:00
Coroiu Cristina e92b0f1d7f Merge inbound to mozilla-central a=merge 2018-11-29 06:27:40 +02:00
Coroiu Cristina b8bc09a5b5 Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG--
rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json
extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
2018-11-29 00:34:07 +02:00
Jan-Erik Rediger 5fd1cd8036 Bug 1498163 - Migrate external callers to the new snapshot API r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D12890

--HG--
extra : moz-landing-system : lando
2018-11-28 09:36:03 +00:00
Jed Davis 42c1262dfd Bug 1474991 - Add new and improved performance telemetry for child process launching. r=mccr8,mconley,janerik
This patch adds some telemetry histograms:

* CONTENT_PROCESS_LAUNCH_IS_SYNC - boolean, true if the content process
was launched synchronously (blocking the main thread)

* CONTENT_PROCESS_SYNC_LAUNCH_MS - the time consumed by sync launch;
the main thread will be busy or blocked for this entire time

* CONTENT_PROCESS_LAUNCH_TOTAL_MS - the total time elapsed from the
start of async content process launch until the launch promise is
resolved and the ContentParent can be sent IPDL messages

* CONTENT_PROCESS_LAUNCH_MAINTHREAD_MS - the time consumed on the parent
process main thread during async content process launch; typically this
is due to ContentParent::Init.

* CHILD_PROCESS_LAUNCH_MS - for any kind of Gecko child process
(including plugins, GPU, etc.), the time taken in the common process
launch code (which is run off-main-thread)

The probes restricted to async content process launch don't have "async"
in the name because that will eventually become the only kind of content
process launch.

Depends on D8943

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:33 +00:00
Jed Davis 4fe96e3d18 Bug 1446161 - Asynchronously launch preallocated content processes using MozPromise. r=mccr8
There are several layers to this patch:

1. GeckoChildProcessHost now exposes a promise that's resolved when
the process handle is available (or rejected if launch failed), as a
nonblocking alternative to LaunchAndWaitForProcessHandle.

2. ContentParent builds on this with the private method
LaunchSubprocessAsync and the public method PreallocateProcessAsync;
synchronous launch continues to exist for the regular on-demand launch
path, for the time being.

3. PreallocatedProcessManager now uses async launch, and handles the new
"launch in progress" state appropriately.

Depends on D8942

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:31 +00:00
Jed Davis 231d5adb97 Bug 1446161 - Remove the earlier attempt at async launch. r=spohl,mccr8
The first attempt at async launch tried to hide the asynchrony inside
IPC, by making the process seem to be launched enough to construct new
channels and send it messages, and lazily blocking on the pid/handle.
Unfortunately, in practice we wind up needing the pid/handle immediately,
and this requirement is too deeply embedded in IPC for that to be viable.

(The alternative that will be used instead -- exposing process launch via
an explicitly asynchronous promise interface -- is made simpler by
Project Fission's upcoming rewrite of how the DOM requests new content
processes.)

Depends on D8941

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:24 +00:00
Jed Davis c88df116aa Bug 1446161 - Remove CONTENT_PROCESS_LAUNCH_TIME_MS telemetry. r=mconley,chutten
The CONTENT_PROCESS_LAUNCH_TIME_MS histogram is currently gathering times
from two different spans of the launch process and mixing them together;
it's at best a rough approximation of "launch time".

In addition, with async launch we'll want to gather different metrics
than for sync launch (see comments on bug 1474991).

So I'm removing this histogram and will replace it with separate sync and
async metrics in bug 1474991; I intend to land both bugs' patches at or
near the same time, so we won't have a gap in getting some kind of data.

Depends on D8940

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:17 +00:00
Jed Davis dc0b8a4787 Bug 1496608 - Don't leak GeckoChildProcessHost when a content process fails to launch. r=mccr8
Depends on D8939

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:07 +00:00
Jed Davis fe298e735f Bug 1488993 - Fix PreallocatedProcessManager blocker management (v2). r=mconley,smaug
This fixes/adjusts two things about how content process preallocation is blocked:

1. Processes aren't registered as blockers until after they launch
successfully.  The main goal is to not leak a blocker if launch fails,
but we don't need to block *while* launching synchronously, because this
all happens on the main thread.

2. Preallocated processes themselves aren't blockers.  The main goal
here is so that async preallocation doesn't need extra complexity to
avoid being blocked by itself when launch completes.  This mostly
doesn't affect actual behavior, because we currently support at most
one preallocated process.  The difference is the window from when the
process is sent its first PBrowserConstructor until when it's next idle,
where there is now no longer a blocker, but this seems to be relatively
short (~100ms) and we don't even try to launch a new process until at
least 1s + an idle runnable.

This patch does not explicitly RemoveBlocker in ActorDestroy like the
first attempt did, because it's unnecessary: this is handled in the
ipc:content-shutdown observer.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 20:42:00 +00:00
Mats Palmgren 0196497399 Bug 1510674 - Remove a few unnecessary #include "nsCSSFrameConstructor.h". r=emilio
There are no uses of any frame-ctor things in these files AFAICT.
2018-11-29 00:17:25 +01:00
Andreas Farre 3ccff85cdd Bug 1502330 - Create BrowsingContext with passed opener. r=qdot
By replacing nsWebBrowser's implementation of the
nsIBaseWindow.initWindow and nsIBaseWindow.create with a new static
nsWebBrowser::Create method we make it possible to pass arguments
directly when creating an nsWebBrowser, for example the opener
BrowsingContext. As a bonus we can do away with
nsWebBrowser::mInitInfo!

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

--HG--
extra : moz-landing-system : lando
2018-11-27 09:59:44 +00:00
Andreea Pavel ebe85db8e7 Backed out changeset ad857edac6a5 (bug 1498163) for failing devtools/client/performance/test/browser_perf-telemetry-04.js on a CLOSED TREE 2018-11-27 11:05:28 +02:00
Jan-Erik Rediger c6e72f0819 Bug 1498163 - Migrate external callers to the new snapshot API r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D12890

--HG--
extra : moz-landing-system : lando
2018-11-26 14:34:23 +00:00
Andreea Pavel 74cd2bf73e Backed out 8 changesets (bug 1446161, bug 1487287, bug 1488993, bug 1474991, bug 1496608) for very frequent automation.py crashes on a CLOSED TREE
Backed out changeset 8b1f88d7bfeb (bug 1487287)
Backed out changeset 8fa5e81ad801 (bug 1487287)
Backed out changeset 7a480161fa0f (bug 1474991)
Backed out changeset 80116391b7fe (bug 1446161)
Backed out changeset 1bdf64b29121 (bug 1446161)
Backed out changeset 37bf52f0e9cf (bug 1446161)
Backed out changeset 8ede2ebe6b7a (bug 1496608)
Backed out changeset cea43bc88c7a (bug 1488993)
2018-11-27 08:53:18 +02:00
Jed Davis 4a53512dbe Bug 1474991 - Add new and improved performance telemetry for child process launching. r=mccr8,mconley,janerik
This patch adds some telemetry histograms:

* CONTENT_PROCESS_LAUNCH_IS_SYNC - boolean, true if the content process
was launched synchronously (blocking the main thread)

* CONTENT_PROCESS_SYNC_LAUNCH_MS - the time consumed by sync launch;
the main thread will be busy or blocked for this entire time

* CONTENT_PROCESS_LAUNCH_TOTAL_MS - the total time elapsed from the
start of async content process launch until the launch promise is
resolved and the ContentParent can be sent IPDL messages

* CONTENT_PROCESS_LAUNCH_MAINTHREAD_MS - the time consumed on the parent
process main thread during async content process launch; typically this
is due to ContentParent::Init.

* CHILD_PROCESS_LAUNCH_MS - for any kind of Gecko child process
(including plugins, GPU, etc.), the time taken in the common process
launch code (which is run off-main-thread)

The probes restricted to async content process launch don't have "async"
in the name because that will eventually become the only kind of content
process launch.

Depends on D8943

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

--HG--
extra : moz-landing-system : lando
2018-11-22 00:06:17 +00:00
Jed Davis dececcae11 Bug 1446161 - Asynchronously launch preallocated content processes using MozPromise. r=mccr8
There are several layers to this patch:

1. GeckoChildProcessHost now exposes a promise that's resolved when
the process handle is available (or rejected if launch failed), as a
nonblocking alternative to LaunchAndWaitForProcessHandle.

2. ContentParent builds on this with the private method
LaunchSubprocessAsync and the public method PreallocateProcessAsync;
synchronous launch continues to exist for the regular on-demand launch
path, for the time being.

3. PreallocatedProcessManager now uses async launch, and handles the new
"launch in progress" state appropriately.

Depends on D8942

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

--HG--
extra : moz-landing-system : lando
2018-11-22 00:35:53 +00:00
Jed Davis 5379e8a375 Bug 1446161 - Remove the earlier attempt at async launch. r=spohl,mccr8
The first attempt at async launch tried to hide the asynchrony inside
IPC, by making the process seem to be launched enough to construct new
channels and send it messages, and lazily blocking on the pid/handle.
Unfortunately, in practice we wind up needing the pid/handle immediately,
and this requirement is too deeply embedded in IPC for that to be viable.

(The alternative that will be used instead -- exposing process launch via
an explicitly asynchronous promise interface -- is made simpler by
Project Fission's upcoming rewrite of how the DOM requests new content
processes.)

Depends on D8941

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

--HG--
extra : moz-landing-system : lando
2018-11-22 00:06:14 +00:00
Jed Davis 9c8dbd2530 Bug 1446161 - Remove CONTENT_PROCESS_LAUNCH_TIME_MS telemetry. r=mconley,chutten
The CONTENT_PROCESS_LAUNCH_TIME_MS histogram is currently gathering times
from two different spans of the launch process and mixing them together;
it's at best a rough approximation of "launch time".

In addition, with async launch we'll want to gather different metrics
than for sync launch (see comments on bug 1474991).

So I'm removing this histogram and will replace it with separate sync and
async metrics in bug 1474991; I intend to land both bugs' patches at or
near the same time, so we won't have a gap in getting some kind of data.

Depends on D8940

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

--HG--
extra : moz-landing-system : lando
2018-11-22 20:21:03 +00:00
Jed Davis 3ef7ede064 Bug 1496608 - Don't leak GeckoChildProcessHost when a content process fails to launch. r=mccr8
Depends on D8939

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

--HG--
extra : moz-landing-system : lando
2018-11-22 00:06:09 +00:00
Jed Davis 47d57882cd Bug 1488993 - Fix PreallocatedProcessManager blocker management (v2). r=mconley,smaug
This fixes/adjusts two things about how content process preallocation is blocked:

1. Processes aren't registered as blockers until after they launch
successfully.  The main goal is to not leak a blocker if launch fails,
but we don't need to block *while* launching synchronously, because this
all happens on the main thread.

2. Preallocated processes themselves aren't blockers.  The main goal
here is so that async preallocation doesn't need extra complexity to
avoid being blocked by itself when launch completes.  This mostly
doesn't affect actual behavior, because we currently support at most
one preallocated process.  The difference is the window from when the
process is sent its first PBrowserConstructor until when it's next idle,
where there is now no longer a blocker, but this seems to be relatively
short (~100ms) and we don't even try to launch a new process until at
least 1s + an idle runnable.

This patch does not explicitly RemoveBlocker in ActorDestroy like the
first attempt did, because it's unnecessary: this is handled in the
ipc:content-shutdown observer.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 00:06:07 +00:00
Ehsan Akhgari cc714b7adc Bug 1490811 - Part 1: Add a permission doorhanger for the storage access API r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D12467

--HG--
extra : moz-landing-system : lando
2018-11-26 21:23:16 +00:00
Mark Banner b1c872942c Bug 1508980 - Add more .eslintrc.js files for dom/ and update .eslintignore. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D12529

--HG--
extra : moz-landing-system : lando
2018-11-21 14:27:27 +00:00
Mike Conley 29879177ba Bug 1499465 - Don't collect KillHard crashes on Beta or Release. r=jld,gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D10968

--HG--
extra : moz-landing-system : lando
2018-11-20 21:34:36 +00:00
Andreea Pavel d8849bad00 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-20 07:12:30 +02:00
Razvan Maries 208d16134b Merge mozilla-inbound to mozilla-central a=merge 2018-11-20 07:03:17 +02:00
Ehsan Akhgari 68a4d46702 Bug 1507677 - Add nsIContentPermissionRequest.topLevelPrincipal r=baku
This is required for the storage access API permission prompt.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 01:52:47 +00:00
Tarek Ziadé 63637ef222 Bug 1497124 - Added some memory info in the performance counters - r=jya,jonco
Add some memory usage information to the Performance counters and make everything asynchronous.

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

--HG--
extra : moz-landing-system : lando
2018-11-19 22:51:12 +00:00
Lina Cambridge 2e957c8eaf Bug 1494713 - Implement a `GeckoViewHistory` backend. r=jchen,snorp,smaug
Differential Revision: https://phabricator.services.mozilla.com/D11290

--HG--
extra : moz-landing-system : lando
2018-11-16 17:32:02 +00:00
Lina Cambridge 69ee079fa0 Bug 1494713 - Pass the widget for the DocShell to `IHistory::VisitURI`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D11287

--HG--
extra : moz-landing-system : lando
2018-11-16 17:29:57 +00:00
Csoregi Natalia 7e0a887fad Backed out 2 changesets (bug 1500948) for multiple crashes, e.g. in 914521.html. CLOSED TREE
Backed out changeset 069d324080a5 (bug 1500948)
Backed out changeset 207746d120e9 (bug 1500948)
2018-11-28 21:06:40 +02:00