- Source/WebKit2/ChangeLog +20 lines
Lines 1-3 Source/WebKit2/ChangeLog_sec1
1
2011-10-18  Enrica Casucci  <enrica@apple.com>
2
3
        Crash in WebProcess at com.apple.AppKit: -[NSFilePromiseDragSource draggedImage:endedAt:operation:] + 101
4
        https://bugs.webkit.org/show_bug.cgi?id=70340
5
        <rdar://problem/9548174>
6
        
7
        We have seen a number of crash reports for this issue that seem to occurr when
8
        the user drags an image from a web page onto the desktop.
9
        We have not been able to reproduce this crash, therefore this is a speculative fix,
10
        but the theory is that the dragging source has been already released when draggedImage
11
        is called.
12
        This patch attempts a fix for the problem by retaining the dragging source when
13
        NSFilePromiseDragSource is created.
14
15
        Reviewed by NOBODY (OOPS!).
16
17
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
18
        (-[WKPasteboardFilePromiseOwner initWithSource:]):
19
        (-[WKPasteboardFilePromiseOwner dealloc]):
20
1
2011-10-18  Adam Barth  <abarth@webkit.org>
21
2011-10-18  Adam Barth  <abarth@webkit.org>
2
22
3
        Always enable ENABLE(XPATH)
23
        Always enable ENABLE(XPATH)
- Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm +16 lines
Lines 58-63 using namespace WebKit; Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm_sec1
58
// Create it explicitly because dragImage is called in the UI process.
58
// Create it explicitly because dragImage is called in the UI process.
59
@interface NSFilePromiseDragSource : NSObject
59
@interface NSFilePromiseDragSource : NSObject
60
{
60
{
61
    id _dragSource;
61
    char _unknownFields[256];
62
    char _unknownFields[256];
62
}
63
}
63
- (id)initWithSource:(id)dragSource;
64
- (id)initWithSource:(id)dragSource;
Lines 189-194 void WebDragClient::dragEnded() Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm_sec2
189
190
190
@implementation WKPasteboardFilePromiseOwner
191
@implementation WKPasteboardFilePromiseOwner
191
192
193
- (id)initWithSource:(id)dragSource
194
{
195
    self = [super initWithSource:dragSource];
196
    if (!self)
197
        return nil;
198
    [_dragSource retain];
199
    return self;
200
}
201
202
- (void)dealloc
203
{
204
    [_dragSource release];
205
    [super dealloc];
206
}
207
192
// The AppKit implementation of copyDropDirectory gets the current pasteboard in
208
// The AppKit implementation of copyDropDirectory gets the current pasteboard in
193
// a way that only works in the process where the drag is initiated. We supply
209
// a way that only works in the process where the drag is initiated. We supply
194
// an implementation that gets the pasteboard by name instead.
210
// an implementation that gets the pasteboard by name instead.

Return to Bug 70340