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

5560 Коммитов

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