From 7ac8dd9b01446d1bbfb2b76da8ecd3b7c502918a Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Tue, 27 Feb 2018 21:48:49 +0000 Subject: [PATCH] ios: increase node's thread stack size to 1MB Increases the stack size of the thread running the Node.js code to 1MB, to have the same stack size as the application's main thread. --- src/ios/NodeJSRunner.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ios/NodeJSRunner.mm b/src/ios/NodeJSRunner.mm index 0d8ae45..87d696a 100644 --- a/src/ios/NodeJSRunner.mm +++ b/src/ios/NodeJSRunner.mm @@ -23,6 +23,10 @@ + (void) startEngineWithArguments:(NSArray*)arguments; { object:nil ]; + // Set 1MB of stack space for the Node.js thread, + // the same as the iOS application's main thread. + [nodejsThread setStackSize:1024*1024]; + [nodejsThread start]; }