Closed Bug 336587 Opened 18 years ago Closed 18 years ago

Crash when window gets destroyed during DOMMouseScroll event

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: smaug)

Details

(4 keywords)

Attachments

(4 files)

See upcoming testcase, which crashes Mozilla builds when using the mousewheel over the iframe.
The crash also happens in Mozilla1.7, so no recent regression.

Talkback ID: TB18285705H
nsEventStateManager::DoScrollText   nsEventStateManager::PostHandleEvent   g_TOKEN_Directories
0x8b57f685
Attached file testcase
Attached patch proposed patchSplinter Review
Assignee: events → Olli.Pettay
Status: NEW → ASSIGNED
Attachment #220773 - Flags: superreview?(bzbarsky)
Attachment #220773 - Flags: review?(bzbarsky)
Attachment #220773 - Flags: superreview?(bzbarsky)
Attachment #220773 - Flags: superreview+
Attachment #220773 - Flags: review?(bzbarsky)
Attachment #220773 - Flags: review+
Checking in nsEventStateManager.cpp;
/cvsroot/mozilla/content/events/src/nsEventStateManager.cpp,v  <--  nsEventStateManager.cpp
new revision: 1.646; previous revision: 1.645
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Verified FIXED using build 2006-05-04-16 of SeaMonkey trunk on Windows XP with the testcase: https://bugzilla.mozilla.org/attachment.cgi?id=220770&action=view.

No crash when using the mouse's scrollwheel.
Status: RESOLVED → VERIFIED
Flags: blocking1.8.1?
Flags: blocking1.8.0.5?
Comment on attachment 220773 [details] [diff] [review]
proposed patch

Safe fix, just adding a null check.
Attachment #220773 - Flags: approval1.8.0.5?
Attachment #220773 - Flags: approval-branch-1.8.1?(bzbarsky)
Comment on attachment 220773 [details] [diff] [review]
proposed patch

Looks ok, but what's making sure aPresContext is alive here?  Do we need to hold a local strong ref to it?
Attachment #220773 - Flags: approval-branch-1.8.1?(bzbarsky) → approval-branch-1.8.1+
the event object has a strong reference to the prescontext.
Flags: blocking1.8.1?
Keywords: fixed1.8.1
Flags: blocking1.8.0.5? → blocking1.8.0.5+
Comment on attachment 220773 [details] [diff] [review]
proposed patch

wrong patch for branch
Attachment #220773 - Flags: approval1.8.0.5? → approval1.8.0.5-
Comment on attachment 222160 [details] [diff] [review]
1.8 version of the patch

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #222160 - Flags: approval1.8.0.5+
Keywords: fixed1.8.0.5
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: