[gjs/wip/ptomato/mozjs52: 4/7] js: Adapt to options changes
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs52: 4/7] js: Adapt to options changes
- Date: Fri, 2 Jun 2017 03:27:27 +0000 (UTC)
commit 70ec9b5c2e4523481c87001d05bf9a0886d5a26c
Author: Philip Chimento <philip chimento gmail com>
Date: Tue May 2 22:29:33 2017 -0700
js: Adapt to options changes
JS::RuntimeOptions and JS::ContextOptions have merged into one
JS::ContextOptions class. JS::CompartmentOptions, on the other hand, has
split into "creation options" (can be set only at construct time) and
"behaviors" (can be changed at run time.)
gjs/coverage.cpp | 2 +-
gjs/jsapi-util.cpp | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 85777bb..f0fba85 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1593,7 +1593,7 @@ bootstrap_coverage(GjsCoverage *coverage)
JSObject *debuggee = gjs_get_import_global(context);
JS::CompartmentOptions options;
- options.setVersion(JSVERSION_LATEST);
+ options.behaviors().setVersion(JSVERSION_LATEST);
JS::RootedObject debugger_compartment(context,
JS_NewGlobalObject(context, &coverage_global_class, NULL,
JS::FireOnNewGlobalHook, options));
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index dca61c9..e9b84ad 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -94,17 +94,17 @@ gjs_init_context_standard (JSContext *context,
* setExtraWarnings: Report warnings to error reporter function.
*/
JS::ContextOptionsRef(context).setDontReportUncaught(true);
- JS::RuntimeOptionsRef(context).setExtraWarnings(extra_warnings);
+ JS::ContextOptionsRef(context).setExtraWarnings(extra_warnings);
if (!g_getenv("GJS_DISABLE_JIT")) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
- JS::RuntimeOptionsRef(context)
+ JS::ContextOptionsRef(context)
.setIon(true)
.setBaseline(true)
.setAsmJS(true);
}
- compartment_options.setVersion(JSVERSION_LATEST);
+ compartment_options.behaviors().setVersion(JSVERSION_LATEST);
global.set(JS_NewGlobalObject(context, &global_class, NULL,
JS::FireOnNewGlobalHook, compartment_options));
if (global == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]