Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/libplatform/default-platform.cc

Issue 510693003: Sync our homegrown SysInfo replacement with the one in Chrome base. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing include. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | test/base-unittests/base-unittests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libplatform/default-platform.cc
diff --git a/src/libplatform/default-platform.cc b/src/libplatform/default-platform.cc
index 9a503bc34c165b03d5a59f6fc77d18f34be4b2a6..b5b8571dbc9a9e4d059d91bb641bf5a6ff81f858 100644
--- a/src/libplatform/default-platform.cc
+++ b/src/libplatform/default-platform.cc
@@ -9,6 +9,7 @@
#include "src/base/logging.h"
#include "src/base/platform/platform.h"
+#include "src/base/sys-info.h"
#include "src/libplatform/worker-thread.h"
namespace v8 {
@@ -58,8 +59,9 @@ DefaultPlatform::~DefaultPlatform() {
void DefaultPlatform::SetThreadPoolSize(int thread_pool_size) {
base::LockGuard<base::Mutex> guard(&lock_);
DCHECK(thread_pool_size >= 0);
- if (thread_pool_size < 1)
- thread_pool_size = base::OS::NumberOfProcessorsOnline();
+ if (thread_pool_size < 1) {
+ thread_pool_size = base::SysInfo::NumberOfProcessors();
+ }
thread_pool_size_ =
std::max(std::min(thread_pool_size, kMaxThreadPoolSize), 1);
}
« no previous file with comments | « src/isolate.cc ('k') | test/base-unittests/base-unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698