[gjs/wip/ptomato/mozjs38: 24/24] WIP - mozjs38
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs38: 24/24] WIP - mozjs38
- Date: Sat, 21 Jan 2017 02:26:32 +0000 (UTC)
commit 1e073237086312fb006c3131b313eb79250c0f4e
Author: Philip Chimento <philip endlessm com>
Date: Fri Jan 20 14:53:44 2017 -0800
WIP - mozjs38
gi/boxed.cpp | 4 ++--
gjs/context.cpp | 1 +
gjs/importer.cpp | 3 ++-
gjs/jsapi-util.cpp | 5 ++---
gjs/runtime.cpp | 2 +-
5 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index a27b128..3ec97d3 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -872,8 +872,8 @@ define_boxed_class_fields(JSContext *cx,
if (!JS_DefineProperty(cx, proto, field_name, JS::NullHandleValue,
JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_GETTER | JSPROP_SETTER,
- JS_DATA_TO_FUNC_PTR(JSPropertyOp, getter.get()),
- JS_DATA_TO_FUNC_PTR(JSStrictPropertyOp, setter.get())))
+ JS_DATA_TO_FUNC_PTR(JSNative, getter.get()),
+ JS_DATA_TO_FUNC_PTR(JSNative, setter.get())))
return false;
}
diff --git a/gjs/context.cpp b/gjs/context.cpp
index b7022c1..b055ec8 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -75,6 +75,7 @@ struct _GjsContext {
guint auto_gc_id;
+ /* FIXME - array of PersistentRooted<jsid>? */
jsid const_strings[GJS_STRING_LAST];
};
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index b03f713..8f9d24f 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -213,7 +213,8 @@ seal_import(JSContext *cx,
if (!JS_DefineProperty(cx, descr.object(), name, descr.value(),
descr.attributes() | JSPROP_PERMANENT,
- descr.getter(), descr.setter())) {
+ JS_PROPERTYOP_GETTER(descr.getter()),
+ JS_PROPERTYOP_SETTER(descr.setter()))) {
gjs_debug(GJS_DEBUG_IMPORTER,
"Failed to redefine attributes to seal '%s' in importer",
name);
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 32d4f37..dcf7ab9 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -89,9 +89,8 @@ gjs_init_context_standard (JSContext *context,
*
* setExtraWarnings: Report warnings to error reporter function.
*/
- JS::ContextOptionsRef(context)
- .setDontReportUncaught(true)
- .setExtraWarnings(extra_warnings);
+ JS::ContextOptionsRef(context).setDontReportUncaught(true);
+ JS::RuntimeOptionsRef(context).setExtraWarnings(extra_warnings);
if (!g_getenv("GJS_DISABLE_JIT")) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
diff --git a/gjs/runtime.cpp b/gjs/runtime.cpp
index 5ddf4b0..902fcd9 100644
--- a/gjs/runtime.cpp
+++ b/gjs/runtime.cpp
@@ -256,7 +256,7 @@ gjs_runtime_for_current_thread(void)
if (!runtime) {
g_assert(gjs_is_inited);
- runtime = JS_NewRuntime(32*1024*1024 /* max bytes */, JS_USE_HELPER_THREADS);
+ runtime = JS_NewRuntime(32 * 1024 * 1024 /* max bytes */);
if (runtime == NULL)
g_error("Failed to create javascript runtime");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]