Commit ec7d2855 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Enable -Wunreachable-code in Fuchsia builds.

Depends on https://chromium-review.googlesource.com/c/angle/angle/+/2112281

Bug: 346399
Change-Id: I6bf27dc15303c207be0ae85dd3256af217db005b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111833Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752299}
parent ad56b5e4
......@@ -1591,7 +1591,8 @@ config("chromium_code") {
# TODO(thakis): Enable this more often, https://crbug.com/346399
# use_libfuzzer: https://crbug.com/1063180
if (!is_nacl && target_os == "linux" && !use_libfuzzer) {
if (!is_nacl && !use_libfuzzer &&
(target_os == "fuchsia" || target_os == "linux")) {
cflags += [ "-Wunreachable-code" ]
}
......
......@@ -74,8 +74,9 @@ void WebContentRunner::StartComponent(
this,
std::make_unique<base::fuchsia::StartupContext>(std::move(startup_info)),
std::move(controller_request));
if (BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT) != 0)
component->EnableRemoteDebugging();
#if BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT) != 0
component->EnableRemoteDebugging();
#endif
component->StartComponent();
component->LoadUrl(url, std::vector<fuchsia::net::http::Header>());
RegisterComponent(std::move(component));
......
......@@ -42,10 +42,10 @@ int main(int argc, char** argv) {
base::FilePath(base::fuchsia::kPersistedDataDirectoryPath)));
CHECK(create_context_params.data_directory());
if (BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT) != 0) {
create_context_params.set_remote_debugging_port(
BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT));
}
#if BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT) != 0
create_context_params.set_remote_debugging_port(
BUILDFLAG(WEB_RUNNER_REMOTE_DEBUGGING_PORT));
#endif
WebContentRunner runner(
std::move(create_context_params),
......
......@@ -167,15 +167,16 @@ void ThreadCPUThrottler::ThrottlingThread::Throttle() {
}
void ThreadCPUThrottler::ThrottlingThread::Start() {
#ifdef USE_SIGNALS
#if defined(USE_SIGNALS) || defined(OS_WIN)
#if defined(USE_SIGNALS)
InstallSignalHandler();
#elif !defined(OS_WIN)
LOG(ERROR) << "CPU throttling is not supported.";
return;
#endif
if (!base::PlatformThread::Create(0, this, &throttling_thread_handle_)) {
LOG(ERROR) << "Failed to create throttling thread.";
}
#else
LOG(ERROR) << "CPU throttling is not supported.";
#endif
}
void ThreadCPUThrottler::ThrottlingThread::Sleep(base::TimeDelta duration) {
......
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