[gnome-shell] [shellDBus] Avoid sending undefined over DBus
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] [shellDBus] Avoid sending undefined over DBus
- Date: Fri, 13 Nov 2009 17:44:51 +0000 (UTC)
commit 7c796b2d2ad7b2de6ccaf36ad0288a473dd69d4b
Author: Colin Walters <walters verbum org>
Date: Thu Nov 12 18:17:58 2009 -0500
[shellDBus] Avoid sending undefined over DBus
DBus doesn't have a notion of null/undefined, so do the lame
thing and return the empty string.
js/ui/shellDBus.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 1d998ef..8ff743e 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -48,6 +48,9 @@ GnomeShell.prototype = {
let success;
try {
returnValue = JSON.stringify(eval(code));
+ // A hack; DBus doesn't have null/undefined
+ if (returnValue == undefined)
+ returnValue = "";
success = true;
} catch (e) {
returnValue = JSON.stringify(e);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]