Title: [100741] trunk/Source/WebKit2
Revision
100741
Author
commit-qu...@webkit.org
Date
2011-11-18 03:16:40 -0800 (Fri, 18 Nov 2011)

Log Message

[Qt][WK2] UI process segfaults, when visiblity properties are set while the WebProcess is dead.
https://bugs.webkit.org/show_bug.cgi?id=72699

The drawing area may be null, if the web process has crashed, but not yet recovered.
Always null check against drawing area.

Patch by Zalan Bujtas <zbuj...@gmail.com> on 2011-11-18
Reviewed by Simon Hausmann.

* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::setDrawingAreaSize):
(QtWebPageProxy::setVisibleContentRectAndScale):
(QtWebPageProxy::setVisibleContentRectTrajectoryVector):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (100740 => 100741)


--- trunk/Source/WebKit2/ChangeLog	2011-11-18 11:07:52 UTC (rev 100740)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-18 11:16:40 UTC (rev 100741)
@@ -1,3 +1,18 @@
+2011-11-18  Zalan Bujtas  <zbuj...@gmail.com>
+
+        [Qt][WK2] UI process segfaults, when visiblity properties are set while the WebProcess is dead.
+        https://bugs.webkit.org/show_bug.cgi?id=72699
+
+        The drawing area may be null, if the web process has crashed, but not yet recovered.
+        Always null check against drawing area.
+
+        Reviewed by Simon Hausmann.
+
+        * UIProcess/qt/QtWebPageProxy.cpp:
+        (QtWebPageProxy::setDrawingAreaSize):
+        (QtWebPageProxy::setVisibleContentRectAndScale):
+        (QtWebPageProxy::setVisibleContentRectTrajectoryVector):
+
 2011-11-18  Simon Hausmann  <simon.hausm...@nokia.com>
 
         [Qt] Removal of QtViewInterface part 1

Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (100740 => 100741)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp	2011-11-18 11:07:52 UTC (rev 100740)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp	2011-11-18 11:16:40 UTC (rev 100741)
@@ -750,6 +750,7 @@
 {
     if (!m_webPageProxy->drawingArea())
         return;
+
     m_webPageProxy->drawingArea()->setSize(IntSize(size), IntSize());
 }
 
@@ -903,6 +904,9 @@
 
 void QtWebPageProxy::setVisibleContentRectAndScale(const QRectF& visibleContentRect, float scale)
 {
+    if (!m_webPageProxy->drawingArea())
+        return;
+
     QRect alignedVisibleContentRect = visibleContentRect.toAlignedRect();
     m_webPageProxy->drawingArea()->setVisibleContentsRectAndScale(alignedVisibleContentRect, scale);
 
@@ -912,6 +916,9 @@
 
 void QtWebPageProxy::setVisibleContentRectTrajectoryVector(const QPointF& trajectoryVector)
 {
+    if (!m_webPageProxy->drawingArea())
+        return;
+
     m_webPageProxy->drawingArea()->setVisibleContentRectTrajectoryVector(trajectoryVector);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to