0
Commit Graph

99 Commits

Author SHA1 Message Date
Bo Liu
ae5b6def06 Dump gpu process on establish channel timeout
Android has a browser-side timeout for establish channel which is
usually the  crash on the stable channel. This CL will try to perform
a DumpWithoutCrashing in the gpu process when this timeout happens to
gather more data.

Bug: 680777
Change-Id: I21e1701c359afc57e31a50403d59ba9a94a2baae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222919
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773783}
2020-06-01 19:44:51 +00:00
Lukasz Anforowicz
0d5c120800 Call DwoC synchronously from BrowserChildProcessHostImpl::OnMojoError.
This CL makes sure that reports of bad mojo messages are preserving the
callstack and the crash keys.  This is done by making sure that
DumpWithoutCrashing is called synchronously from
BrowserChildProcessHostImpl::OnMojoError.

The CL also opportunitically reduces code duplication related to
actually terminating a child process.  The duplicated code is extracted
into a new TerminateProcessForBadMessage private method and reused both
from OnMojoError and from TerminateOnBadMessageReceived.

Bug: 1062418
Change-Id: I8f5bf802e9aabec4d92ee9fd37c1c55012f1250f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106806
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751478}
2020-03-18 21:10:05 +00:00
Ken Rockot
a7f8fed28b Reland "Move Utility processes off Service Manager"
This reverts commit bfca6c8096.

Reason for revert: Reverting the revert which was only done make reverting an earlier CL possible. Earlier CL has been fixed and relanded.

Original change's description:
> Revert "Move Utility processes off Service Manager"
>
> This reverts commit 0a311ff4af.
>
> Reason for revert: breaks graphics on some Chrome OS devices.
>
> Original change's description:
> > Move Utility processes off Service Manager
> >
> > This migrates Utility processes to direct ChildProcess API usage instead
> > of bootstrapping IPC through the Service Manager.
> >
> > As this is the last remaining use of Service Manager IPC to bootstrap
> > Content child processes, this also rips out a bunch of infrastructure
> > that existed only to support that.
> >
> > Bug: 977637
> > Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
> > Commit-Queue: Ken Rockot <rockot@google.com>
> > Reviewed-by: Robert Sesek <rsesek@chromium.org>
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#718352}
>
> NOPRESUBMIT=true
>
> Bug: 1028852
> Bug: 977637
> Tbr: rockot@google.com
> Tbr: avi@chromium.org
> Tbr: rsesek@chromium.org
> Change-Id: I9b2e8ca44f5b6accc2d3718cab3cb547d979c230
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948402
> Commit-Queue: Shuhei Takahashi <nya@chromium.org>
> Reviewed-by: Shuhei Takahashi <nya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#720938}

TBR=avi@chromium.org,rockot@google.com,nya@chromium.org,rsesek@chromium.org

NOPRESUBMIT=true

Change-Id: I79ea423c97880366125abfb659dae223d0185023
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1028852, 977637
Tbr: rsesek@chromium.org
Tbr: avi@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949304
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721383}
2019-12-04 06:17:31 +00:00
Ken Rockot
8dda8888b4 Reland "Reland "Move Renderer processes off Service Manager""
This reverts commit d10a4fc5f2.

Reason for revert: Reverting the revert which was only done make reverting an earlier CL possible. Earlier CL has been fixed and relanded.

Original change's description:
> Revert "Reland "Move Renderer processes off Service Manager""
> 
> This reverts commit 881a65d746.
> 
> Reason for revert: breaks graphics on some Chrome OS devices.
> 
> Original change's description:
> > Move Renderer processes off Service Manager
> >
> > Migrates Renderer processes to use the simpler ChildProcess IPC
> > interface in place of deprecated Service Manager IPC.
> >
> > Support for preloaded files in service manifest definitions is
> > effectively removed in favor of explicit parameters on
> > BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> > snapshot files) has been migrated from manifest data to a simple map
> > definition, and it's used during renderer and utility process
> > launching.
> >
> > After this CL, only utility processes remain to be moved off of
> > Service
> > Manager IPC.
> >
> > NOPRESUBMIT=true
> >
> > Bug: 977637
> > Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> > Tbr: boliu@chromium.org
> > Tbr: yucliu@chromium.org
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> > Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> > Reviewed-by: Robert Sesek <rsesek@chromium.org>
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Commit-Queue: Ken Rockot <rockot@google.com>
> > Cr-Commit-Position: refs/heads/master@{#717920}
> 
> NOPRESUBMIT=true
> 
> Bug: 1028852
> Bug: 977637
> Tbr: rockot@google.com
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Tbr: mbarbella@chromium.org
> Tbr: rsesek@chromium.org
> Tbr: avi@chromium.org
> Change-Id: I30a52d825cc156b066d7c2ec455c8fb588a408af
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948663
> Commit-Queue: Shuhei Takahashi <nya@chromium.org>
> Reviewed-by: Shuhei Takahashi <nya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#720939}

TBR=avi@chromium.org,boliu@chromium.org,rockot@google.com,nya@chromium.org,mbarbella@chromium.org,rsesek@chromium.org,yucliu@chromium.org

Change-Id: I69de741d907abd790bdad3019abeeb9a8ca231aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1028852, 977637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949778
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721377}
2019-12-04 05:56:22 +00:00
Shuhei Takahashi
d10a4fc5f2 Revert "Reland "Move Renderer processes off Service Manager""
This reverts commit 881a65d746.

