Closed Bug 296300 Opened 19 years ago Closed 19 years ago
Crash when minimizing window that has onfocus/onblur=window
551 bytes, text/html
2.98 KB, text/plain
612 bytes, text/html
2.44 KB, patch
|Details | Diff | Splinter Review|
See upcoming testcase - Press the button in the testcase, popup window should come up - Click on the minimize button of the window Result: crash
It looks like it is a regression, doesn't crash with 2004-05-03 build, crashes with 2004-05-04 build: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-05-03+08%3A00%3A00&maxdate=2004-05-04+10%3A00%3A00&cvsroot=%2Fcvsroot
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
There are probably others that need similar treatment...
I don't crash with build 2005-06-11-05 on Windows XP Seamonkey trunk.
Same as the first testcase but uses 'onfocus' instead of 'onblur'. Both testcases crashes Firefox on Windows XP, only the second (this) on Linux.
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.
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.
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: approval1.8b3? → approval1.8b3+
Checked in 2005-07-02 15:58 PDT -> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.