Skip to content
Snippets Groups Projects
Commit 17d7433c authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 460599 - Allow external web feed application to work without gnome...

Bug 460599 - Allow external web feed application to work without gnome libraries; r=(gavin.sharp + myk)
parent dea22d19
No related branches found
No related tags found
No related merge requests found
......@@ -447,10 +447,22 @@ var FeedResultService = {
else
spec = "feed:" + spec;
var ss =
Cc["@mozilla.org/browser/shell-service;1"].
getService(Ci.nsIShellService);
ss.openApplicationWithURI(clientApp, spec);
// Retrieving the shell service might fail on some systems, most
// notably systems where GNOME is not installed.
try {
var ss =
Cc["@mozilla.org/browser/shell-service;1"].
getService(Ci.nsIShellService);
ss.openApplicationWithURI(clientApp, spec);
} catch(e) {
// If we couldn't use the shell service, fallback to using a
// nsIProcess instance
var p =
Cc["@mozilla.org/process/util;1"].
createInstance(Ci.nsIProcess);
p.init(clientApp);
p.run(false, [spec], 1);
}
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment