[gjs] update for JS_GetPrototype api change
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] update for JS_GetPrototype api change
- Date: Thu, 5 Dec 2013 19:09:55 +0000 (UTC)
commit 8608a40d5384394045adc4062a21db6e152c4fa3
Author: Tim Lunn <tim feathertop org>
Date: Sat Sep 28 11:53:17 2013 +1000
update for JS_GetPrototype api change
https://bugzilla.gnome.org/show_bug.cgi?id=711046
gi/boxed.cpp | 2 +-
gi/function.cpp | 2 +-
gi/gerror.cpp | 2 +-
gi/object.cpp | 4 +++-
gi/union.cpp | 2 +-
5 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index b9fa15a..75ee461 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -450,7 +450,7 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(boxed)
"boxed constructor, obj %p priv %p",
object, priv);
- proto = JS_GetPrototype(object);
+ JS_GetPrototype(context, object, &proto);
gjs_debug_lifecycle(GJS_DEBUG_GBOXED, "boxed instance __proto__ is %p", proto);
/* If we're the prototype, then post-construct we'll fill in priv->info.
* If we are not the prototype, though, then we'll get ->info from the
diff --git a/gi/function.cpp b/gi/function.cpp
index 7ea6de9..6c5d2e0 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1557,7 +1557,7 @@ function_new(JSContext *context,
JS_GetProperty(context, global, "Function", &native_function);
/* We take advantage from that fact that Function.__proto__ is Function.prototype */
- parent_proto = JS_GetPrototype(JSVAL_TO_OBJECT(native_function));
+ JS_GetPrototype(context, JSVAL_TO_OBJECT(native_function), &parent_proto);
prototype = JS_InitClass(context, global,
/* parent prototype JSObject* for
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index ac6ef03..9d9e085 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -85,7 +85,7 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(error)
"GError constructor, obj %p priv %p",
object, priv);
- proto = JS_GetPrototype(object);
+ JS_GetPrototype(context, object, &proto);
gjs_debug_lifecycle(GJS_DEBUG_GERROR, "GError instance __proto__ is %p", proto);
/* If we're the prototype, then post-construct we'll fill in priv->info.
diff --git a/gi/object.cpp b/gi/object.cpp
index 0c637b3..135b5e4 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -240,7 +240,9 @@ static inline ObjectInstance *
proto_priv_from_js(JSContext *context,
JSObject *obj)
{
- return priv_from_js(context, JS_GetPrototype(obj));
+ JSObject *proto;
+ JS_GetPrototype(context, obj, &proto);
+ return priv_from_js(context, proto);
}
/* a hook on getting a property; set value_p to override property's value.
diff --git a/gi/union.cpp b/gi/union.cpp
index 82ba852..6c63658 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -209,7 +209,7 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(union)
"union constructor, obj %p priv %p",
object, priv);
- proto = JS_GetPrototype(object);
+ JS_GetPrototype(context, object, &proto);
gjs_debug_lifecycle(GJS_DEBUG_GBOXED, "union instance __proto__ is %p", proto);
/* If we're the prototype, then post-construct we'll fill in priv->info.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]