Merge lp:~jbicha/ubuntu/oneiric/gjs/1.29.18 into lp:ubuntu/oneiric/gjs
- Oneiric (11.10)
- 1.29.18
- Merge into oneiric
Proposed by
Jeremy Bícha
Status: | Merged |
---|---|
Merge reported by: | Sebastien Bacher |
Merged at revision: | not available |
Proposed branch: | lp:~jbicha/ubuntu/oneiric/gjs/1.29.18 |
Merge into: | lp:ubuntu/oneiric/gjs |
Diff against target: |
428 lines (+110/-40) 11 files modified
.pc/.quilt_patches (+1/-0) .pc/.quilt_series (+1/-0) .pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in (+0/-18) .pc/applied-patches (+0/-1) configure (+14/-14) configure.ac (+2/-2) debian/changelog (+7/-0) debian/libgjs0c.symbols (+1/-0) gi/object.c (+4/-0) gjs/context.c (+78/-5) gjs/context.h (+2/-0) |
To merge this branch: | bzr merge lp:~jbicha/ubuntu/oneiric/gjs/1.29.18 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+76441@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 50. By Jeremy Bícha
-
* New upstream release.
* debian/libgjs0c. symbols: Add 1 new symbol
Revision history for this message
Sebastien Bacher (seb128) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.pc/.quilt_patches' | |||
2 | --- .pc/.quilt_patches 1970-01-01 00:00:00 +0000 | |||
3 | +++ .pc/.quilt_patches 2011-09-21 16:48:23 +0000 | |||
4 | @@ -0,0 +1,1 @@ | |||
5 | 1 | debian/patches | ||
6 | 0 | 2 | ||
7 | === added file '.pc/.quilt_series' | |||
8 | --- .pc/.quilt_series 1970-01-01 00:00:00 +0000 | |||
9 | +++ .pc/.quilt_series 2011-09-21 16:48:23 +0000 | |||
10 | @@ -0,0 +1,1 @@ | |||
11 | 1 | series | ||
12 | 0 | 2 | ||
13 | === added directory '.pc/01_remove_rpath_flags.patch' | |||
14 | === removed directory '.pc/01_remove_rpath_flags.patch' | |||
15 | === added file '.pc/01_remove_rpath_flags.patch/.timestamp' | |||
16 | === added file '.pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in' | |||
17 | --- .pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in 1970-01-01 00:00:00 +0000 | |||
18 | +++ .pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in 2011-09-21 16:48:23 +0000 | |||
19 | @@ -0,0 +1,18 @@ | |||
20 | 1 | prefix=@prefix@ | ||
21 | 2 | exec_prefix=@exec_prefix@ | ||
22 | 3 | libdir=@libdir@ | ||
23 | 4 | bindir=@bindir@ | ||
24 | 5 | includedir=@includedir@ | ||
25 | 6 | datarootdir=@datarootdir@ | ||
26 | 7 | datadir=@datadir@ | ||
27 | 8 | |||
28 | 9 | jsdir=@gjsjsdir@ | ||
29 | 10 | jsnativedir=@gjsnativedir@ | ||
30 | 11 | |||
31 | 12 | Cflags: -I${includedir}/gjs-1.0 | ||
32 | 13 | Libs: @GJS_INTERNALS_LIBS@ | ||
33 | 14 | Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@ | ||
34 | 15 | |||
35 | 16 | Name: gjs-internals-1.0 | ||
36 | 17 | Description: Internal API for gjs (for modules and embedders); uses mozjs | ||
37 | 18 | Version: @VERSION@ | ||
38 | 0 | 19 | ||
39 | === removed file '.pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in' | |||
40 | --- .pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in 2011-07-22 21:56:42 +0000 | |||
41 | +++ .pc/01_remove_rpath_flags.patch/gjs-internals-1.0.pc.in 1970-01-01 00:00:00 +0000 | |||
42 | @@ -1,18 +0,0 @@ | |||
43 | 1 | prefix=@prefix@ | ||
44 | 2 | exec_prefix=@exec_prefix@ | ||
45 | 3 | libdir=@libdir@ | ||
46 | 4 | bindir=@bindir@ | ||
47 | 5 | includedir=@includedir@ | ||
48 | 6 | datarootdir=@datarootdir@ | ||
49 | 7 | datadir=@datadir@ | ||
50 | 8 | |||
51 | 9 | jsdir=@gjsjsdir@ | ||
52 | 10 | jsnativedir=@gjsnativedir@ | ||
53 | 11 | |||
54 | 12 | Cflags: -I${includedir}/gjs-1.0 | ||
55 | 13 | Libs: @GJS_INTERNALS_LIBS@ | ||
56 | 14 | Requires: gjs-1.0 gobject-introspection-1.0 @JS_PACKAGE@ | ||
57 | 15 | |||
58 | 16 | Name: gjs-internals-1.0 | ||
59 | 17 | Description: Internal API for gjs (for modules and embedders); uses mozjs | ||
60 | 18 | Version: @VERSION@ | ||
61 | 19 | 0 | ||
62 | === added file '.pc/applied-patches' | |||
63 | --- .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
64 | +++ .pc/applied-patches 2011-09-21 16:48:23 +0000 | |||
65 | @@ -0,0 +1,1 @@ | |||
66 | 1 | 01_remove_rpath_flags.patch | ||
67 | 0 | 2 | ||
68 | === removed file '.pc/applied-patches' | |||
69 | --- .pc/applied-patches 2011-07-22 21:56:42 +0000 | |||
70 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
71 | @@ -1,1 +0,0 @@ | |||
72 | 1 | 01_remove_rpath_flags.patch | ||
73 | 2 | 0 | ||
74 | === modified file 'configure' | |||
75 | --- configure 2011-09-06 09:45:58 +0000 | |||
76 | +++ configure 2011-09-21 16:48:23 +0000 | |||
77 | @@ -1,6 +1,6 @@ | |||
78 | 1 | #! /bin/sh | 1 | #! /bin/sh |
79 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
81 | 3 | # Generated by GNU Autoconf 2.68 for gjs 1.29.17. | 3 | # Generated by GNU Autoconf 2.68 for gjs 1.29.18. |
82 | 4 | # | 4 | # |
83 | 5 | # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gjs>. | 5 | # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gjs>. |
84 | 6 | # | 6 | # |
85 | @@ -571,8 +571,8 @@ | |||
86 | 571 | # Identity of this package. | 571 | # Identity of this package. |
87 | 572 | PACKAGE_NAME='gjs' | 572 | PACKAGE_NAME='gjs' |
88 | 573 | PACKAGE_TARNAME='gjs' | 573 | PACKAGE_TARNAME='gjs' |
91 | 574 | PACKAGE_VERSION='1.29.17' | 574 | PACKAGE_VERSION='1.29.18' |
92 | 575 | PACKAGE_STRING='gjs 1.29.17' | 575 | PACKAGE_STRING='gjs 1.29.18' |
93 | 576 | PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs' | 576 | PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs' |
94 | 577 | PACKAGE_URL='' | 577 | PACKAGE_URL='' |
95 | 578 | 578 | ||
96 | @@ -1375,7 +1375,7 @@ | |||
97 | 1375 | # Omit some internal or obsolete options to make the list less imposing. | 1375 | # Omit some internal or obsolete options to make the list less imposing. |
98 | 1376 | # This message is too long to be a string in the A/UX 3.1 sh. | 1376 | # This message is too long to be a string in the A/UX 3.1 sh. |
99 | 1377 | cat <<_ACEOF | 1377 | cat <<_ACEOF |
101 | 1378 | \`configure' configures gjs 1.29.17 to adapt to many kinds of systems. | 1378 | \`configure' configures gjs 1.29.18 to adapt to many kinds of systems. |
102 | 1379 | 1379 | ||
103 | 1380 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1380 | Usage: $0 [OPTION]... [VAR=VALUE]... |
104 | 1381 | 1381 | ||
105 | @@ -1445,7 +1445,7 @@ | |||
106 | 1445 | 1445 | ||
107 | 1446 | if test -n "$ac_init_help"; then | 1446 | if test -n "$ac_init_help"; then |
108 | 1447 | case $ac_init_help in | 1447 | case $ac_init_help in |
110 | 1448 | short | recursive ) echo "Configuration of gjs 1.29.17:";; | 1448 | short | recursive ) echo "Configuration of gjs 1.29.18:";; |
111 | 1449 | esac | 1449 | esac |
112 | 1450 | cat <<\_ACEOF | 1450 | cat <<\_ACEOF |
113 | 1451 | 1451 | ||
114 | @@ -1453,7 +1453,7 @@ | |||
115 | 1453 | --disable-option-checking ignore unrecognized --enable/--with options | 1453 | --disable-option-checking ignore unrecognized --enable/--with options |
116 | 1454 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | 1454 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
117 | 1455 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | 1455 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
119 | 1456 | --enable-maintainer-mode enable make rules and dependencies not useful | 1456 | --disable-maintainer-mode disable make rules and dependencies not useful |
120 | 1457 | (and sometimes confusing) to the casual installer | 1457 | (and sometimes confusing) to the casual installer |
121 | 1458 | --enable-silent-rules less verbose build output (undo: `make V=1') | 1458 | --enable-silent-rules less verbose build output (undo: `make V=1') |
122 | 1459 | --disable-silent-rules verbose build output (undo: `make V=0') | 1459 | --disable-silent-rules verbose build output (undo: `make V=0') |
123 | @@ -1589,7 +1589,7 @@ | |||
124 | 1589 | test -n "$ac_init_help" && exit $ac_status | 1589 | test -n "$ac_init_help" && exit $ac_status |
125 | 1590 | if $ac_init_version; then | 1590 | if $ac_init_version; then |
126 | 1591 | cat <<\_ACEOF | 1591 | cat <<\_ACEOF |
128 | 1592 | gjs configure 1.29.17 | 1592 | gjs configure 1.29.18 |
129 | 1593 | generated by GNU Autoconf 2.68 | 1593 | generated by GNU Autoconf 2.68 |
130 | 1594 | 1594 | ||
131 | 1595 | Copyright (C) 2010 Free Software Foundation, Inc. | 1595 | Copyright (C) 2010 Free Software Foundation, Inc. |
132 | @@ -2079,7 +2079,7 @@ | |||
133 | 2079 | This file contains any messages produced by compilers while | 2079 | This file contains any messages produced by compilers while |
134 | 2080 | running configure, to aid debugging if configure makes a mistake. | 2080 | running configure, to aid debugging if configure makes a mistake. |
135 | 2081 | 2081 | ||
137 | 2082 | It was created by gjs $as_me 1.29.17, which was | 2082 | It was created by gjs $as_me 1.29.18, which was |
138 | 2083 | generated by GNU Autoconf 2.68. Invocation command line was | 2083 | generated by GNU Autoconf 2.68. Invocation command line was |
139 | 2084 | 2084 | ||
140 | 2085 | $ $0 $@ | 2085 | $ $0 $@ |
141 | @@ -2894,7 +2894,7 @@ | |||
142 | 2894 | 2894 | ||
143 | 2895 | # Define the identity of the package. | 2895 | # Define the identity of the package. |
144 | 2896 | PACKAGE='gjs' | 2896 | PACKAGE='gjs' |
146 | 2897 | VERSION='1.29.17' | 2897 | VERSION='1.29.18' |
147 | 2898 | 2898 | ||
148 | 2899 | 2899 | ||
149 | 2900 | cat >>confdefs.h <<_ACEOF | 2900 | cat >>confdefs.h <<_ACEOF |
150 | @@ -2947,13 +2947,13 @@ | |||
151 | 2947 | 2947 | ||
152 | 2948 | 2948 | ||
153 | 2949 | 2949 | ||
156 | 2950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | 2950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5 |
157 | 2951 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | 2951 | $as_echo_n "checking whether to disable maintainer-specific portions of Makefiles... " >&6; } |
158 | 2952 | # Check whether --enable-maintainer-mode was given. | 2952 | # Check whether --enable-maintainer-mode was given. |
159 | 2953 | if test "${enable_maintainer_mode+set}" = set; then : | 2953 | if test "${enable_maintainer_mode+set}" = set; then : |
160 | 2954 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | 2954 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval |
161 | 2955 | else | 2955 | else |
163 | 2956 | USE_MAINTAINER_MODE=no | 2956 | USE_MAINTAINER_MODE=yes |
164 | 2957 | fi | 2957 | fi |
165 | 2958 | 2958 | ||
166 | 2959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | 2959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 |
167 | @@ -17790,7 +17790,7 @@ | |||
168 | 17790 | # report actual input values of CONFIG_FILES etc. instead of their | 17790 | # report actual input values of CONFIG_FILES etc. instead of their |
169 | 17791 | # values after options handling. | 17791 | # values after options handling. |
170 | 17792 | ac_log=" | 17792 | ac_log=" |
172 | 17793 | This file was extended by gjs $as_me 1.29.17, which was | 17793 | This file was extended by gjs $as_me 1.29.18, which was |
173 | 17794 | generated by GNU Autoconf 2.68. Invocation command line was | 17794 | generated by GNU Autoconf 2.68. Invocation command line was |
174 | 17795 | 17795 | ||
175 | 17796 | CONFIG_FILES = $CONFIG_FILES | 17796 | CONFIG_FILES = $CONFIG_FILES |
176 | @@ -17856,7 +17856,7 @@ | |||
177 | 17856 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 17856 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
178 | 17857 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 17857 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
179 | 17858 | ac_cs_version="\\ | 17858 | ac_cs_version="\\ |
181 | 17859 | gjs config.status 1.29.17 | 17859 | gjs config.status 1.29.18 |
182 | 17860 | configured by $0, generated by GNU Autoconf 2.68, | 17860 | configured by $0, generated by GNU Autoconf 2.68, |
183 | 17861 | with options \\"\$ac_cs_config\\" | 17861 | with options \\"\$ac_cs_config\\" |
184 | 17862 | 17862 | ||
185 | 17863 | 17863 | ||
186 | === modified file 'configure.ac' | |||
187 | --- configure.ac 2011-09-06 09:45:58 +0000 | |||
188 | +++ configure.ac 2011-09-21 16:48:23 +0000 | |||
189 | @@ -3,7 +3,7 @@ | |||
190 | 3 | 3 | ||
191 | 4 | m4_define(pkg_major_version, 1) | 4 | m4_define(pkg_major_version, 1) |
192 | 5 | m4_define(pkg_minor_version, 29) | 5 | m4_define(pkg_minor_version, 29) |
194 | 6 | m4_define(pkg_micro_version, 17) | 6 | m4_define(pkg_micro_version, 18) |
195 | 7 | m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version) | 7 | m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version) |
196 | 8 | 8 | ||
197 | 9 | AC_PREREQ(2.61) | 9 | AC_PREREQ(2.61) |
198 | @@ -16,7 +16,7 @@ | |||
199 | 16 | AC_SUBST([GETTEXT_PACKAGE]) | 16 | AC_SUBST([GETTEXT_PACKAGE]) |
200 | 17 | AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [The name of the gettext domain]) | 17 | AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [The name of the gettext domain]) |
201 | 18 | 18 | ||
203 | 19 | AM_MAINTAINER_MODE | 19 | AM_MAINTAINER_MODE([enable]) |
204 | 20 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 20 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
205 | 21 | 21 | ||
206 | 22 | # our first pkg-config invocation is conditional, ensure macros still work | 22 | # our first pkg-config invocation is conditional, ensure macros still work |
207 | 23 | 23 | ||
208 | === modified file 'debian/changelog' | |||
209 | --- debian/changelog 2011-09-06 09:45:58 +0000 | |||
210 | +++ debian/changelog 2011-09-21 16:48:23 +0000 | |||
211 | @@ -1,3 +1,10 @@ | |||
212 | 1 | gjs (1.29.18-0ubuntu1) oneiric; urgency=low | ||
213 | 2 | |||
214 | 3 | * New upstream release. | ||
215 | 4 | * debian/libgjs0c.symbols: Add 1 new symbol | ||
216 | 5 | |||
217 | 6 | -- Jeremy Bicha <jbicha@ubuntu.com> Wed, 21 Sep 2011 12:38:48 -0400 | ||
218 | 7 | |||
219 | 1 | gjs (1.29.17-0ubuntu1) oneiric; urgency=low | 8 | gjs (1.29.17-0ubuntu1) oneiric; urgency=low |
220 | 2 | 9 | ||
221 | 3 | * New upstream release. | 10 | * New upstream release. |
222 | 4 | 11 | ||
223 | === modified file 'debian/libgjs0c.symbols' | |||
224 | --- debian/libgjs0c.symbols 2011-08-17 17:02:38 +0000 | |||
225 | +++ debian/libgjs0c.symbols 2011-09-21 16:48:23 +0000 | |||
226 | @@ -75,6 +75,7 @@ | |||
227 | 75 | gjs_context_define_string_array@Base 0.7.1 | 75 | gjs_context_define_string_array@Base 0.7.1 |
228 | 76 | gjs_context_eval@Base 0.7.1 | 76 | gjs_context_eval@Base 0.7.1 |
229 | 77 | gjs_context_eval_file@Base 0.7.1 | 77 | gjs_context_eval_file@Base 0.7.1 |
230 | 78 | gjs_context_gc@Base 1.29.18 | ||
231 | 78 | gjs_context_get_all@Base 0.7.1 | 79 | gjs_context_get_all@Base 0.7.1 |
232 | 79 | gjs_context_get_native_context@Base 0.7.1 | 80 | gjs_context_get_native_context@Base 0.7.1 |
233 | 80 | gjs_context_get_type@Base 0.7.1 | 81 | gjs_context_get_type@Base 0.7.1 |
234 | 81 | 82 | ||
235 | === modified file 'gi/object.c' | |||
236 | --- gi/object.c 2011-07-22 21:56:42 +0000 | |||
237 | +++ gi/object.c 2011-09-21 16:48:23 +0000 | |||
238 | @@ -674,6 +674,7 @@ | |||
239 | 674 | if (unthreadsafe_template_for_constructor.gobj == NULL) { | 674 | if (unthreadsafe_template_for_constructor.gobj == NULL) { |
240 | 675 | GParameter *params; | 675 | GParameter *params; |
241 | 676 | int n_params; | 676 | int n_params; |
242 | 677 | GTypeQuery query; | ||
243 | 677 | 678 | ||
244 | 678 | gtype = g_registered_type_info_get_g_type( (GIRegisteredTypeInfo*) priv->info); | 679 | gtype = g_registered_type_info_get_g_type( (GIRegisteredTypeInfo*) priv->info); |
245 | 679 | if (gtype == G_TYPE_NONE) { | 680 | if (gtype == G_TYPE_NONE) { |
246 | @@ -692,6 +693,9 @@ | |||
247 | 692 | priv->gobj = g_object_newv(gtype, n_params, params); | 693 | priv->gobj = g_object_newv(gtype, n_params, params); |
248 | 693 | free_g_params(params, n_params); | 694 | free_g_params(params, n_params); |
249 | 694 | 695 | ||
250 | 696 | g_type_query(gtype, &query); | ||
251 | 697 | JS_updateMallocCounter(context, query.instance_size); | ||
252 | 698 | |||
253 | 695 | if (G_IS_INITIALLY_UNOWNED(priv->gobj) && | 699 | if (G_IS_INITIALLY_UNOWNED(priv->gobj) && |
254 | 696 | !g_object_is_floating(priv->gobj)) { | 700 | !g_object_is_floating(priv->gobj)) { |
255 | 697 | /* GtkWindow does not return a ref to caller of g_object_new. | 701 | /* GtkWindow does not return a ref to caller of g_object_new. |
256 | 698 | 702 | ||
257 | === modified file 'gjs/context.c' | |||
258 | --- gjs/context.c 2011-09-06 09:45:58 +0000 | |||
259 | +++ gjs/context.c 2011-09-21 16:48:23 +0000 | |||
260 | @@ -56,6 +56,8 @@ | |||
261 | 56 | guint prop_id, | 56 | guint prop_id, |
262 | 57 | const GValue *value, | 57 | const GValue *value, |
263 | 58 | GParamSpec *pspec); | 58 | GParamSpec *pspec); |
264 | 59 | static JSBool gjs_on_context_gc (JSContext *cx, | ||
265 | 60 | JSGCStatus status); | ||
266 | 59 | 61 | ||
267 | 60 | struct _GjsContext { | 62 | struct _GjsContext { |
268 | 61 | GObject parent; | 63 | GObject parent; |
269 | @@ -70,7 +72,10 @@ | |||
270 | 70 | 72 | ||
271 | 71 | char **search_path; | 73 | char **search_path; |
272 | 72 | 74 | ||
274 | 73 | unsigned int we_own_runtime : 1; | 75 | guint idle_emit_gc_id; |
275 | 76 | |||
276 | 77 | guint we_own_runtime : 1; | ||
277 | 78 | guint gc_notifications_enabled : 1; | ||
278 | 74 | }; | 79 | }; |
279 | 75 | 80 | ||
280 | 76 | struct _GjsContextClass { | 81 | struct _GjsContextClass { |
281 | @@ -79,19 +84,19 @@ | |||
282 | 79 | 84 | ||
283 | 80 | G_DEFINE_TYPE(GjsContext, gjs_context, G_TYPE_OBJECT); | 85 | G_DEFINE_TYPE(GjsContext, gjs_context, G_TYPE_OBJECT); |
284 | 81 | 86 | ||
285 | 82 | #if 0 | ||
286 | 83 | enum { | 87 | enum { |
287 | 88 | SIGNAL_GC, | ||
288 | 84 | LAST_SIGNAL | 89 | LAST_SIGNAL |
289 | 85 | }; | 90 | }; |
290 | 86 | 91 | ||
291 | 87 | static int signals[LAST_SIGNAL]; | 92 | static int signals[LAST_SIGNAL]; |
292 | 88 | #endif | ||
293 | 89 | 93 | ||
294 | 90 | enum { | 94 | enum { |
295 | 91 | PROP_0, | 95 | PROP_0, |
296 | 92 | PROP_JS_VERSION, | 96 | PROP_JS_VERSION, |
297 | 93 | PROP_SEARCH_PATH, | 97 | PROP_SEARCH_PATH, |
299 | 94 | PROP_RUNTIME | 98 | PROP_RUNTIME, |
300 | 99 | PROP_GC_NOTIFICATIONS | ||
301 | 95 | }; | 100 | }; |
302 | 96 | 101 | ||
303 | 97 | 102 | ||
304 | @@ -335,6 +340,22 @@ | |||
305 | 335 | PROP_JS_VERSION, | 340 | PROP_JS_VERSION, |
306 | 336 | pspec); | 341 | pspec); |
307 | 337 | 342 | ||
308 | 343 | pspec = g_param_spec_boolean("gc-notifications", | ||
309 | 344 | "", | ||
310 | 345 | "Whether or not to emit the \"gc\" signal", | ||
311 | 346 | FALSE, | ||
312 | 347 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); | ||
313 | 348 | |||
314 | 349 | g_object_class_install_property(object_class, | ||
315 | 350 | PROP_GC_NOTIFICATIONS, | ||
316 | 351 | pspec); | ||
317 | 352 | |||
318 | 353 | signals[SIGNAL_GC] = g_signal_new("gc", G_TYPE_FROM_CLASS(klass), | ||
319 | 354 | G_SIGNAL_RUN_LAST, 0, | ||
320 | 355 | NULL, NULL, | ||
321 | 356 | NULL, | ||
322 | 357 | G_TYPE_NONE, 0); | ||
323 | 358 | |||
324 | 338 | gjs_register_native_module("byteArray", gjs_define_byte_array_stuff, 0); | 359 | gjs_register_native_module("byteArray", gjs_define_byte_array_stuff, 0); |
325 | 339 | } | 360 | } |
326 | 340 | 361 | ||
327 | @@ -386,6 +407,11 @@ | |||
328 | 386 | 407 | ||
329 | 387 | js_context = GJS_CONTEXT(object); | 408 | js_context = GJS_CONTEXT(object); |
330 | 388 | 409 | ||
331 | 410 | if (js_context->idle_emit_gc_id > 0) { | ||
332 | 411 | g_source_remove (js_context->idle_emit_gc_id); | ||
333 | 412 | js_context->idle_emit_gc_id = 0; | ||
334 | 413 | } | ||
335 | 414 | |||
336 | 389 | if (js_context->search_path != NULL) { | 415 | if (js_context->search_path != NULL) { |
337 | 390 | g_strfreev(js_context->search_path); | 416 | g_strfreev(js_context->search_path); |
338 | 391 | js_context->search_path = NULL; | 417 | js_context->search_path = NULL; |
339 | @@ -674,6 +700,9 @@ | |||
340 | 674 | /* For GjsDBus */ | 700 | /* For GjsDBus */ |
341 | 675 | g_irepository_prepend_search_path(PKGLIBDIR); | 701 | g_irepository_prepend_search_path(PKGLIBDIR); |
342 | 676 | 702 | ||
343 | 703 | if (js_context->gc_notifications_enabled) | ||
344 | 704 | JS_SetGCCallback(js_context->context, gjs_on_context_gc); | ||
345 | 705 | |||
346 | 677 | JS_EndRequest(js_context->context); | 706 | JS_EndRequest(js_context->context); |
347 | 678 | 707 | ||
348 | 679 | g_static_mutex_lock (&contexts_lock); | 708 | g_static_mutex_lock (&contexts_lock); |
349 | @@ -697,6 +726,9 @@ | |||
350 | 697 | case PROP_JS_VERSION: | 726 | case PROP_JS_VERSION: |
351 | 698 | g_value_set_string(value, js_context->jsversion_string); | 727 | g_value_set_string(value, js_context->jsversion_string); |
352 | 699 | break; | 728 | break; |
353 | 729 | case PROP_GC_NOTIFICATIONS: | ||
354 | 730 | g_value_set_boolean(value, js_context->gc_notifications_enabled); | ||
355 | 731 | break; | ||
356 | 700 | default: | 732 | default: |
357 | 701 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 733 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
358 | 702 | break; | 734 | break; |
359 | @@ -727,7 +759,9 @@ | |||
360 | 727 | else | 759 | else |
361 | 728 | js_context->jsversion_string = g_value_dup_string(value); | 760 | js_context->jsversion_string = g_value_dup_string(value); |
362 | 729 | break; | 761 | break; |
364 | 730 | 762 | case PROP_GC_NOTIFICATIONS: | |
365 | 763 | js_context->gc_notifications_enabled = g_value_get_boolean(value); | ||
366 | 764 | break; | ||
367 | 731 | default: | 765 | default: |
368 | 732 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 766 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
369 | 733 | break; | 767 | break; |
370 | @@ -866,6 +900,45 @@ | |||
371 | 866 | } | 900 | } |
372 | 867 | 901 | ||
373 | 868 | /** | 902 | /** |
374 | 903 | * gjs_context_gc: | ||
375 | 904 | * @context: a #GjsContext | ||
376 | 905 | * | ||
377 | 906 | * Initiate a full GC; may or may not block until complete. This | ||
378 | 907 | * function just calls Spidermonkey JS_GC(). | ||
379 | 908 | */ | ||
380 | 909 | void | ||
381 | 910 | gjs_context_gc (GjsContext *context) | ||
382 | 911 | { | ||
383 | 912 | JS_GC(context->context); | ||
384 | 913 | } | ||
385 | 914 | |||
386 | 915 | static gboolean | ||
387 | 916 | gjs_context_idle_emit_gc (gpointer data) | ||
388 | 917 | { | ||
389 | 918 | GjsContext *gjs_context = data; | ||
390 | 919 | |||
391 | 920 | gjs_context->idle_emit_gc_id = 0; | ||
392 | 921 | |||
393 | 922 | g_signal_emit (gjs_context, signals[SIGNAL_GC], 0); | ||
394 | 923 | |||
395 | 924 | return FALSE; | ||
396 | 925 | } | ||
397 | 926 | |||
398 | 927 | static JSBool | ||
399 | 928 | gjs_on_context_gc (JSContext *cx, | ||
400 | 929 | JSGCStatus status) | ||
401 | 930 | { | ||
402 | 931 | GjsContext *gjs_context = JS_GetContextPrivate(cx); | ||
403 | 932 | |||
404 | 933 | if (status == JSGC_END) { | ||
405 | 934 | if (gjs_context->idle_emit_gc_id == 0) | ||
406 | 935 | gjs_context->idle_emit_gc_id = g_idle_add (gjs_context_idle_emit_gc, gjs_context); | ||
407 | 936 | } | ||
408 | 937 | |||
409 | 938 | return TRUE; | ||
410 | 939 | } | ||
411 | 940 | |||
412 | 941 | /** | ||
413 | 869 | * gjs_context_get_all: | 942 | * gjs_context_get_all: |
414 | 870 | * | 943 | * |
415 | 871 | * Returns a newly-allocated list containing all known instances of #GjsContext. | 944 | * Returns a newly-allocated list containing all known instances of #GjsContext. |
416 | 872 | 945 | ||
417 | === modified file 'gjs/context.h' | |||
418 | --- gjs/context.h 2011-02-27 00:27:14 +0000 | |||
419 | +++ gjs/context.h 2011-09-21 16:48:23 +0000 | |||
420 | @@ -75,6 +75,8 @@ | |||
421 | 75 | 75 | ||
422 | 76 | void gjs_context_maybe_gc (GjsContext *context); | 76 | void gjs_context_maybe_gc (GjsContext *context); |
423 | 77 | 77 | ||
424 | 78 | void gjs_context_gc (GjsContext *context); | ||
425 | 79 | |||
426 | 78 | void gjs_dumpstack (void); | 80 | void gjs_dumpstack (void); |
427 | 79 | 81 | ||
428 | 80 | G_END_DECLS | 82 | G_END_DECLS |
Thank you for your work there