Open Bug 613695 Opened 14 years ago Updated 2 years ago

getChromeWindow in prompter / pwmgr will throw when called with a chrome window

Categories

(Toolkit :: General, defect)

defect

Tracking

()

People

(Reporter: Dolske, Unassigned)

Details

From bug 59314 comment 153:

> >+    getTabModalPrompt : function (domWin) {
> 
> >+        // Given a content DOM window, returns the chrome window it's in.
> >+        function getChromeWindow(aWindow) {
> 
> This will actually fail if aWindow *is* a chrome window (chromeEventHandler is
> null for chrome windows). We don't care about supporting tabmodal prompts
> parented to chrome windows, but perhaps that should be more explicit (by
> handling a null chromeEventHandler and returning null), rather than having it
> throw and be caught in the try/catch below. This applies equally to the same
> code in nsLoginManagerPrompter.js, so maybe just file a followup?

Seems like an explicit null-return would be good.
> >+            var promptWin = domWin.top
> 
> The fact that getChromeWindow() uses chromeEventHandler makes this unnecessary

(note to self: should nuke this anywhere it's being done)
Assignee: dolske → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.