Make couchjs -S option take effect 216/head
authorNick Vatamaniuc <vatamane@apache.org>
Wed, 30 Nov 2016 17:26:56 +0000 (12:26 -0500)
committerNick Vatamaniuc <vatamane@apache.org>
Wed, 30 Nov 2016 19:15:38 +0000 (14:15 -0500)
commit1659fda5dd1808f55946a637fc26c73913b57e96
tree09b03152fd5ecd06d8298dc8c431a1450171b8ab
parent54890e1b8f1d44225ed559ec53f7bf1f4402435b
Make couchjs -S option take effect

Previously it was used to set JS context's stack chunk size.

Instead, to be effective it should set max GC size of the runtime.

Stack chunk size was set to the recommended value: 8K

This brings back an accidentally reverted commit:

https://github.com/apache/couchdb-couch/commit/62dafe81e13d7f8e27e95057e65f76d534aa2313

by @tilgovi

Reference:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_NewContext

COUCHDB-3245
priv/couch_js/main.c