summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2012-11-17 11:18:41 +0000
committerVincent Sanders <vince@kyllikki.org>2012-11-17 11:18:41 +0000
commit3d3e27d666c7c35ab95f450c68766a9ba996a485 (patch)
tree300523c94cdce7636bdab69cc0e3e7bb198cdb00
parent24d68eb4e19e48c80a44af324499e1e16863e768 (diff)
downloadnsgenbind-3d3e27d666c7c35ab95f450c68766a9ba996a485.tar.gz
nsgenbind-3d3e27d666c7c35ab95f450c68766a9ba996a485.tar.bz2
generate macros for adding object to root GC set
-rw-r--r--src/jsapi-libdom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jsapi-libdom.c b/src/jsapi-libdom.c
index 476c99e..df36be8 100644
--- a/src/jsapi-libdom.c
+++ b/src/jsapi-libdom.c
@@ -361,7 +361,7 @@ output_class_new(struct binding *binding)
/* root object to stop it being garbage collected */
fprintf(binding->outfile,
- "\tif (JS_AddRoot(cx, &newobject) != JS_TRUE) {\n"
+ "\tif (JSAPI_ADD_OBJECT_ROOT(cx, &newobject) != JS_TRUE) {\n"
"\t\tfree(private);\n"
"\t\treturn NULL;\n"
"\t}\n\n");
@@ -395,7 +395,7 @@ output_class_new(struct binding *binding)
/* root object to stop it being garbage collected */
fprintf(binding->outfile,
- "\tif (JS_AddRoot(cx, &newobject) != JS_TRUE) {\n"
+ "\tif (JSAPI_ADD_OBJECT_ROOT(cx, &newobject) != JS_TRUE) {\n"
"\t\treturn NULL;\n"
"\t}\n\n");
@@ -413,7 +413,7 @@ output_class_new(struct binding *binding)
/* unroot object and return it */
fprintf(binding->outfile,
- "\tJS_RemoveRoot(cx, &newobject);\n"
+ "\tJSAPI_REMOVE_OBJECT_ROOT(cx, &newobject);\n"
"\n"
"\treturn newobject;\n"
"}\n");