Skip to content

Commit

Permalink
8242209: Increase web native thread stack size for x86 mode
Browse files Browse the repository at this point in the history
Reviewed-by: kcr, ghb
  • Loading branch information
arun-joseph authored and kevinrushforth committed Apr 11, 2020
1 parent e1cb191 commit b1fdc45
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,15 @@ static unsigned __stdcall wtfThreadEntryPoint(void* data)

bool Thread::establishHandle(NewThreadContext* data)
{
size_t stackSize = 0;
#if PLATFORM(JAVA) && USE(JSVALUE32_64)
stackSize = 1024 * 1024;
#endif

unsigned threadIdentifier = 0;
HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, data, 0, &threadIdentifier));
unsigned initFlag = stackSize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;

HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, stackSize, wtfThreadEntryPoint, data, initFlag, &threadIdentifier));
if (!threadHandle) {
LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", wtfThreadEntryPoint, data, errno);
return false;
Expand Down

0 comments on commit b1fdc45

Please sign in to comment.