summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2017-03-19 07:39:52 +0000
committerPhilip Chimento <philip.chimento@gmail.com>2017-05-05 23:26:30 -0700
commit9037d3c62e69fe52a203687a4ce1941ef3a4579f (patch)
tree71bac3a0dc8a5a13823ddf42e9f6051a6cfb4bfd
parent4d6aec74bf2a8e101ba28c9b61dacc0aaa8eb986 (diff)
downloadgjs-9037d3c62e69fe52a203687a4ce1941ef3a4579f.tar.gz
js: Replace JS_InitReflect with JS_InitReflectParse
Reflect is now built into ES6, so it is always on in the newer SpiderMonkey. The only discrepancy is Reflect.parse(), which is not in the standard and thus remains a SpiderMonkey extension to which you must opt in. We require it for code coverage, though, so we enable it, although it's discouraged for client code to use it.
-rw-r--r--gjs/coverage.cpp4
-rw-r--r--gjs/jsapi-util.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index d502cee5..6379d306 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1612,8 +1612,8 @@ bootstrap_coverage(GjsCoverage *coverage)
return false;
}
- if (!JS_InitReflect(context, debugger_compartment)) {
- gjs_throw(context, "Failed to init Reflect");
+ if (!JS_InitReflectParse(context, debugger_compartment)) {
+ gjs_throw(context, "Failed to init Reflect.parse");
return false;
}
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index f586e559..1b65d2c7 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -111,7 +111,7 @@ gjs_init_context_standard (JSContext *context,
if (!JS_InitStandardClasses(context, global))
return false;
- if (!JS_InitReflect(context, global))
+ if (!JS_InitReflectParse(context, global))
return false;
if (!JS_DefineDebuggerObject(context, global))