[gjs] context: Set the stack quota again
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] context: Set the stack quota again
- Date: Wed, 3 Jul 2013 17:53:24 +0000 (UTC)
commit 1693bda7274d37a9ba32c90f360f1c41096c84d4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jul 3 13:38:53 2013 -0400
context: Set the stack quota again
This way, we will actually get a JS error on recursion instead of running
off the end of the stack.
https://bugzilla.gnome.org/show_bug.cgi?id=703564
gjs/context.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gjs/context.c b/gjs/context.c
index bcd51ae..536abb8 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -571,6 +571,7 @@ gjs_context_constructor (GType type,
js_context = GJS_CONTEXT(object);
js_context->runtime = JS_NewRuntime(32*1024*1024 /* max bytes */);
+ JS_SetNativeStackQuota(js_context->runtime, 1024*1024);
if (js_context->runtime == NULL)
g_error("Failed to create javascript runtime");
JS_SetGCParameter(js_context->runtime, JSGC_MAX_BYTES, 0xffffffff);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]