Summary: | Closing a tab while dragging crashes Safari | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> | ||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, dev+webkit | ||||
Priority: | P1 | Keywords: | PlatformOnly | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Eric Seidel (no email)
2008-03-26 09:32:22 PDT
I cannot reproduce - nothing happens for me when pressing Cmd+W (of course, I did have Safari in the foreground when doing this). I just hit this; little bit clearer steps to reproduce: 1. Open Safari and create a window with two tabs 2. Open TextEdit 3. Create new document in TextEdit and save the document. 4. After saving and the proxy icon appearing in the toolbar, drag the proxy icon and Cmd + Tab to Safari 5. Cmd + W to close one of the tabs 6. BOOM Debug stack trace: Thread 0 Crashed: 0 com.apple.WebKit 0x001c2081 WTF::OwnPtr<WebCore::DragController>::get() const + 9 (OwnPtr.h:72) 1 com.apple.WebKit 0x001c209a WebCore::Page::dragController() const + 20 (Page.h:109) 2 com.apple.WebKit 0x00228f58 -[WebView draggingUpdated:] + 388 (WebView.mm:2509) 3 com.apple.AppKit 0x9389e146 sendDraggingUpdate + 151 4 com.apple.CoreFoundation 0x900a7b5e CFRunLoopRunSpecific + 4494 5 com.apple.CoreFoundation 0x900a7d18 CFRunLoopRunInMode + 88 6 com.apple.AppKit 0x93807bd8 _NSUnhighlightCarbonMenu + 127 7 com.apple.AppKit 0x9374b4f3 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 254 8 com.apple.AppKit 0x9374b157 -[NSMenu performKeyEquivalent:] + 866 9 com.apple.AppKit 0x937499fd -[NSApplication _handleKeyEquivalent:] + 492 10 com.apple.AppKit 0x93666b36 -[NSApplication sendEvent:] + 3838 11 com.apple.Safari 0x0002af88 0x1000 + 171912 12 com.apple.AppKit 0x935c40f9 -[NSApplication run] + 847 13 com.apple.AppKit 0x9359130a NSApplicationMain + 574 14 com.apple.Safari 0x000b9a76 0x1000 + 756342 This only happens on OS X. Created attachment 20704 [details]
Patch
This patch adds some null checks to the drag code; I don't think a test is possible since it requires dragging in an external file.
Comment on attachment 20704 [details]
Patch
r=me
Committed revision 32282. A comment in the code to have explained why the null check was necessary would have been preferred. The patch looks great though. |