Reason for revert: breaks graphics on some Chrome OS devices.

Original change's description:
> Move Renderer processes off Service Manager
>
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
>
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process
> launching.
>
> After this CL, only utility processes remain to be moved off of
> Service
> Manager IPC.
>
> NOPRESUBMIT=true
>
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}

NOPRESUBMIT=true

Bug: 1028852
Bug: 977637
Tbr: rockot@google.com
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Tbr: mbarbella@chromium.org
Tbr: rsesek@chromium.org
Tbr: avi@chromium.org
Change-Id: I30a52d825cc156b066d7c2ec455c8fb588a408af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948663
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720939}
2019-12-03 13:35:16 +00:00
Shuhei Takahashi
bfca6c8096 Revert "Move Utility processes off Service Manager"
This reverts commit 0a311ff4af.

Reason for revert: breaks graphics on some Chrome OS devices.

Original change's description:
> Move Utility processes off Service Manager
>
> This migrates Utility processes to direct ChildProcess API usage instead
> of bootstrapping IPC through the Service Manager.
>
> As this is the last remaining use of Service Manager IPC to bootstrap
> Content child processes, this also rips out a bunch of infrastructure
> that existed only to support that.
>
> Bug: 977637
> Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
> Commit-Queue: Ken Rockot <rockot@google.com>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#718352}

NOPRESUBMIT=true

Bug: 1028852
Bug: 977637
Tbr: rockot@google.com
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Change-Id: I9b2e8ca44f5b6accc2d3718cab3cb547d979c230
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948402
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720938}
2019-12-03 13:33:33 +00:00
Ken Rockot
0a311ff4af Move Utility processes off Service Manager
This migrates Utility processes to direct ChildProcess API usage instead
of bootstrapping IPC through the Service Manager.

As this is the last remaining use of Service Manager IPC to bootstrap
Content child processes, this also rips out a bunch of infrastructure
that existed only to support that.

Bug: 977637
Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718352}
2019-11-22 23:51:31 +00:00
Ken Rockot
881a65d746 Reland "Move Renderer processes off Service Manager"
This is a reland of 45cef59a78

Original change's description:
> Move Renderer processes off Service Manager
>
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
>
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process launching.
>
> After this CL, only utility processes remain to be moved off of Service
> Manager IPC.
>
> NOPRESUBMIT=true
>
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}

NOPRESUBMIT=true

Bug: 977637
Change-Id: I9dd89104626ef73f81abd93c8a35310a2d6997a2
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Tbr: mbarbella@chromium.org
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930104
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#718334}
2019-11-22 22:49:07 +00:00
Ken Rockot
0885833dd1 Revert "Move Renderer processes off Service Manager"
This reverts commit 45cef59a78.

Reason for revert: breaks a fuzzing tool compile

Original change's description:
> Move Renderer processes off Service Manager
> 
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
> 
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process launching.
> 
> After this CL, only utility processes remain to be moved off of Service
> Manager IPC.
> 
> NOPRESUBMIT=true
> 
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}

TBR=avi@chromium.org,rockot@google.com,mbarbella@chromium.org,rsesek@chromium.org

Change-Id: I3fa67ad894cd5725ff71d59cadec2cebc4917952
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 977637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930102
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717937}
2019-11-22 01:06:50 +00:00
Ken Rockot
45cef59a78 Move Renderer processes off Service Manager
Migrates Renderer processes to use the simpler ChildProcess IPC
interface in place of deprecated Service Manager IPC.

Support for preloaded files in service manifest definitions is
effectively removed in favor of explicit parameters on
BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
snapshot files) has been migrated from manifest data to a simple map
definition, and it's used during renderer and utility process launching.

After this CL, only utility processes remain to be moved off of Service
Manager IPC.

NOPRESUBMIT=true

Bug: 977637
Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717920}
2019-11-22 00:20:58 +00:00
Ken Rockot
cbead33338 Move Tracing service off Service Manager
This removes Service Manager API dependencies from the Tracing service
and its clients.

A new TracingService mojom interface is introduced to own and control a
singleton Tracing service instance. This interface allows for client
registration and ConsumerHost binding.

The browser maintains a registry of active child processes, updated
explicitly by RenderProcessHostImpl and BrowserChildProcessHostImpl.
The registry is used to keep the Tracing service connected to all child
processes while it's running.

