[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 17:51:54 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fde38a4be91c2ccf316a8af40298c424c82e8cb1
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 1 20:46:48 2010 +0000

    2010-12-01  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Anders Carlsson.
    
            Crash when closing WebKit2 window with accelerated composting content
            https://bugs.webkit.org/show_bug.cgi?id=50307
            <rdar://problem/8640126>
    
            When the web page is closing, notify the drawing area, so that
            the layer-backed drawing area can kill the runloop obsever,
            then clear it. Clearing it is not sufficient, since the drawing
            area is ref-counted.
    
            * WebProcess/WebPage/DrawingArea.h:
            (WebKit::DrawingArea::onPageClose):
            * WebProcess/WebPage/LayerBackedDrawingArea.h:
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::close):
            * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
            (WebKit::LayerBackedDrawingArea::platformClear):
            (WebKit::LayerBackedDrawingArea::onPageClose):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 97c16d5..c594454 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2010-12-01  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        Crash when closing WebKit2 window with accelerated composting content
+        https://bugs.webkit.org/show_bug.cgi?id=50307
+        <rdar://problem/8640126>
+        
+        When the web page is closing, notify the drawing area, so that
+        the layer-backed drawing area can kill the runloop obsever,
+        then clear it. Clearing it is not sufficient, since the drawing
+        area is ref-counted.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::onPageClose):
+        * WebProcess/WebPage/LayerBackedDrawingArea.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::close):
+        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
+        (WebKit::LayerBackedDrawingArea::platformClear):
+        (WebKit::LayerBackedDrawingArea::onPageClose):
+
 2010-12-01  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.h b/WebKit2/WebProcess/WebPage/DrawingArea.h
index 74e975f..6b5c50e 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.h
@@ -56,6 +56,8 @@ public:
     virtual void setNeedsDisplay(const WebCore::IntRect&) = 0;
     virtual void display() = 0;
 
+    virtual void onPageClose() { }
+
 #if USE(ACCELERATED_COMPOSITING)
     virtual void attachCompositingContext() = 0;
     virtual void detachCompositingContext() = 0;
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
index b4dccf3..61f869b 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
@@ -81,6 +81,10 @@ private:
     virtual bool showDebugBorders() const;
     virtual bool showRepaintCounter() const;
 
+#if PLATFORM(MAC)
+    virtual void onPageClose();
+#endif
+
     void scheduleDisplay();
     
     // CoreIPC message handlers.
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index cdeda79..880b85d 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -322,6 +322,9 @@ void WebPage::close()
     m_mainFrame->coreFrame()->loader()->detachFromParent();
     m_page.clear();
 
+    m_drawingArea->onPageClose();
+    m_drawingArea.clear();
+
     WebProcess::shared().removeWebPage(m_pageID);
 }
 
diff --git a/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm b/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
index c7efa8e..26b2bd9 100644
--- a/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
+++ b/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
@@ -54,6 +54,9 @@ void LayerBackedDrawingArea::platformInit()
 
 void LayerBackedDrawingArea::platformClear()
 {
+    if (!m_attached)
+        return;
+
     if (m_updateLayoutRunLoopObserver) {
         CFRunLoopObserverInvalidate(m_updateLayoutRunLoopObserver.get());
         m_updateLayoutRunLoopObserver = 0;
@@ -166,6 +169,11 @@ void LayerBackedDrawingArea::updateLayoutRunLoopObserverFired()
         syncCompositingLayers();
 }
 
+void LayerBackedDrawingArea::onPageClose()
+{
+    platformClear();
+}
+
 } // namespace WebKit
 
 #endif // USE(ACCELERATED_COMPOSITING)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list