Title: [88646] trunk/Source/WebKit2
- Revision
- 88646
- Author
- [email protected]
- Date
- 2011-06-13 10:14:36 -0700 (Mon, 13 Jun 2011)
Log Message
2011-06-13 Carlos Garcia Campos <[email protected]>
Reviewed by Martin Robinson.
[GTK] Fix a crash when drawing area has been deleted
https://bugs.webkit.org/show_bug.cgi?id=62541
Check whether WebPageProxy::drawingArea() returns a valid pointer
before using it, it might be null, for example, when the web
process crashes.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(callDrawingAreaPaintMethod):
(webkitWebViewBaseSizeAllocate):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (88645 => 88646)
--- trunk/Source/WebKit2/ChangeLog 2011-06-13 17:12:36 UTC (rev 88645)
+++ trunk/Source/WebKit2/ChangeLog 2011-06-13 17:14:36 UTC (rev 88646)
@@ -1,3 +1,18 @@
+2011-06-13 Carlos Garcia Campos <[email protected]>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Fix a crash when drawing area has been deleted
+ https://bugs.webkit.org/show_bug.cgi?id=62541
+
+ Check whether WebPageProxy::drawingArea() returns a valid pointer
+ before using it, it might be null, for example, when the web
+ process crashes.
+
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+ (callDrawingAreaPaintMethod):
+ (webkitWebViewBaseSizeAllocate):
+
2011-06-13 Eunmi Lee <[email protected]>
Reviewed by Kenneth Rohde Christiansen.
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (88645 => 88646)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp 2011-06-13 17:12:36 UTC (rev 88645)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp 2011-06-13 17:14:36 UTC (rev 88646)
@@ -153,6 +153,9 @@
static void callDrawingAreaPaintMethod(DrawingAreaProxy* drawingArea, cairo_t* context, const IntRect& area)
{
+ if (!drawingArea)
+ return;
+
WebKit::Region unpaintedRegion; // This is simply unused.
static_cast<DrawingAreaProxyImpl*>(drawingArea)->paint(context, area, unpaintedRegion);
}
@@ -184,6 +187,9 @@
WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
WebKitWebViewBasePrivate* priv = webViewBase->priv;
+ if (!priv->pageProxy->drawingArea())
+ return;
+
GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->size_allocate(widget, allocation);
priv->pageProxy->drawingArea()->setSize(IntSize(allocation->width, allocation->height), IntSize());
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes