From: Ben Noordhuis Date: Tue, 27 Aug 2013 12:09:36 +0000 (+0200) Subject: src: remove --max-stack-size option X-Git-Tag: v0.11.7~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a87b31bfa0e35d70cda6c0900648815ef3b9956;p=platform%2Fupstream%2Fnodejs.git src: remove --max-stack-size option Ad-hoc duplicate of V8's --stack-size option. Superfluous in other words. Remove it. --- diff --git a/src/node.cc b/src/node.cc index 4507477..d148116 100644 --- a/src/node.cc +++ b/src/node.cc @@ -164,7 +164,6 @@ static int option_end_index = 0; static bool use_debug_agent = false; static bool debug_wait_connect = false; static int debug_port = 5858; -static int max_stack_size = 0; bool using_domains = false; // used by C++ modules as well @@ -2664,11 +2663,6 @@ static void ParseArgs(int argc, char **argv) { } else if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) { printf("%s\n", NODE_VERSION); exit(0); - } else if (strstr(arg, "--max-stack-size=") == arg) { - const char *p = 0; - p = 1 + strchr(arg, '='); - max_stack_size = atoi(p); - argv[i] = const_cast(""); } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { PrintHelp(); exit(0); @@ -3026,19 +3020,6 @@ char** Init(int argc, char *argv[]) { v8argv[option_end_index + 1] = const_cast("v8debug"); } - // For the normal stack which moves from high to low addresses when frames - // are pushed, we can compute the limit as stack_size bytes below the - // the address of a stack variable (e.g. &stack_var) as an approximation - // of the start of the stack (we're assuming that we haven't pushed a lot - // of frames yet). - if (max_stack_size != 0) { - uint32_t stack_var; - ResourceConstraints constraints; - - uint32_t *stack_limit = &stack_var - (max_stack_size / sizeof(uint32_t)); - constraints.set_stack_limit(stack_limit); - SetResourceConstraints(&constraints); // Must be done before V8::Initialize - } V8::SetFlagsFromCommandLine(&v8argc, v8argv, false); const char typed_arrays_flag[] = "--harmony_typed_arrays";