Fix OS::GetCurrentThreadId to work when building Android on Mac.
authorrmcilroy <rmcilroy@chromium.org>
Fri, 12 Dec 2014 17:56:46 +0000 (09:56 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 12 Dec 2014 17:56:58 +0000 (17:56 +0000)
The Mac version of GetCurrentThreadId should be used when building the host
build of V8 on Android for Mac.

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

Cr-Commit-Position: refs/heads/master@{#25805}

src/base/platform/platform-posix.cc

index 0b16dfd..c2fa26a 100644 (file)
@@ -254,7 +254,7 @@ int OS::GetCurrentProcessId() {
 
 
 int OS::GetCurrentThreadId() {
-#if V8_OS_MACOSX
+#if V8_OS_MACOSX || (V8_OS_ANDROID && defined(__APPLE__))
   return static_cast<int>(pthread_mach_thread_np(pthread_self()));
 #elif V8_OS_LINUX
   return static_cast<int>(syscall(__NR_gettid));