Title: [144479] trunk/Source/WebCore
- Revision
- 144479
- Author
- [email protected]
- Date
- 2013-03-01 12:26:43 -0800 (Fri, 01 Mar 2013)
Log Message
Crash at WebCore::SharedBuffer::hasPlatformData during paste.
https://bugs.webkit.org/show_bug.cgi?id=111207.
<rdar://problem/13024528>
Reviewed by Ryosuke Niwa.
This is a speculative fix since we don't have a solid repro case.
Adding null check every time we get a SharedBuffer from the pasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (144478 => 144479)
--- trunk/Source/WebCore/ChangeLog 2013-03-01 20:04:13 UTC (rev 144478)
+++ trunk/Source/WebCore/ChangeLog 2013-03-01 20:26:43 UTC (rev 144479)
@@ -1,3 +1,18 @@
+2013-03-01 Enrica Casucci <[email protected]>
+
+ Crash at WebCore::SharedBuffer::hasPlatformData during paste.
+ https://bugs.webkit.org/show_bug.cgi?id=111207.
+ <rdar://problem/13024528>
+
+ Reviewed by Ryosuke Niwa.
+
+ This is a speculative fix since we don't have a solid repro case.
+ Adding null check every time we get a SharedBuffer from the pasteboard.
+
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::plainText):
+ (WebCore::documentFragmentWithRTF):
+
2013-03-01 Alexey Proskuryakov <[email protected]>
Build fix for builds with BLOB disabled. This fixes it for me on Mac at least.
Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (144478 => 144479)
--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm 2013-03-01 20:04:13 UTC (rev 144478)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm 2013-03-01 20:26:43 UTC (rev 144479)
@@ -345,11 +345,13 @@
if (types.contains(String(NSRTFDPboardType))) {
RefPtr<SharedBuffer> data = "" m_pasteboardName);
- attributedString = [[NSAttributedString alloc] initWithRTFD:[data->createNSData() autorelease] documentAttributes:NULL];
+ if (data)
+ attributedString = [[NSAttributedString alloc] initWithRTFD:[data->createNSData() autorelease] documentAttributes:NULL];
}
if (attributedString == nil && types.contains(String(NSRTFPboardType))) {
RefPtr<SharedBuffer> data = "" m_pasteboardName);
- attributedString = [[NSAttributedString alloc] initWithRTF:[data->createNSData() autorelease] documentAttributes:NULL];
+ if (data)
+ attributedString = [[NSAttributedString alloc] initWithRTF:[data->createNSData() autorelease] documentAttributes:NULL];
}
if (attributedString != nil) {
string = [[attributedString string] precomposedStringWithCanonicalMapping];
@@ -411,11 +413,13 @@
NSAttributedString *string = nil;
if (pasteboardType == NSRTFDPboardType) {
RefPtr<SharedBuffer> data = "" pastebordName);
- string = [[NSAttributedString alloc] initWithRTFD:[data->createNSData() autorelease] documentAttributes:NULL];
+ if (data)
+ string = [[NSAttributedString alloc] initWithRTFD:[data->createNSData() autorelease] documentAttributes:NULL];
}
if (string == nil) {
RefPtr<SharedBuffer> data = "" pastebordName);
- string = [[NSAttributedString alloc] initWithRTF:[data->createNSData() autorelease] documentAttributes:NULL];
+ if (data)
+ string = [[NSAttributedString alloc] initWithRTF:[data->createNSData() autorelease] documentAttributes:NULL];
}
if (string == nil)
return nil;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes