Accepting request 63186 from GNOME:Factory

Accepted submit request 63186 from user dimstar

OBS-URL: https://build.opensuse.org/request/show/63186
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gjs?expand=0&rev=25
This commit is contained in:
Sascha Peilicke 2011-03-02 09:03:22 +00:00 committed by Git OBS Bridge
commit 92475e1c8b
5 changed files with 21 additions and 249 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3aa7d6f6a22da7d10dd124ca7b9373037111e0cfb3da899edbaadf5f3d73339c
size 513321

3
gjs-0.7.11.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d06889ab5d57e6e9b9d44e9bc467849da55b3913656528ad4e6e2dcd7e5cae7
size 513500

View File

@ -1,242 +0,0 @@
From 9697fe7640c378c759e676caeac3a42a05e0de75 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Sat, 12 Feb 2011 19:13:49 +0000
Subject: xulrunner2: conditionally adapt to new Strict setters
Upstream broke their API in commit:
http://hg.mozilla.org/mozilla-central/rev/4b56bfdf61a7
They added an extra arg to the setters, a JSBool to enable strict mode.
Adapt setters to match the new API
https://bugzilla.gnome.org/show_bug.cgi?id=642186
---
diff --git a/configure.ac b/configure.ac
index 3da23d2..5ff896b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,7 @@ fi
AC_CHECK_LIB([mozjs], [JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),, [$JS_LIBS])
AC_CHECK_LIB([mozjs], [JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),, [$JS_LIBS])
AC_CHECK_LIB([mozjs], [JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),, [$JS_LIBS])
+AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),, [$JS_LIBS])
AC_MSG_CHECKING([for mozilla-js >= 2 ])
if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
diff --git a/gi/boxed.c b/gi/boxed.c
index 9bdd513..405baaa 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -851,6 +851,9 @@ static JSBool
boxed_field_setter (JSContext *context,
JSObject *obj,
jsid id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+ JSBool strict,
+#endif
jsval *value)
{
Boxed *priv;
@@ -959,7 +962,7 @@ static struct JSClass gjs_boxed_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) boxed_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gi/function.c b/gi/function.c
index 56fc5f5..f03b5ff 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -974,7 +974,7 @@ static struct JSClass gjs_function_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) function_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gi/keep-alive.c b/gi/keep-alive.c
index 87fb2f0..028f900 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -187,7 +187,7 @@ static struct JSClass gjs_keep_alive_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
diff --git a/gi/ns.c b/gi/ns.c
index b6591ff..665af8a 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -213,7 +213,7 @@ static struct JSClass gjs_ns_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) ns_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gi/object.c b/gi/object.c
index 4e04dce..25b561a 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -184,6 +184,9 @@ static JSBool
object_instance_set_prop(JSContext *context,
JSObject *obj,
jsid id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+ JSBool strict,
+#endif
jsval *value_p)
{
ObjectInstance *priv;
diff --git a/gi/param.c b/gi/param.c
index 1b03ad2..77b83af 100644
--- a/gi/param.c
+++ b/gi/param.c
@@ -259,7 +259,7 @@ static struct JSClass gjs_param_class = {
JS_PropertyStub,
JS_PropertyStub,
param_get_prop,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) param_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gi/repo.c b/gi/repo.c
index 3381da1..097ca67 100644
--- a/gi/repo.c
+++ b/gi/repo.c
@@ -222,7 +222,7 @@ static struct JSClass gjs_repo_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) repo_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gi/union.c b/gi/union.c
index b2978af..8d1ee6e 100644
--- a/gi/union.c
+++ b/gi/union.c
@@ -355,7 +355,7 @@ static struct JSClass gjs_union_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) union_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gjs/byteArray.c b/gjs/byteArray.c
index a1d1ffe..02c627f 100644
--- a/gjs/byteArray.c
+++ b/gjs/byteArray.c
@@ -45,6 +45,9 @@ static JSBool byte_array_get_prop (JSContext *context,
static JSBool byte_array_set_prop (JSContext *context,
JSObject *obj,
jsid id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+ JSBool strict,
+#endif
jsval *value_p);
static JSBool byte_array_new_resolve (JSContext *context,
JSObject *obj,
@@ -237,6 +240,9 @@ static JSBool
byte_array_length_setter(JSContext *context,
JSObject *obj,
jsid id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+ JSBool strict,
+#endif
jsval *value_p)
{
ByteArrayInstance *priv;
@@ -296,6 +302,9 @@ static JSBool
byte_array_set_prop(JSContext *context,
JSObject *obj,
jsid id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+ JSBool strict,
+#endif
jsval *value_p)
{
ByteArrayInstance *priv;
diff --git a/gjs/compat.h b/gjs/compat.h
index d418a22..09c2b98 100644
--- a/gjs/compat.h
+++ b/gjs/compat.h
@@ -135,6 +135,10 @@ gjs_##name##_constructor(JSContext *context, \
#endif
+#ifndef HAVE_JS_STRICTPROPERTYSTUB
+#define JS_StrictPropertyStub JS_PropertyStub
+#endif
+
G_END_DECLS
#endif /* __GJS_COMPAT_H__ */
diff --git a/gjs/importer.c b/gjs/importer.c
index d875a38..fc5e16c 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -1021,7 +1021,7 @@ static struct JSClass gjs_importer_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
(JSEnumerateOp) importer_new_enumerate, /* needs cast since it's the new enumerate signature */
(JSResolveOp) importer_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c
index 27260ca..cc89ab5 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -240,7 +240,7 @@ gjs_runtime_get_current_context(JSRuntime *runtime)
static JSClass global_class = {
"GjsGlobal", JSCLASS_GLOBAL_FLAGS,
- JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
+ JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 5266ff0..4d61916 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -148,7 +148,7 @@ static struct JSClass gjs_##cname##_class = { \
JS_PropertyStub, \
JS_PropertyStub, \
JS_PropertyStub, \
- JS_PropertyStub,\
+ JS_StrictPropertyStub, \
JS_EnumerateStub,\
(JSResolveOp) gjs_##cname##_new_resolve, \
JS_ConvertStub, \
diff --git a/modules/dbus-exports.c b/modules/dbus-exports.c
index e234bf8..d5c7198 100644
--- a/modules/dbus-exports.c
+++ b/modules/dbus-exports.c
@@ -1803,7 +1803,7 @@ static struct JSClass gjs_js_exports_class = {
JS_PropertyStub,
JS_PropertyStub,
JS_PropertyStub,
- JS_PropertyStub,
+ JS_StrictPropertyStub,
JS_EnumerateStub,
(JSResolveOp) exports_new_resolve, /* needs cast since it's the new resolve signature */
JS_ConvertStub,
--
cgit v0.8.3.4

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Tue Mar 1 21:28:26 UTC 2011 - dimstar@opensuse.org
- Update to version 0.7.11:
+ Add gjs_context_maybe_gc() which is similar to JS_MaybeGC but
tries to account for native allocations made directly from libc
when determining if GC is useful. Also invoke after creating
new native objects.
+ Adapt to additional xulrunner 2.0 changes
+ Add back debugger module, with single nativeTrap() function to
trigger debugger breakpoint
+ Fix bug with looking up namespaced native modules
+ Memory leak fix
+ Build fixes
- Drop gjs-xulrunner20b11-fix.patch: fixed upstream.
- This update addresses bnc#676079.
-------------------------------------------------------------------
Mon Feb 21 15:42:29 CET 2011 - vuntz@opensuse.org

View File

@ -27,7 +27,7 @@
%endif
Name: gjs
Version: 0.7.10
Version: 0.7.11
Release: 5
# FIXME: find out if tapsets should really be in devel package or in main package
License: MIT License (or similar)
@ -35,8 +35,6 @@ Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
Url: http://live.gnome.org/Gjs
Source: %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gjs-xulrunner20b11-fix.patch vuntz@opensuse.org -- Taken from git, adapt to changes in xulrunner
Patch0: gjs-xulrunner20b11-fix.patch
BuildRequires: gcc-c++
BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel
BuildRequires: python
@ -81,7 +79,6 @@ Mozilla SpiderMonkey JavaScript engine.
%prep
%setup -q
%patch0 -p1
%build
%configure \