Revert of [platform] Change default platform max thread pool size 4 -> 8 (patchset #1 id:1 of https://codereview.chromium.org/1782833006/ )

Reason for revert:
Seems to trigger bugs, needs investigation.

Original issue's description:
> [platform] Change default platform max thread pool size 4 -> 8
>
> BUG=
>
> Committed: https://crrev.com/ddc0f9982057e76dd4dc35b6ca80d2322adc9141
> Cr-Commit-Position: refs/heads/master@{#34711}

TBR=hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34714}
This commit is contained in:
mlippautz 2016-03-11 03:01:24 -08:00 committed by Commit bot
parent 57ef4f4f3a
commit 4857110ce6

View File

@ -29,7 +29,9 @@ bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate) {
return reinterpret_cast<DefaultPlatform*>(platform)->PumpMessageLoop(isolate);
}
const int DefaultPlatform::kMaxThreadPoolSize = 8;
const int DefaultPlatform::kMaxThreadPoolSize = 4;
DefaultPlatform::DefaultPlatform()
: initialized_(false), thread_pool_size_(0) {}
@ -64,7 +66,7 @@ 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::SysInfo::NumberOfProcessors() - 1;
thread_pool_size = base::SysInfo::NumberOfProcessors();
}
thread_pool_size_ =
std::max(std::min(thread_pool_size, kMaxThreadPoolSize), 1);