From 9b189d0e9ff2baea98833a9c0085a2cecc9e7071 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 20 Jul 2018 13:20:42 -0700 Subject: [PATCH] Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld MozReview-Commit-ID: 4Mod1IdzJBw --HG-- extra : rebase_source : 89d6559a27ea5681c1415f71eeb837bfadd8351d --- ipc/chromium/src/base/platform_thread_posix.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipc/chromium/src/base/platform_thread_posix.cc b/ipc/chromium/src/base/platform_thread_posix.cc index 53075fd36b7d..1c6410453fcf 100644 --- a/ipc/chromium/src/base/platform_thread_posix.cc +++ b/ipc/chromium/src/base/platform_thread_posix.cc @@ -124,8 +124,9 @@ bool CreateThread(size_t stack_size, bool joinable, pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED); } - if (stack_size > 0) - pthread_attr_setstacksize(&attributes, stack_size); + if (stack_size == 0) + stack_size = nsIThreadManager::DEFAULT_STACK_SIZE; + pthread_attr_setstacksize(&attributes, stack_size); success = !pthread_create(thread_handle, &attributes, ThreadFunc, delegate);