Title: [140423] trunk/Source/WebCore
- Revision
- 140423
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-22 07:03:15 -0800 (Tue, 22 Jan 2013)
Log Message
[Qt] Crash in PasteboardQt.cpp Pasteboard::writeSelection
https://bugs.webkit.org/show_bug.cgi?id=102192
Patch by Fabien Valée
Patch by Allan Sandfeld Jensen <allan.jen...@digia.com> on 2013-01-22
Reviewed by Jocelyn Turcotte.
QClipboard::setMimeData transfers ownership of QMimeData to the clipboard,
so we should not access it afterwards.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainText):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (140422 => 140423)
--- trunk/Source/WebCore/ChangeLog 2013-01-22 14:53:28 UTC (rev 140422)
+++ trunk/Source/WebCore/ChangeLog 2013-01-22 15:03:15 UTC (rev 140423)
@@ -1,3 +1,18 @@
+2013-01-22 Allan Sandfeld Jensen <allan.jen...@digia.com>
+
+ [Qt] Crash in PasteboardQt.cpp Pasteboard::writeSelection
+ https://bugs.webkit.org/show_bug.cgi?id=102192
+
+ Patch by Fabien Valée
+ Reviewed by Jocelyn Turcotte.
+
+ QClipboard::setMimeData transfers ownership of QMimeData to the clipboard,
+ so we should not access it afterwards.
+
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+
2013-01-22 Christophe Dumez <christophe.du...@intel.com>
Regression(r140414): It is causing crashes with gstreamer 0.10
Modified: trunk/Source/WebCore/platform/qt/PasteboardQt.cpp (140422 => 140423)
--- trunk/Source/WebCore/platform/qt/PasteboardQt.cpp 2013-01-22 14:53:28 UTC (rev 140422)
+++ trunk/Source/WebCore/platform/qt/PasteboardQt.cpp 2013-01-22 15:03:15 UTC (rev 140423)
@@ -74,11 +74,11 @@
md->setHtml(markup);
#endif
+ if (canSmartCopyOrDelete)
+ md->setData(QLatin1String("application/vnd.qtwebkit.smartpaste"), QByteArray());
#ifndef QT_NO_CLIPBOARD
QGuiApplication::clipboard()->setMimeData(md, m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard);
#endif
- if (canSmartCopyOrDelete)
- md->setData(QLatin1String("application/vnd.qtwebkit.smartpaste"), QByteArray());
}
bool Pasteboard::canSmartReplace()
@@ -134,9 +134,9 @@
QString qtext = text;
qtext.replace(QChar(0xa0), QLatin1Char(' '));
md->setText(qtext);
- QGuiApplication::clipboard()->setMimeData(md, m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard);
if (smartReplaceOption == CanSmartReplace)
md->setData(QLatin1String("application/vnd.qtwebkit.smartpaste"), QByteArray());
+ QGuiApplication::clipboard()->setMimeData(md, m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard);
#endif
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes