Closed Bug 296300 Opened 19 years ago Closed 19 years ago

Crash when minimizing window that has onfocus/onblur=window.close()


(Core :: DOM: Events, defect)

Not set





(Reporter: martijn.martijn, Assigned: MatsPalmgren_bugz)




(Keywords: crash, regression, testcase)


(4 files, 1 obsolete file)

See upcoming testcase

- Press the button in the testcase, popup window should come up
- Click on the minimize button of the window

Result: crash
Attached file Testcase
This is a regression from bug 242111.  We now hold weak refs to focus
controllers across event dispatch in several places, so we're probably making
method calls on dead objects.  I'm not sure where it's safe to hold weak refs
here, though; my first instinct would be "nowhere where we dispatch an event or
set focus".
Assignee: events → bryner
Blocks: 242111
Flags: blocking1.8b3?
Attached patch Fix up one spot that crashes (obsolete) — Splinter Review
There are probably others that need similar treatment...
Keywords: crash
I don't crash with build 2005-06-11-05 on Windows XP Seamonkey trunk.
Attached file Testcase #2 (onfocus)
Same as the first testcase but uses 'onfocus' instead of 'onblur'.
Both testcases crashes Firefox on Windows XP, only the second (this) on Linux.
Attachment #187310 - Attachment is patch: false
Attachment #187310 - Attachment mime type: text/plain → text/html
Attached patch Patch rev. 2Splinter Review
I found one more spot that needed fixing (for Testcase #2).
The remaining |focusController| pointers are very local and have no event
handling in their scope so they should be safe.
Attachment #185106 - Attachment is obsolete: true
Attachment #187311 - Flags: superreview?(bryner)
Attachment #187311 - Flags: review?(bryner)
Assignee: bryner → mats.palmgren
OS: Windows XP → All
Summary: Crash when minimizing window that has onblur=window.close() → Crash when minimizing window that has onfocus/onblur=window.close()
No l10n impact, but we should really get this reviewed and landed.
Flags: blocking1.8b3?
Flags: blocking1.8b3-
Flags: blocking-aviary1.1+
Flags: blocking1.8b4?
Comment on attachment 187311 [details] [diff] [review]
Patch rev. 2

r+sr=bzbarsky.	requesting 1.8b3 approval for this very very safe crash fix.
Attachment #187311 - Flags: superreview?(bryner)
Attachment #187311 - Flags: superreview+
Attachment #187311 - Flags: review?(bryner)
Attachment #187311 - Flags: review+
Attachment #187311 - Flags: approval1.8b3?
Attachment #187311 - Flags: approval1.8b3? → approval1.8b3+
Checked in 2005-07-02 15:58 PDT

Closed: 19 years ago
Flags: blocking1.8b4?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.