Bug: 977637
Change-Id: I7c67399fd03b78f68c997a26d89561fc71512cd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918311
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717489}
2019-11-21 04:35:47 +00:00
Ken Rockot
692493fccf Move NaCl processes off Service Manager
This reverts NaCl processes to use only the Legacy IPC Channel (over
Mojo) for all IPC, rather than bootstrapping them as Service Manager
service processes just so they can then bind an IPC Channel.

To support this, Browser/ChildProcessHost is modified to support such
processes if so configured at construction time. This "legacy mode" for
ChildProcessHost can be removed if/when NaCl processes are removed from
Chrome.

Some light groundwork is put down for further refactoring as well:
namely the Mojo invitation ownership is lifted into ChildProcessHost,
and a ChildProcessHost::IpcMode enum is introduced to select what mode
different process types will operate in. Follow-up CLs will introduce
a new IPC mode and incrementally port all other process types to it.

IpcMode::kServiceManager will be removed in the near future, and
IpcMode itself will be removed completely (bringing ChildProcessHost
back down to only one mode of operation) once kLegacy can be removed
too.

Bug: 977637
Change-Id: I1abec0fe8ad7b2a18bddcdd467657447c641370e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915320
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#716345}
2019-11-18 22:36:57 +00:00
Ken Rockot
d7148c2084 Move Resource Coordinator off Service Manager (reland)
Original CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1769102

PS2 is the original CL rebased. Diff PS2->PS11 to see the one-line fix
for bug 1000327. This is applied in addition to the base change in
https://chromium-review.googlesource.com/c/chromium/src/+/1810036 to fix
a more general race condition in render process host reuse.

This moves the Resource Coordinator Service off of Service Manager APIs
in favor of direct Mojo interface usage. A public browser API is exposed
to give content clients access to the service connection.

NOPRESUBMIT=true

Bug: 977637, 1000327
Change-Id: Id3742584f25b3891386e62789db1b4121b0d3007
TBR: dcheng@chromium.org
TBR: avi@chromium.org
TBR: yucliu@chromium.org
TBR: torne@chromium.org
TBR: erikchen@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809098
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#697684}
2019-09-18 18:00:59 +00:00
François Doray
dfc6e947e5 Revert "Move Resource Coordinator off Service Manager"
This reverts commit 97afa4bd5c.

Reason for revert: https://crbug.com/1000327 - Causes failures in SelectFileDialogExtensionBrowserTest.*(CreateAndDestroy|DestroyListener)

Bug: 1000327

Original change's description:
> Move Resource Coordinator off Service Manager
>
> This moves the Resource Coordinator Service off of Service Manager APIs
> in favor of direct Mojo interface usage. A public browser API is exposed
> to give content clients access to the service connection.
>
> Bug: 977637
> Change-Id: I898228ad49e3be405e0bb746d00c23d057658680
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769102
> Commit-Queue: Ken Rockot <rockot@google.com>
> Reviewed-by: François Doray <fdoray@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Yuchen Liu <yucliu@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Erik Chen <erikchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#691742}

TBR=avi@chromium.org,dcheng@chromium.org,rockot@google.com,fdoray@chromium.org,torne@chromium.org,erikchen@chromium.org,yucliu@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

No-Presubmit: true
Bug: 977637
Change-Id: I225de1fa7214e3d4cb1dfe727c9c8e80d31bdffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1782500
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692765}
2019-09-03 19:14:27 +00:00
Ken Rockot
97afa4bd5c Move Resource Coordinator off Service Manager
This moves the Resource Coordinator Service off of Service Manager APIs
in favor of direct Mojo interface usage. A public browser API is exposed
to give content clients access to the service connection.

Bug: 977637
Change-Id: I898228ad49e3be405e0bb746d00c23d057658680
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769102
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691742}
2019-08-29 18:55:33 +00:00
Ken Rockot
8322a04ad5 Move Shape Detection off Service Manager
This service is run in the GPU process and its interfaces are bound only
by the browser, brokering unfiltered requests from renderers. Logic is
simplified by removing all dependencies on Service Manager APIs, in
favor of the browser's brokering logic talking directly to
GpuProcessHost and maintaining a persistent connection to the service.

Bug: 977637
Change-Id: I9047889de659b8ff61df4bae40867d3b81d8127f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761689
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688616}
2019-08-20 18:02:00 +00:00
Ken Rockot
4f8c3c3d0a Move Font Service off Service Manager
This removes all Service Manager dependencies from the Font Service in
favor of direct Mojo interface connection. The browser maintains an
internal API for connecting new pipes to the in-process service
instance.

This requires ChildProcessHostImpl to support the BindHostReceiver()
mojom API for non-renderer child processes, as well as
plumbing it up to UtilityProcessHost and PluginProcessHost. Rather than
generic support through Service Manager with manifest-based filtering,
each process host type explicitly implements its support for binding the
FontService interface when requested by the child process.

This CL also fixes some thread-safety bugs in the existing Font Service
client library code which could cause the client endpoint and/or the
WeakPtrFactory to be destroyed on the wrong sequence. FontServiceThread
has been refactored to make the WeakPtrFactory unnecessary, and the
client endpoint is now always destroyed on the correct sequence.

