confirming. same js error shows up for me
Why was this assigned to Ben?
I assume this is a CAPS issue: the example will throw an exception when launched as './mozilla -chrome file:///foo.xul', but will work without error when either (1) loaded as browser content, or (2) loaded with './mozilla -chrome chrome://navigator/content/foo.xul'
giving to danm for triage, cc mstoltz for possible CAPS involvement
This is totally a security issue. The problem is, the JS Alert() window is, internally, turned into a chrome url. CAPS disallows a document loaded from a file protocol from accessing a document using the chrome protocol. I'm not a security maven. I think there are situations where scripts are legitimately disallowed from throwing alerts. Whether this is one of them, I don't know. If not, we're going to have to come up with some clever scheme to distinguish CommonDialog chrome URLs from run-of-the-mill chrome URLs. Turning over to mstoltz for comment.
This is a known issue, and I have a temporary fix ready to go in until we can come up with a sensible chrome security policy. *** This bug has been marked as a duplicate of 42076 ***