Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support for JS_SetGCZeal()

  • Loading branch information...
commit 2c2b57374a91bca08a5e3844a18dd71dc3cdce80 1 parent b2a2021
Peter Leonov authored
Showing with 19 additions and 0 deletions.
  1. +11 −0 config
  2. +3 −0  src/nginx_js_glue.c
  3. +5 −0 src/ngx_http_jsapi.h
11 config
View
@@ -198,6 +198,17 @@ ngx_found=no
. auto/feature
+ngx_feature_name="NGX_HTTP_JS_JS_SETGCZEAL"
+ngx_feature_run=no
+ngx_feature_incs=
+ngx_feature_test="JS_SetGCZeal();"
+ngx_feature="JS_SetGCZeal()"
+ngx_feature_path="$CORE_INCS"
+ngx_feature_libs="$CORE_LIBS"
+ngx_found=no
+. auto/feature
+
+
CFLAGS="-I $ngx_addon_dir/src/ $CFLAGS"
3  src/nginx_js_glue.c
View
@@ -172,6 +172,9 @@ ngx_http_js__glue__init_interpreter(ngx_conf_t *cf)
JS_SetVersion(cx, 170);
JS_SetErrorReporter(cx, reportError);
+#if (NGX_DEBUG && NGX_HTTP_JS_JS_SETGCZEAL)
+ JS_SetGCZeal(cx, 2);
+#endif
// global
if (!ngx_http_js__global__init(cx))
5 src/ngx_http_jsapi.h
View
@@ -1,6 +1,11 @@
#ifndef _NGX_HTTP_JSAPI_H_INCLUDED_
#define _NGX_HTTP_JSAPI_H_INCLUDED_
+// nedded for JS_SetGCZeal()
+#ifdef NGX_DEBUG
+#define DEBUG
+#endif
+
// XP_UNIX is needed for:
// OpenBSD manual SpiderMonkey build,
// FreeBSD 7 “spidermonkey” port
Please sign in to comment.
Something went wrong with that request. Please try again.