[arch-commits] Commit in cinnamon/trunk (PKGBUILD remove_GC.patch)
Balló György
bgyorgy at nymeria.archlinux.org
Wed Aug 14 21:27:32 UTC 2013
Date: Wednesday, August 14, 2013 @ 23:27:31
Author: bgyorgy
Revision: 95590
upgpkg: cinnamon 1.8.8-4
Fix crasher when disconnecting from wifi
Added:
cinnamon/trunk/remove_GC.patch
Modified:
cinnamon/trunk/PKGBUILD
-----------------+
PKGBUILD | 7 ++-
remove_GC.patch | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 130 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-08-14 21:07:27 UTC (rev 95589)
+++ PKGBUILD 2013-08-14 21:27:31 UTC (rev 95590)
@@ -6,7 +6,7 @@
pkgname=cinnamon
pkgver=1.8.8
-pkgrel=3
+pkgrel=4
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
url="http://cinnamon.linuxmint.com/"
@@ -26,6 +26,7 @@
options=('!libtool' '!emptydirs')
install=${pkgname}.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz"
+ "remove_GC.patch"
"keyboard_applet.patch"
"fix-control-center-check.patch"
"gnome-3.8.patch"
@@ -36,6 +37,7 @@
"bluetooth_obex_transfer.patch"
"disable-mpris-support.patch")
sha256sums=('1bce982e6333e7bd27a1df9f37eb9139360c2fef667c7a998a79f216d4a0921d'
+ '3d362efd15f8cfeca1713f5bcf88d4be787b39d7c7f24b73cd13f867af33a680'
'a0c05c995102b16f1060cbd43931eeaefeafd0265a0335e4ca14a143bd4c8c30'
'ee5694bdc997ffa35a817f691b15bae13747137d35ec2aecd0da298d7edbe426'
'01508c4f41664d5e29f700dc77c9f5c5441f128ab759f0ae8325c5fdda70b00e'
@@ -55,6 +57,9 @@
files/usr/share/$pkgname/applets/panel-launchers@$pkgname.org/$pkgname-add-panel-launcher.py
find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
+ # Fix crasher when disconnecting from wifi
+ patch -Np1 -i ../remove_GC.patch
+
# Fix Keyboard applet
# https://github.com/linuxmint/Cinnamon/issues/1337
patch -Np1 -i ../keyboard_applet.patch
Added: remove_GC.patch
===================================================================
--- remove_GC.patch (rev 0)
+++ remove_GC.patch 2013-08-14 21:27:31 UTC (rev 95590)
@@ -0,0 +1,124 @@
+--- a/src/cinnamon-global.c
++++ b/src/cinnamon-global.c
+@@ -1399,35 +1399,6 @@ cinnamon_global_reexec_self (CinnamonGlo
+ g_ptr_array_free (arr, TRUE);
+ }
+
+-/**
+- * cinnamon_global_gc:
+- * @global: A #CinnamonGlobal
+- *
+- * Start a garbage collection process. For more information, see
+- * https://developer.mozilla.org/En/JS_GC
+- */
+-void
+-cinnamon_global_gc (CinnamonGlobal *global)
+-{
+- JSContext *context = gjs_context_get_native_context (global->js_context);
+-
+- JS_GC (context);
+-}
+-
+-/**
+- * cinnamon_global_maybe_gc:
+- * @global: A #CinnamonGlobal
+- *
+- * Start a garbage collection process when it would free up enough memory
+- * to be worth the amount of time it would take
+- * https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC
+- */
+-void
+-cinnamon_global_maybe_gc (CinnamonGlobal *global)
+-{
+- gjs_context_maybe_gc (global->js_context);
+-}
+-
+ static void
+ cinnamon_global_on_gc (GjsContext *context,
+ CinnamonGlobal *global)
+@@ -1768,13 +1768,6 @@ run_leisure_functions (gpointer data)
+ if (global->work_count > 0)
+ return FALSE;
+
+- /* Previously we called gjs_maybe_gc(). However, it simply doesn't
+- * trigger often enough. Garbage collection is very fast here, so
+- * let's just aggressively GC. This will help avoid both heap
+- * fragmentation, and the GC kicking in when we don't want it to.
+- */
+- gjs_context_gc (global->js_context);
+-
+ /* No leisure closures, so we are done */
+ if (global->leisure_closures == NULL)
+ return FALSE;
+--- a/src/cinnamon-global.h
++++ b/src/cinnamon-global.h
+@@ -88,10 +88,6 @@ void cinnamon_global_set_pointer
+ int y);
+
+
+-/* JavaScript utilities */
+-void cinnamon_global_gc (CinnamonGlobal *global);
+-void cinnamon_global_maybe_gc (CinnamonGlobal *global);
+-
+ typedef struct {
+ guint glibc_uordblks;
+
+
+
+--- a/js/perf/core.js
++++ b/js/perf/core.js
+@@ -1,5 +1,7 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
++const System = imports.system;
++
+ const Main = imports.ui.main;
+ const Scripting = imports.ui.scripting;
+
+@@ -99,7 +101,7 @@ function run() {
+ Main.overview.hide();
+ yield Scripting.waitLeisure();
+
+- global.gc();
++ System.gc();
+ yield Scripting.sleep(1000);
+ Scripting.collectStatistics();
+ Scripting.scriptEvent('afterShowHide');
+--- a/js/ui/lookingGlass.js
++++ b/js/ui/lookingGlass.js
+@@ -11,6 +11,7 @@ const St = imports.gi.St;
+ const Cinnamon = imports.gi.Cinnamon;
+ const Signals = imports.signals;
+ const Lang = imports.lang;
++const System = imports.system;
+
+ const History = imports.misc.history;
+ const Extension = imports.ui.extension;
+@@ -680,7 +681,7 @@ Memory.prototype = {
+
+ this._gcbutton = new St.Button({ label: 'Full GC',
+ style_class: 'lg-obj-inspector-button' });
+- this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); }));
++ this._gcbutton.connect('clicked', Lang.bind(this, function () { System.gc(); this._renderText(); }));
+ this.actor.add(this._gcbutton, { x_align: St.Align.START,
+ x_fill: false });
+
+--- a/js/ui/lookingGlassDBus.js
++++ b/js/ui/lookingGlassDBus.js
+@@ -1,5 +1,7 @@
+ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
++const System = imports.system;
++
+ const Gio = imports.gi.Gio;
+ const Main = imports.ui.main;
+ const Extension = imports.ui.extension;
+@@ -99,7 +101,7 @@ CinnamonLookingGlass.prototype = {
+ },
+
+ FullGc: function() {
+- global.gc();
++ System.gc();
+ },
+
+ Inspect: function(path) {
More information about the arch-commits
mailing list