0
Commit Graph

15 Commits

Author SHA1 Message Date
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Ian Barkley-Yeung
34168a5b33 ChromeOS: Start stack sampler after sandboxing on renderer
Similar to
https://chromium-review.googlesource.com/c/chromium/src/+/3764862, on
ChromeOS, SandboxLinux::InitializeSandbox will AssertSingleThreaded.
Since the stack sampler starts a new thread, it must be created after
the sandbox is initialized.

BUG=b:214117401,chromium:1324337

Change-Id: I451e1297980f7bb0b77b238480eca0a7fcd40e44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3767428
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035343}
2022-08-16 03:05:48 +00:00
Xiaohan Wang
0ac63f839b content/renderer: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ie92c1cbd84164c169408b5539a0df878401c7d27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373892
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959399}
2022-01-15 00:06:36 +00:00
kdillon
7543416ee7 [scheduler] Initialize WTF before creating the MainThreadScheduler.
Creating objects USING_FAST_MALLOC in the MTS fail due to WTF being allocated and initialized after the main thread. This CL ensures that that happens before the MT is created fixing issues like crbug.com/584196.

Bug: 1058645
Change-Id: I6c53e7b5cd48532c2e5ff0d3313e911a5ef4fc6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103787
Commit-Queue: Katie Dillon <kdillon@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761573}
2020-04-22 19:21:54 +00:00
Simeon Anfinrud
52fd5e5cd2 [content] Remove Android debugging CHECKs in render thread.
These asserts are no longer actively being used for debugging.

When this is compiled on the Android component build, the linker
cannot find the extern bool declared by another shared library.
This patch disables the InProcessRenderThread checks, which were
intended for debugging in production, so that developers can at
least attempt to use the component build on Android.

Bug: Internal b/64440217
Bug: 514141
Test: chromecast internal Android component build
Change-Id: Iac24c87867e218f98c130677e6baff9142a7fe84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898812
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Simeon Anfinrud <sanfin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714138}
2019-11-11 03:12:13 +00:00
Sunny Sachanandani
e3e58250e1 Propagate renderer client id in single process mode
Renderer client id is propagated via command line flags, so in single
process mode RenderThreadImpl gets initialized with the default client
id of 1, whereas the browser allocates a globally unique client id for
each renderer.

Viz frame sinks are embedded in a hierarchy which identifies embedders
by their client ids.  So requests made by the renderer to embed other
surfaces are rejected by EmbeddedFrameSinkProviderImpl because the
client ids don't match.

This CL fixes that by propagating the client id from the browser to
RenderThreadImpl in single process mode, and includes related minor code
cleanup.

Bug: 1015988
Change-Id: I758f19df05ad6dc083e01e8cfc760f76ca1831a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869376
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708319}
2019-10-22 20:10:38 +00:00
Greg Kraynov
f5d6027c9b Remove MessageLoop from content::RenderThreadImpl.
It only needs main thread scheduler to initialize,
MessageLoop was unnecessary there.

Bug: 828835
Change-Id: I70235bbd06af1ca6c576cc77e3e4722a27225069
Reviewed-on: https://chromium-review.googlesource.com/1169211
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Greg Kraynov <kraynov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582125}
2018-08-10 12:28:51 +00:00
Gabriel Charette
08fd65309b Remove RenderThreadImpl dependency on MessageLoop::current().
Instead it now always has a MessageLoop* and is allowed to use APIs
which will soon no longer be exposed on MessageLoop::current().

This is a precusor cleanup extracted from
https://chromium-review.googlesource.com/c/chromium/src/+/957760/7
in the broader effort to restrict usage of MessageLoop::current().

R=haraken@chromium.org

Bug: 825327
Change-Id: I580fe360ff9630a5ffb40b89921c6889d449e67a
Reviewed-on: https://chromium-review.googlesource.com/986813
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548163}
2018-04-04 19:47:16 +00:00
fdoray
31cc6f8573 Add TaskScheduler initialization arguments to ChildProcess.
Previously, the constructor of ChildProcess called
ChildProcess::InitializeTaskScheduler() to initialize TaskScheduler.
RenderProcessImpl overrode this method to initialize TaskScheduler
with custom arguments. Unfortunately, the constructor of a base
class cannot call methods from a derived class.

This CL removes the virtual ChildProcess::InitializeTaskScheduler()
method. RnederProcessImpl passes its custom TaskScheduler
initialization arguments to the constructor of ChildProcess.

BUG=664996

Review-Url: https://codereview.chromium.org/2687903003
Cr-Commit-Position: refs/heads/master@{#449785}
2017-02-10 23:31:10 +00:00
torne
58dcbf9869 Try to diagnose blink reinitialisation in WebView.
WebView somehow ends up shutting down and reinitialising blink in the
same process sometimes, which isn't supported. We have no idea how to
reproduce this, so this change adds assertions that verify that we never
shut down InProcessRendererThread unless the browser is already being
shut down. WebView only exits by the process being SIGKILLed, so the
shutdown path is intended to be unreachable.

This is a temporary change that will be reverted once we've found the
stack that leads to the shutdown being initiated.

BUG=514141

Review-Url: https://codereview.chromium.org/1900513003
Cr-Commit-Position: refs/heads/master@{#391207}
2016-05-03 12:20:06 +00:00
avi
1023d01cf1 Switch to standard integer types in content/renderer/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1547073003

Cr-Commit-Position: refs/heads/master@{#366847}
2015-12-25 02:40:22 +00:00
hush
5380add908 Assign thread name to in_proc renderer and gpu thread.
This would be very helpful for analyzing traces.txt of ANR logs.

BUG=570819

Review URL: https://codereview.chromium.org/1518213002

Cr-Commit-Position: refs/heads/master@{#365953}
2015-12-18 00:42:37 +00:00
leon.han
2c0f9f1c87 Set listener task runner before connect channel.
Renderer main thread will run ChannelProxy::SetListenerTaskRunner()
to set listener task runner, but the task runner may be accessed on
IPC thread at the same time.
This CL is to fix the race condition.

TBR=nasko@chromium.org
BUG=479684

Review URL: https://codereview.chromium.org/1227303002

Cr-Commit-Position: refs/heads/master@{#338425}
2015-07-11 02:01:52 +00:00
morrita
c6238ab6b4 Get rid of ChannelInit::SetSingleProcessIOTaskRunner()
The globally-set TaskRunner doesn't work because some child
thread can run inside the browser process even when other
child threads run in their own processes.
For example, there is a configuration where GpuChildThread
being in-process while RenderThreadImpl isn't.

It is troublesome once non-renderer child processes adopt
ChannelMojo.

This CL eliminates the global in-process IO task runner
and instead, passes an IO runnner for each thread
if it is configured as an in-process mode.

Note that InProcessChildThreadParams object is introuced to
clarify that the parameter is for in-process mode.

This is a spin-off from https://codereview.chromium.org/960693003/.

R=jamesr@chromium.org, rockot@chromium.org, jam@chromium.org
BUG=377980

Review URL: https://codereview.chromium.org/987693005

Cr-Commit-Position: refs/heads/master@{#321047}
2015-03-18 01:49:26 +00:00
scottmg@chromium.org
8707caab1c Fix names of in-process threads, tidy gpu DEPS
Follow-up after http://crrev.com/217968 per comments on
https://chromiumcodereview.appspot.com/23235002/

R=jam@chromium.org
BUG=237249

Review URL: https://chromiumcodereview.appspot.com/23452016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221199 0039d316-1c4b-4281-b951-d872f2087c98
2013-09-04 16:41:30 +00:00