Index: src/libplatform/default-platform.cc |
diff --git a/src/libplatform/default-platform.cc b/src/libplatform/default-platform.cc |
index 1e21ca4e82379b6734d54e6d9f77b50bedab61e9..decfbeabcbe38e5e03d8d92038b5016e092a34f5 100644 |
--- a/src/libplatform/default-platform.cc |
+++ b/src/libplatform/default-platform.cc |
@@ -27,6 +27,7 @@ |
#include "default-platform.h" |
+#include <algorithm> |
#include <queue> |
// TODO(jochen): We should have our own version of checks.h. |
@@ -39,6 +40,9 @@ namespace v8 { |
namespace internal { |
+const int DefaultPlatform::kMaxThreadPoolSize = 4; |
+ |
+ |
DefaultPlatform::DefaultPlatform() |
: initialized_(false), thread_pool_size_(0) {} |
@@ -60,7 +64,8 @@ void DefaultPlatform::SetThreadPoolSize(int thread_pool_size) { |
ASSERT(thread_pool_size >= 0); |
if (thread_pool_size < 1) |
thread_pool_size = CPU::NumberOfProcessorsOnline(); |
- thread_pool_size_ = Max(Min(thread_pool_size, kMaxThreadPoolSize), 1); |
+ thread_pool_size_ = |
+ std::max(std::min(thread_pool_size, kMaxThreadPoolSize), 1); |
} |