Commit 855f2577 authored by bweinstein@apple.com's avatar bweinstein@apple.com

Add back a change that was accidentally removed in r91266.

        
Make sure to retain the WKPasteboardFilePromiseOwner before calling draggedImage because draggedImage releases
its responder. Also make the comment more explicit, to keep this mistake from being made in the future.
        
Rubber-stamped by Darin Adler.

* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::dragEnded):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 820d7147
2011-07-19 Brian Weinstein <bweinstein@apple.com>
Add back a change that was accidentally removed in r91266.
Make sure to retain the WKPasteboardFilePromiseOwner before calling draggedImage because draggedImage releases
its responder. Also make the comment more explicit, to keep this mistake from being made in the future.
Rubber-stamped by Darin Adler.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::dragEnded):
2011-07-18 Brian Weinstein <bweinstein@apple.com>
Speculative fix for: Crash under WebPage::platformDragEnded when dragging on Mac
......
......@@ -173,6 +173,10 @@ void WebDragClient::declareAndWriteDragImage(NSPasteboard *pasteboard, DOMElemen
void WebDragClient::dragEnded()
{
// The draggedImage method releases its responder; we must retain the WKPasteboardFilePromiseOwner an extra time to balance the release
// inside of the function.
[m_filePromiseOwner.get() retain];
// The drag source we care about here is NSFilePromiseDragSource, which doesn't look at
// the arguments. It's OK to just pass arbitrary constant values, so we just pass all zeroes.
[m_filePromiseOwner.get() draggedImage:nil endedAt:NSZeroPoint operation:NSDragOperationNone];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment