Description[tracing] Fix single-process detection logic of ChildTraceMessageFilter
Currently the instantiation of ChildTraceMessageFilter in
child_thread_impl.cc is guarded by a check on
CommandLine.HasSwitch(kSingleProcess)
The rationale is that in single-process mode we don't want to have any
message filter as the browser-side tracing will cover all the threads.
However, the aforementioned check is not complete, as it does not
covers the case of tests using the InProcessUtilityThreadHelper [1].
In those tests, the kSingleProcess flag is not present, but the
renderer is in-process anyways.
Replacing the the HasSwitch check in with IsInBrowserProcess(),
which covers also the latter case.
[1] for instance extensions/browser/sandboxed_unpacker_unittest.cc
BUG=474973
Committed: https://crrev.com/4950a30243ae4573b78033781830a113d220f938
Cr-Commit-Position: refs/heads/master@{#324276}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Fix DCHECK_EQ #
Messages
Total messages: 11 (3 generated)
|