---
 plugins/mozjs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/plugins/mozjs.c b/plugins/mozjs.c
index d4730f4..9f18d33 100644
--- a/plugins/mozjs.c
+++ b/plugins/mozjs.c
@@ -162,7 +162,11 @@ static void create_object(void)
 
        jsctx = JS_NewContext(jsrun, 8 * 1024);
 
+#if JS_VERSION >= 185
+       jsobj = JS_NewCompartmentAndGlobalObject(jsctx, &jscls, NULL);
+#else
        jsobj = JS_NewObject(jsctx, &jscls, NULL, NULL);
+#endif
 
        if (!JS_InitStandardClasses(jsctx, jsobj))
                pacrunner_error("Failed to init JS standard classes");
-- 
1.7.4.4


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to