diff context.c @ 38:6cd870a2b81e

If the JS engine supports GC zeal setting, we enable it automatically to help find any memory management bugs.
author Atul Varma <varmaa@toolness.com>
date Thu, 02 Jul 2009 22:56:59 -0700
parents d4efcbb06964
children 8a7abd0bb48d
line wrap: on
line diff
--- a/context.c	Thu Jul 02 22:42:31 2009 -0700
+++ b/context.c	Thu Jul 02 22:56:59 2009 -0700
@@ -243,5 +243,11 @@
 
   context->cx = cx;
 
+#ifdef JS_GC_ZEAL
+  // TODO: Consider exposing JS_SetGCZeal() to Python instead of
+  // hard-coding it here.
+  JS_SetGCZeal(cx, 2);
+#endif
+
   return context;
 }