Skip to content

Commit 94abc8e

Browse files
committed
Bug 672843 part D2 - Fix the xpconnect exception code and Components.results to prefer the name NS_ERROR_ILLEGAL_VALUE over the other synonyms. Fix a few tests that rely on exception names to use exception values instead. r=bholley
1 parent a09d769 commit 94abc8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_psl.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ var etld = Cc["@mozilla.org/network/effective-tld-service;1"]
44
var idna = Cc["@mozilla.org/network/idn-service;1"]
55
.getService(Ci.nsIIDNService);
66

7+
var Cr = Components.results;
8+
79
function run_test()
810
{
911
var file = do_get_file("data/test_psl.txt");
@@ -21,8 +23,8 @@ function checkPublicSuffix(host, expectedSuffix)
2123
var actualSuffix = null;
2224
try {
2325
actualSuffix = etld.getBaseDomainFromHost(host);
24-
} catch (e if e.name == "NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS" ||
25-
e.name == "NS_ERROR_ILLEGAL_VALUE") {
26+
} catch (e if e.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS ||
27+
e.result == Cr.NS_ERROR_ILLEGAL_VALUE) {
2628
}
2729
// The EffectiveTLDService always gives back punycoded labels.
2830
// The test suite wants to get back what it put in.

0 commit comments

Comments
 (0)