summaryrefslogtreecommitdiff
path: root/js/src/tests/e4x/extensions/regress-595207.js
blob: 5ab1a0c933d3380f6c1ae24689a3a9bebe99ed61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

var summary = "Recognize the function namespace anti-URI";
var expect = "1";
var actual;

function alert(s) {
    actual = String(s);
}

var a = "@mozilla.org/js/function";
try {
    a::alert("1");
} catch (e) {
    <></>.function::['x'];
    try {
        a::alert("2 " + e);
    } catch (e) {
        alert("3 " + e);
    }
}

reportCompare(expect, actual, summary);