[gjs/wip/ptomato/mozjs45prep: 24/32] js: Replace JS_InitReflect with JS_InitReflectParse
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs45prep: 24/32] js: Replace JS_InitReflect with JS_InitReflectParse
- Date: Mon, 17 Apr 2017 03:24:41 +0000 (UTC)
commit 709efbab174c5c47a7654cf12cb5cb9e37c2dab0
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Mar 19 07:39:52 2017 +0000
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.
gjs/coverage.cpp | 4 ++--
gjs/jsapi-util.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 794487b..bb5883e 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1610,8 +1610,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 143be9d..2a69f26 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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]