Closed Bug 301970 Opened 19 years ago Closed 19 years ago

window.open() for a given window fails the second time.

Categories

(Camino Graveyard :: General, defect, P2)

PowerPC
macOS

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

References

Details

(Keywords: regression)

Attachments

(1 file)

When a page uses window.open() to open a window, like:

window.open('http://www.smfr.org', 'window_name', 'scrollbars=0,resizable=no')

if you close the resulting window and click the button again, no window is opened.

My guess is that the nsWindowWatcher thinks the window is still around, so
refuses to open a 2nd one.
Attached file Testcase
I debugged this. The code path between the working first click, and the broken
second click on the button diverges in nsJSEventListener::HandleEvent() on the

if (JS_TypeOfValue(cx, funval) != JSTYPE_FUNCTION)

test. The first time, funval is something reasonable. The second time, it's
0x80000001 so we bail.

I've no idea why this is broken. When the popup is closed, we're calling
nsWindowWatcher::RemoveWindow(), so it's not a nsWindowWatcher issue.
Possibly a recent regression, could break some sites.
Severity: normal → major
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Camino0.9
Keywords: regression
The patch in bug 301316 should fix this.
Depends on: 301316
Should probably retest in tomorrow's builds before resolving...
The testcase in comment 2 works now (20050730), so marking this fixed per comment 5.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: