Title: [91271] trunk/Source/WebKit2
- Revision
- 91271
- Author
- [email protected]
- Date
- 2011-07-19 10:40:17 -0700 (Tue, 19 Jul 2011)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (91270 => 91271)
--- trunk/Source/WebKit2/ChangeLog 2011-07-19 17:39:03 UTC (rev 91270)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-19 17:40:17 UTC (rev 91271)
@@ -1,3 +1,15 @@
+2011-07-19 Brian Weinstein <[email protected]>
+
+ 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 <[email protected]>
Speculative fix for: Crash under WebPage::platformDragEnded when dragging on Mac
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (91270 => 91271)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm 2011-07-19 17:39:03 UTC (rev 91270)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm 2011-07-19 17:40:17 UTC (rev 91271)
@@ -173,6 +173,10 @@
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];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes