Commit e756b293 authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Commit Bot

headless: plumb --enable-thread-instruction-count to renderer process

R=skyostil, caseq

Bug: 925589
Change-Id: I88ac0fc3eaf748d661db296db9926424eb60e4cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637607
Auto-Submit: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665013}
parent 051408b9
......@@ -33,6 +33,8 @@
#include "headless/lib/headless_macros.h"
#include "net/base/url_util.h"
#include "net/ssl/client_cert_identity.h"
#include "printing/buildflags/buildflags.h"
#include "services/service_manager/sandbox/switches.h"
#include "storage/browser/quota/quota_settings.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/switches.h"
......@@ -248,6 +250,14 @@ void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches(
headless_browser_context_impl,
process_type, child_process_id);
}
#if defined(OS_LINUX)
// Processes may only query perf_event_open with the BPF sandbox disabled.
if (old_command_line.HasSwitch(::switches::kEnableThreadInstructionCount) &&
old_command_line.HasSwitch(service_manager::switches::kNoSandbox)) {
command_line->AppendSwitch(::switches::kEnableThreadInstructionCount);
}
#endif
}
std::string HeadlessContentBrowserClient::GetAcceptLangs(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment