Skip setting thread priorities in NaCl.
Fixes Chromium build since PlatformThread is now built under NaCl.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1472083002 .
Cr-Commit-Position: refs/heads/master@{#10777}
diff --git a/webrtc/base/platform_thread.cc b/webrtc/base/platform_thread.cc
index 02ec3af..a0e37ef 100644
--- a/webrtc/base/platform_thread.cc
+++ b/webrtc/base/platform_thread.cc
@@ -202,14 +202,16 @@
bool PlatformThread::SetPriority(ThreadPriority priority) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
-#if defined(WEBRTC_WIN)
- return thread_ && SetThreadPriority(thread_, priority);
-#else
if (!thread_)
return false;
-#if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
- // TODO(tommi): Switch to the same mechanism as Chromium uses for
- // changing thread priorities.
+#if defined(WEBRTC_WIN)
+ return SetThreadPriority(thread_, priority);
+#elif defined(__native_client__)
+ // Setting thread priorities is not supported in NaCl.
+ return true;
+#elif defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
+ // TODO(tommi): Switch to the same mechanism as Chromium uses for changing
+ // thread priorities.
return true;
#else
#ifdef WEBRTC_THREAD_RR
@@ -250,7 +252,6 @@
break;
}
return pthread_setschedparam(thread_, policy, ¶m) == 0;
-#endif // defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
#endif // defined(WEBRTC_WIN)
}