Finally, this changes font_service_unittests to use an in-process
background service instance rather than using the Service Manager to
spin up a dedicated service executable.

Bug: 977637
Change-Id: I3efdafb06ae2d79e9cb149675e49c29e30d0cad6
Test: for good measure, manually tested PDF rendering
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756435
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687694}
2019-08-16 16:32:33 +00:00
Jeremy Roman
3bca4bf820 Use in-class initializers for base::WeakPtrFactory in content/.
Generated by: https://chromium-review.googlesource.com/c/chromium/src/+/1689216

Bug: 981415
Change-Id: I363f81e8c17cabfb6031666ca0846bcfcbf97b78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1693602
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676281}
2019-07-11 03:41:25 +00:00
Lucas Furukawa Gadani
0d5e714121 Remove more const interfaces from content/public.
Bug: 908139
Change-Id: Ib362d71f610a90fe094f3c4ed892ef578ebf85aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566417
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652379}
2019-04-18 23:00:50 +00:00
Min Qin
eb96190962 Warm up the network service process on Android
This CL warms up the child process connection to the network service
when it is running OOP.
This will hopefully reduce the delay of the first navigation commit.

BUG=932566

Change-Id: I40494c499aeb4f6cd47032adee078170075f434d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1516724
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641433}
2019-03-16 08:08:22 +00:00
Alex Ilin
30e7d06cc9 metrics: Convert metrics allocators to the new shared memory API
This is a refactoring CL that switches all usages of obsolete
base::SharedMemory and base::SharedMemoryHandle classes in metrics allocators
to the new shared memory API.

No behavioral change is expected.

The browser process creates one shared memory allocator per child process. The
shared memory is writable both in the parent and the child processes. Thus, the
base::WritableSharedMemoryRegion class is used.

Bug: 920183
Change-Id: I31df2ca2eefb606b053e255cf06a91a0d3e1038c
Reviewed-on: https://chromium-review.googlesource.com/c/1477121
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634158}
2019-02-21 12:24:53 +00:00
Maggie Chen
47b8dc1d74 Fix duplicate command line switches in GPU process
AppendExtraCommandLineSwitches was called twice during GPU process launch and
it caused some duplicate command line switches in GPU process.
In GpuProcessHost::LaunchGpuProcess, the second AppendExtraCommandLineSwitches
call was from BrowserChildProcessHostImpl::Launch().

The solution is to divide BrowserChildProcessHostImpl::Launch() into two parts
- AppendExtraCommandLineSwitches and LaunchWithoutExtraComandLineSwitches. The
GPU process will now call LaunchWithoutExtraComandLineSwitches to avoid running
AppendExtraCommandLineSwitches twice.

Bug:899361

Change-Id: I4ddfeaaf9624aac68e9ab68aabac6ed4e83f7a03
Reviewed-on: https://chromium-review.googlesource.com/c/1316660
Commit-Queue: Maggie Chen <magchen@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607043}
2018-11-10 00:12:34 +00:00
Francois Doray
884da02998 Content: Store a base::Process instead of a handle in ChildProcessData.
Benefits:
- No need to create a one-off base::Process instance, which involves
  duplicating the handle, to perform operations on the process.
     Existing use case: https://chromium-review.googlesource.com/c/chromium/src/+/1298345/6/chrome/browser/ui/hung_plugin_tab_helper.cc
     Upcoming use case: https://chromium-review.googlesource.com/c/chromium/src/+/1273257
- No need to use #ifdef in child_process_data.h/.cc.
- Less lines of codes overall.

Bug: 885293
Change-Id: I5f3434c1b0dc3985733764931d9d791dd60f2589
Reviewed-on: https://chromium-review.googlesource.com/c/1298345
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604059}
2018-10-30 23:45:58 +00:00
Ken Rockot
026afc357b Mojo: Delete OutgoingBrokerClientInvitation
This EDK type is replaced with OutgoingInvitation in the public API.
All remaining consumers of the EDK type are migrated to the public
API in this CL, and the EDK type is deleted.

Bug: 844763
Change-Id: Ifc7bc48253bb725e7ce5e23fbb64c03d7c1ff74f
Reviewed-on: https://chromium-review.googlesource.com/1073079
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564180}
2018-06-04 19:19:18 +00:00
Will Harris
edb011f9c5 Set a consistent browser child process name for metrics.
Add new "metrics name" which is non-localized and will be used for
recording metrics for child processes. The name is taken from the
mojo service name for mojo processes, or can be custom set.

BUG=767906

Change-Id: Ibcfa314fe4c475256f76a4369d17e63e32050195
Reviewed-on: https://chromium-review.googlesource.com/1072789
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563777}
2018-06-01 20:28:44 +00:00
Bo Liu
0d2a232ec8 Add ChildProcessTerminationInfo
Combine termination status and exit code into a single struct. And then
add two Android-only fields: oom protection binding, and intentional
kill.

Update the code in ChildProcessLauncher and ChildProcessLauncherHelper
to populate Info instead, including renaming methods.

Other than populating the new fields on Android, this is a no-op change
on all platforms.

Bug: 693484
Change-Id: I1ce01cbf1e81a125b34604657d6abcb6a02e0556
Reviewed-on: https://chromium-review.googlesource.com/1013225
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551894}
2018-04-19 00:18:09 +00:00
Ehsan Chiniforooshan
f192e8a25e Fix startup tracing in renderers
Startup tracing is broken for several reasons:

1. When renderers are forked from a Zygote process, --trace-startup
   flags are ignored.

2. In a non-zygote mode, when --trace-config-file is used, it is
   ignored since sandboxed renderers do not have access to file
   system.

3. Another bug is that --trace-config-file is always passed to
   renderer processes, even if they are created after tracing is
   stopped, e.g. via DevTools.

4. Startup tracing flags are not passed along to the ppapi plugin
   and utility processes.

This CL fixes 1, 3, and 4 and partially fixes 2 by passing categories
and record mode of a trace config file using flags to sandboxed
renderer processes so that they do not need to ready these information
from a file. Obviously, this does not work for complex trace config
files, but should be enough to resolve existing telemetry issues
(please see discussions in crbug.com/809833).

Bug: 809833
Change-Id: I6723664fd477117262763476c0a86fd6881b94a7
Reviewed-on: https://chromium-review.googlesource.com/972145
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545950}
2018-03-27 03:18:20 +00:00
Lei Zhang
e38484f099 Delete CanShutdown() from content::ChildProcessHostDelegate.
It has no callers, except from content::BrowserChildProcessHostDelegate,
which also has no callers for its CanShutdown() method.

Change-Id: I9070bc84adbb2f1221f6e7822420a1e743088b84
Reviewed-on: https://chromium-review.googlesource.com/928098
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538156}
2018-02-21 18:36:53 +00:00
Nico Weber
43ddd7a3af Remove uses NON_EXPORTED_BASE now that it's a no-op.
CL generated by

   git grep -l NON_EXPORTED_BASE | xargs sed -i 's/NON_EXPORTED_BASE(\([^)]*\))/\1/g'
   git cl format

I'm not changing compiler_specific.h itself in this cl, to keep the revert
small if the subsequent removal of the actual macro should break something.

Bug: 752837
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I53d6460e592b91a173f7aa55dfdb05631e51e5f7
Reviewed-on: https://chromium-review.googlesource.com/614703
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494486}
2017-08-15 19:19:27 +00:00
Wei-Yin Chen (陳威尹)
223326c134 Retain types used by UMA_HISTOGRAM_ENUMERATION
There will be a stricter type checking in UMA_HISTOGRAM_ENUMERATION:
if |boundary| is enum, |sample| must be an enum as well.

One common type of violation is unnecessary casting to int. This CL
fixes them by retaining the types.

Bug: 661401

TBR: bartfab@chromium.org,dtrainor@chromium.org,xiyuan@chromium.org,cpu@chromium.org,boliu@chromium.org,piman@chromium.org,msw@chromium.org,sdefresne@chromium.org,mmenke@chromium.org
Change-Id: Ib1294421896e73ba89a2c294022697686fee3199
Reviewed-on: https://chromium-review.googlesource.com/575380
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Alexei Svitkine (slow) <asvitkine@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488551}
2017-07-21 02:08:28 +00:00
Ken Rockot
ea1716a00c Update EDK IPC API
This continues the replacement of the inaccurate EDK API model of
"parent" and "child" process relationships with something that more
accurately reflects the behavior of the system. This terminology
change only affects the public API for now, so the underlying
protocol details remain poorly named.

Rather than implying that a process may only be introduced into the
process graph by its parent, and rather than giving the developer a
series of public, stateless API functions to set up interprocess
connections, this CL introduces the concept of an "invitation" to join a
group of interconnected Mojo embedders.

If a process is acting as the broker, or is itself already a broker
client, it may send an OutgoingBrokerClientInvitation over some OS IPC
resource (e.g. an OS pipe). The target process can then construct an
IncomingBrokerClientInvitation from some corresponding OS IPC resource
(e.g. the other end of that pipe) which has been shared with it
out-of-band. This object can be used to accept the invitation and thus
join the process graph as a new broker client.

Cross-process bootstrap message pipes may be "attached" to an invitation
by the sender and "extracted" by the accepting process.

Note that in order to facilitate the new pipe attachment API which
encourages user-selected message pipe names (rather than much less
convenient unguessable nonces that require more out-of-band
communication), port reservations made on behalf of outgoing invitations
are now strictly scoped to the invitation target, allowing names to be
reused for different invitations and avoiding any risk of a misbehaving
process claiming someone else's port.

The vast majority of changes outside //mojo here are strictly aesthetic
adaptations to the new API and do not constitute any kind of behavioral
change.

Follow-up CLs will replace usage of SetParentPipeHandle* and
CreateChildMessagePipe with IncomingBrokerClientInvitation API usage,
and eliminate the peer-connection-related functions with a
new stateful PeerConnection object; thus completing the public API
changes necessary to support the transition to a more flexible
transport protocol selection.

BUG=696031

Change-Id: I4b9a8f76fc8457b31a3dc1390ecec3fc0235b732
Reviewed-on: https://chromium-review.googlesource.com/498972
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#470863}
2017-05-11 07:38:59 +00:00
ben
a06f7d6c58 Convert content ConnectionFilter to OnBindInterface.
- This was a pretty viral change, sorry about the size.
  - Specifically, had to make all the *Host classes use
    BindInterface() to request interfaces from their children, thus
    replacing their GetRemoteInterfaces() accessor with a
    BindInterface() call.
- This also has to eliminate any use of service_manager::Connection
  as an indicator of the lifetime of the connection, hence the
  introduction of child.mojom as a means of monitoring the lifetime
  of the renderer connection.
- I had to tweak the expectations of the EmbeddedWorkerInstance test
  as queuing order changed slightly with the new BindInterface mocking.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2766263009
Cr-Commit-Position: refs/heads/master@{#461826}
2017-04-04 20:48:52 +00:00
boliu
9fb97fd052 Remove BrowserChildProcessHostImpl::SetBackgrounded
It's not used.

Review-Url: https://codereview.chromium.org/2752863002
Cr-Commit-Position: refs/heads/master@{#457230}
2017-03-15 22:13:32 +00:00
rockot
1039b82bda Mojo EDK: Add safe process connection API
Replaces ad hoc ChildProcessLaunched etc functions and "child tokens"
with a scoping PendingProcessConnection object. This encapsulates the
concept of a process to which we intend to connect (e.g. so we can start
vending message pipe handles for it) but which may not yet be reachable,
and it ensures that any associated resources are reliably cleaned
up in the event that we never actually connect to the process.

This API also begins an intentional departure from the now-inaccurate
naming conventions of "parent" and "child" used at the EDK layer to
refer to some relative process relationships.

BUG=682794

Review-Url: https://codereview.chromium.org/2680973006
Cr-Commit-Position: refs/heads/master@{#449457}
2017-02-09 23:19:41 +00:00
sadrul
6c5aed8c3c content/gpu: Set up a mojom connection between browser and gpu.
Set up a mojom connection for content-browser to talk to content-gpu
through the mojom.GpuMain interface. Subsequent CLs will add code to
allow chrome-browser to set up a mojom.GpuService connection through
GpuMain to the gpu process. This GpuService will replace the existing
chrome-ipc messages between chrome-browser and chrome-gpu.

BUG=643746, 630895

Review-Url: https://codereview.chromium.org/2625933002
Cr-Commit-Position: refs/heads/master@{#443044}
2017-01-11 23:11:44 +00:00
sadrul
73f39a6659 content: Change how a bad message from a child is logged.
Instead of always logging the message ID, log a custom error string.
This is necessary for when the messages are converted to mojo messages,
where the messages do not have a corresponding ID.

BUG=643746

Review-Url: https://codereview.chromium.org/2624613003
Cr-Commit-Position: refs/heads/master@{#442790}
2017-01-11 04:07:24 +00:00
jcivelli
d20cc0bc63 Making the ownership of parameters in BrowserChildProcessHost::Launch and
ChildProcessLauncher::Launch() explicit.

BUG=675294

Review-Url: https://codereview.chromium.org/2585963002
Cr-Commit-Position: refs/heads/master@{#440333}
2016-12-22 03:53:47 +00:00
sammc
2b0375b642 Change the NaCl loader and broker processes to use the ServiceManager.
This is the first child process outside of content to be connected to
the ServiceManager so this CL adds a way for content embedders to
provide additional service manifests via ContentBrowserClient. This
would introduce an unnecessary string copy when obtaining service
manifest overlays, so this changes that API to take a StringPiece.

BUG=666605
TBR=kmarshall@chromium.org

Review-Url: https://codereview.chromium.org/2501913002
Cr-Commit-Position: refs/heads/master@{#440299}
2016-12-22 01:29:38 +00:00
ke.he
bef9909734 Decouple Power Monitor from //content.
Move power monitor implmentations from //content into //device/power_monitor
Unittests are also moved from content_unittests target to device_unittests.

BUG=647247

Review-Url: https://codereview.chromium.org/2460823002
Cr-Commit-Position: refs/heads/master@{#431518}
2016-11-11 07:55:17 +00:00
ke.he
19b5e6a89d Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process
Mojoify PoweMonitorMessageBroadcaster is the first step of "Decoupling Power
Monitor from //Content".

PowerMonitorMessageBroadcaster sends messages to both RenderProcess and other
ChildProcess. This CL Mojoifies the messages PowerMonitorMsg_PowerStateChange,
PowerMonitorMsg_Suspend, and PowerMonitorMsg_Resume. To do so we introduce the
PowerMonitorClient Mojo interface and change the PowerMonitorBroadcastSource to
implement the interface.

To avoid configure PowerMonitorClientPtr separately in {child,render}_process_
host_impl.cc, we add the PowerMonitor mojo interface, and add the
BrowserChildProcessHost::ConnectionFilterImpl so it can register the mojo
interface implementation in BrowserChildProcessHostImpl side.

Unit tests for PowerMonitorMessageBroadcaster and PowerMonitorBroadcastSource
are changed accordingly.

Followup will decouple PowerMonitorMessageBroadcaster and
PowerMonitorBroadcastSource from //Content.

BUG=647247

Review-Url: https://codereview.chromium.org/2433203003
Cr-Commit-Position: refs/heads/master@{#427965}
2016-10-27 08:50:50 +00:00
lawrencewu
0b496492de Use SharedPersistentMemoryAllocator to share field trial state
Change the method by which we share field trial state from using a
SharedMemory class to SharedPersistentMemoryAllocator. Adds this
allocator to the base::FieldTrialList singleton, so there is only one copy
of this state on the browser process vs. a copy for each process host
which is how it currently works (from
https://codereview.chromium.org/2365273004/)

BUG=653874

Review-Url: https://codereview.chromium.org/2412113002
Cr-Commit-Position: refs/heads/master@{#427378}
2016-10-25 16:31:27 +00:00
rockot
400ea35b5b Rename shell namespace to service_manager
Presubmit skipped to avoid errors being triggered by things which
aren't actually changing here.

Strictly a rename CL.

BUG=None
R=ben@chromium.org
NOPRESUBMIT=True
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2420253002
Cr-Commit-Position: refs/heads/master@{#425570}
2016-10-15 19:17:26 +00:00
lawrencewu
2c93082dcc Initial implementation for sharing field trial state (win)
This plumbs the field trial state string from the gpu and renderer host
processes and puts it in shared memory, passes the shared memory handle
(and length) via a command-line flag to the child, and the child will
initialize it there.

BUG=131632

Review-Url: https://codereview.chromium.org/2365273004
Cr-Commit-Position: refs/heads/master@{#425013}
2016-10-13 13:56:27 +00:00
ben
d32292b728 Rename a bunch of Mojo Application stuff to reference Services.
. MojoShellConnection -> ServiceManagerConnection
. MojoChildConnection -> ChildConnection
. EmbeddedApplicationRunner -> EmbeddedServiceRunner
. *MojoApplication* -> *Service*

R=rockot@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2398783002
Cr-Commit-Position: refs/heads/master@{#423757}
2016-10-07 00:24:12 +00:00
bcwhite
b58a5fe78a Use persistent memory for receiving metrics from sub-processes.
This allows metrics to survive and be collected even if a
subprocess terminates before reporting.

Only the GPU process is monitored with this CL but it should
be trivial to add the remaining ones going forward.

BUG=546019

Review-Url: https://codereview.chromium.org/2224063002
Cr-Commit-Position: refs/heads/master@{#413452}
2016-08-22 16:28:56 +00:00
rockot
da98879041 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
Review-Url: https://codereview.chromium.org/2221153003
Cr-Original-Commit-Position: refs/heads/master@{#410937}
Cr-Commit-Position: refs/heads/master@{#413232}
2016-08-19 20:48:34 +00:00
foolip
83cff6863f Revert of Establish MojoChildConnection from BrowserChildProcessHostImpl (patchset id:190001 of https://codereview.chromium.org/2221153003/ )
Reason for revert:
ContentBrowserTest.BrowserCrashCallStack/RendererCrashCallStack are failing on
"Linux Tests (dbg)(1)" and "Linux Tests (dbg)(1)(32)" since this CL. Reproduced
locally and bisected to "Establish MojoChildConnection from
BrowserChildProcessHostImpl", also verified that reverting it on master locally
fixes the problem.

When it fails, the tests stall for a long time before failing. Sample from bot:

ContentBrowserTest.RendererCrashCallStack (run ):
[ RUN      ] ContentBrowserTest.RendererCrashCallStack
[11795:11795:0810/064214:8507100974:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[11795:11795:0810/064214:8507101034:WARNING:audio_manager.cc(278)] Multiple instances of AudioManager detected
Xlib:  extension "RANDR" missing on display ":9".
BrowserTestBase signal handler received SIGTERM. Backtrace:
 0x7fdba1ca413e base::debug::StackTrace::StackTrace()
 0x00000145ffaa content::(anonymous namespace)::DumpStackTraceSignalHandler()
 0x7fdb929cf0b0 <unknown>
 0x7fdb92d65d2b __libc_read
 0x7fdba1db7e42 base::GetAppOutputInternal()
 0x7fdba1db7ff6 base::GetAppOutputAndError()
 0x000000993436 content::ContentBrowserTest_RendererCrashCallStack_Test::RunTestOnMainThread()
 0x00000144f6ae content::ContentBrowserTest::RunTestOnMainThreadLoop()
 0x00000145fd24 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
 0x0000005b969d _ZN4base8internal13FunctorTraitsIMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEvE6InvokeIPS6_JEEEvS8_OT_DpOT0_
 0x0000005b95f1 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN4mojo13StrongBindingIN6device14BatteryMonitorEEEFvvEJPS8_EEEvOT_DpOT0_
 0x000001461247 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x0000014611ac _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
 0x0000005b971e base::Callback<>::Run()
 0x0000015920a8 content::ShellBrowserMainParts::PreMainMessageLoopRun()
 0x7fdba3457031 content::BrowserMainLoop::PreMainMessageLoopRun()
 0x7fdba29ee2bd _ZN4base8internal13FunctorTraitsIMN4mojo10BindingSetIN7content5mojom14ProcessControlEE7ElementEFvvEvE6InvokeIPS8_JEEEvSA_OT_DpOT0_
 0x7fdba345f091 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMN7content15BrowserMainLoopEFivEJPS5_EEEiOT_DpOT0_
 0x7fdba345f037 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
 0x7fdba345ef9c _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
 0x7fdba29ee36e base::Callback<>::Run()
 0x7fdba3ef057b content::StartupTaskRunner::RunAllTasksNow()
 0x7fdba3455033 content::BrowserMainLoop::CreateStartupTasks()
 0x7fdba346164d content::BrowserMainRunnerImpl::Initialize()
 0x000001541fc4 ShellBrowserMain()
 0x000001521e46 content::ShellMainDelegate::RunProcess()
 0x7fdba5057e3b content::RunNamedProcessTypeMain()
 0x7fdba505a172 content::ContentMainRunnerImpl::Run()
 0x7fdba5056f42 content::ContentMain()
 0x00000145fa46 content::BrowserTestBase::SetUp()
 0x00000144f52d content::ContentBrowserTest::SetUp()
 0x0000016a05da testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x000001691b0e testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x0000016868a3 testing::Test::Run()
 0x000001687098 testing::TestInfo::Run()
 0x00000168763a testing::TestCase::Run()
 0x00000168c98c testing::internal::UnitTestImpl::RunAllTests()
 0x0000016a4d6a testing::internal::HandleSehExceptionsInMethodIfSupported<>()
 0x0000016931ee testing::internal::HandleExceptionsInMethodIfSupported<>()
 0x00000168c62f testing::UnitTest::Run()
 0x0000014d1d11 RUN_ALL_TESTS()
 0x0000014d0bc2 base::TestSuite::Run()
 0x00000145edcc content::ContentTestLauncherDelegate::RunTestSuite()
 0x00000149b712 content::LaunchTests()
 0x00000145ec28 main
 0x7fdb929ba7ed __libc_start_main
 0x0000005612c5 <unknown>

Original issue's description:
> Establish MojoChildConnection from BrowserChildProcessHostImpl
>
> Rather than have individual BrowserChildProcessHostImpl users
> create their own connection, this moves all that junk into BCPHI
> and allows its users to configure it with a service name and
> instance ID.
>
> Also changes ChildProcessHost to support ChannelMojo connection
> via remote interfaces provided by its delegate, and uses this
> in conjunction with the BCPHI changes. Eliminates one more use
> of kMojoChannelToken.
>
> BUG=623396
> R=ben@chromium.org
>
> Committed: https://crrev.com/8efa71b85282fb4df1d3836a20d086d223df714f
> Cr-Commit-Position: refs/heads/master@{#410937}

TBR=ben@chromium.org,rockot@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=623396

Review-Url: https://codereview.chromium.org/2230283003
Cr-Commit-Position: refs/heads/master@{#411039}
2016-08-10 14:53:18 +00:00
rockot
8efa71b852 Establish MojoChildConnection from BrowserChildProcessHostImpl
Rather than have individual BrowserChildProcessHostImpl users
create their own connection, this moves all that junk into BCPHI
and allows its users to configure it with a service name and
instance ID.

Also changes ChildProcessHost to support ChannelMojo connection
via remote interfaces provided by its delegate, and uses this
in conjunction with the BCPHI changes. Eliminates one more use
of kMojoChannelToken.

BUG=623396
R=ben@chromium.org

Review-Url: https://codereview.chromium.org/2221153003
Cr-Commit-Position: refs/heads/master@{#410937}
2016-08-10 03:11:50 +00:00
hugoh
26c57658a5 Remove unused includes of shell::InterfaceRegistry
This is a follow-up to:
https://codereview.chromium.org/2201183003/

Review-Url: https://codereview.chromium.org/2207873002
Cr-Commit-Position: refs/heads/master@{#409776}
2016-08-04 14:12:56 +00:00
ben
68ed6b51f5 Remove outgoing interface registry on RPH
R=rockot@chromium.org

Review-Url: https://codereview.chromium.org/2201183003
Cr-Commit-Position: refs/heads/master@{#409462}
2016-08-03 05:25:15 +00:00