[Pkg-mozext-commits] [perspectives-extension] 32/72: fixed in getNotaryList: split try-catch for additional and default notaries, fixes test case "garbled string" fixed in test.html "unreachable notaries"
David Prévot
taffit at moszumanska.debian.org
Thu Dec 11 02:12:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository perspectives-extension.
commit 9c115ce84d986a5b7dca13c89493b69a27419cab
Author: Gerold Meisinger <gerold.meisinger at gmail.com>
Date: Sat Oct 18 12:54:49 2014 +0100
fixed in getNotaryList: split try-catch for additional and default notaries, fixes test case "garbled string"
fixed in test.html "unreachable notaries"
---
plugin/chrome/content/notaries.js | 12 ++++++++----
test/test.html | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/plugin/chrome/content/notaries.js b/plugin/chrome/content/notaries.js
index bed81e7..7341178 100644
--- a/plugin/chrome/content/notaries.js
+++ b/plugin/chrome/content/notaries.js
@@ -239,15 +239,19 @@ var Perspectives = {
var list_txt = Perspectives.root_prefs.getCharPref("perspectives.additional_notary_list");
var additional_notaries = Pers_util.loadNotaryListFromString(list_txt);
all_notaries = all_notaries.concat(additional_notaries);
+ } catch(e) {
+ Pers_debug.d_print("error", "Error parsing additional notaries: " + e);
+ }
- var use_default_notaries = Perspectives.root_prefs.getBoolPref("perspectives.use_default_notary_list");
- if(use_default_notaries) {
+ var use_default_notaries = Perspectives.root_prefs.getBoolPref("perspectives.use_default_notary_list");
+ if(use_default_notaries) {
+ try {
var default_notaries = Pers_util.loadNotaryListFromString(
Perspectives.root_prefs.getCharPref("perspectives.default_notary_list"));
all_notaries = all_notaries.concat(default_notaries);
+ } catch(e) {
+ Pers_debug.d_print("error", "Error parsing default notaries: " + e);
}
- } catch(e) {
- Pers_debug.d_print("error", "Error parsing additional notaries: " + e);
}
return all_notaries;
diff --git a/test/test.html b/test/test.html
index adfdf40..9bccacd 100644
--- a/test/test.html
+++ b/test/test.html
@@ -324,7 +324,7 @@ function nonrouted_ips() {
for(var i = 0; i < ips.length; i++) {
var ip = ips[i];
- assert(Perspectives.is_nonrouted_ip(host) === true, host);
+ assert(Perspectives.is_nonrouted_ip(ip) === true, ip);
}
write_string("Done!");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git
More information about the Pkg-mozext-commits
mailing list