Title: [98149] branches/safari-534.52-branch/Source/WebKit2
Revision
98149
Author
lforsch...@apple.com
Date
2011-10-21 14:10:39 -0700 (Fri, 21 Oct 2011)

Log Message

Merged r97808.

Modified Paths

Diff

Modified: branches/safari-534.52-branch/Source/WebKit2/ChangeLog (98148 => 98149)


--- branches/safari-534.52-branch/Source/WebKit2/ChangeLog	2011-10-21 21:09:20 UTC (rev 98148)
+++ branches/safari-534.52-branch/Source/WebKit2/ChangeLog	2011-10-21 21:10:39 UTC (rev 98149)
@@ -1,5 +1,29 @@
 2011-10-21  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 97808
+
+    2011-10-18  Enrica Casucci  <enr...@apple.com>
+
+            Crash in WebProcess at com.apple.AppKit: -[NSFilePromiseDragSource draggedImage:endedAt:operation:] + 101
+            https://bugs.webkit.org/show_bug.cgi?id=70340
+            <rdar://problem/9548174>
+
+            We have seen a number of crash reports for this issue that seem to occurr when
+            the user drags an image from a web page onto the desktop.
+            We have not been able to reproduce this crash, therefore this is a speculative fix,
+            but the theory is that the dragging source has been already released when draggedImage
+            is called.
+            This patch attempts a fix for the problem by retaining the dragging source when
+            NSFilePromiseDragSource is created.
+
+            Reviewed by Darin Adler.
+
+            * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+            (-[WKPasteboardFilePromiseOwner initWithSource:]):
+            (-[WKPasteboardFilePromiseOwner dealloc]):
+
+2011-10-21  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 97807
 
     2011-10-18  Alexey Proskuryakov  <a...@apple.com>

Modified: branches/safari-534.52-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (98148 => 98149)


--- branches/safari-534.52-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2011-10-21 21:09:20 UTC (rev 98148)
+++ branches/safari-534.52-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2011-10-21 21:10:39 UTC (rev 98149)
@@ -58,6 +58,7 @@
 // Create it explicitly because dragImage is called in the UI process.
 @interface NSFilePromiseDragSource : NSObject
 {
+    id _dragSource;
     char _unknownFields[256];
 }
 - (id)initWithSource:(id)dragSource;
@@ -189,6 +190,21 @@
 
 @implementation WKPasteboardFilePromiseOwner
 
+- (id)initWithSource:(id)dragSource
+{
+    self = [super initWithSource:dragSource];
+    if (!self)
+        return nil;
+    [_dragSource retain];
+    return self;
+}
+
+- (void)dealloc
+{
+    [_dragSource release];
+    [super dealloc];
+}
+
 // The AppKit implementation of copyDropDirectory gets the current pasteboard in
 // a way that only works in the process where the drag is initiated. We supply
 // an implementation that gets the pasteboard by name instead.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to