[gjs/wip/ptomato/mozjs38: 23/23] WIP - mozjs38
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs38: 23/23] WIP - mozjs38
- Date: Wed, 18 Jan 2017 07:40:03 +0000 (UTC)
commit 40c6acd218727425857b1146948efc33f7f6b627
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Jan 17 23:37:12 2017 -0800
WIP - mozjs38
gi/boxed.cpp | 4 ++--
gjs/context.cpp | 1 +
gjs/importer.cpp | 2 +-
gjs/jsapi-util.cpp | 5 ++---
gjs/runtime.cpp | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 5fda1ee..cf1e9bd 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -845,8 +845,8 @@ define_boxed_class_fields (JSContext *context,
bool result;
result = JS_DefineProperty(context, proto, field_name, JS::NullHandleValue,
- JSPROP_PERMANENT | JSPROP_SHARED,
- boxed_field_getter, boxed_field_setter);
+ JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_PROPOP_ACCESSORS,
+ (JSNative) boxed_field_getter, (JSNative) boxed_field_setter);
g_base_info_unref ((GIBaseInfo *)field);
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 7c17fa5..5e23c24 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 cd3ddae..7c76d7c 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -213,7 +213,7 @@ seal_import(JSContext *cx,
if (!JS_DefineProperty(cx, descr.object(), name, descr.value(),
descr.attributes() | JSPROP_PERMANENT,
- descr.getter(), descr.setter())) {
+ (JSNative) descr.getter(), (JSNative) 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 f8989f8..16e2aed 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]