[Pkg-mozext-commits] [adblock-plus] 39/87: Noissue - Fix messageResponder for Firefox
David Prévot
taffit at moszumanska.debian.org
Sat Apr 30 17:59:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 52f6a930360be12badf5225fdd09a3cdc89b28cd
Author: Wladimir Palant <trev at adblockplus.org>
Date: Wed Mar 16 14:44:04 2016 +0100
Noissue - Fix messageResponder for Firefox
Review: https://codereview.adblockplus.org/29338430/
---
messageResponder.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/messageResponder.js b/messageResponder.js
index 50a9196..51ebce7 100644
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -143,7 +143,16 @@
case "app.get":
if (message.what == "issues")
{
- var subscriptionInit = require("subscriptionInit");
+ var subscriptionInit;
+ try
+ {
+ subscriptionInit = require("subscriptionInit");
+ }
+ catch (e)
+ {
+ // Expected exception, this module doesn't exist on Firefox
+ }
+
var info = require("info");
callback({
filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitialized : false,
@@ -355,7 +364,7 @@
}
break;
case "subscriptions.update":
- var subscriptions = message.url ? [Subscription.fromURL(message.url)] :
+ var subscriptions = message.url ? [Subscription.fromURL(message.url)] :
FilterStorage.subscriptions;
for (var i = 0; i < subscriptions.length; i++)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list