[GTK] Several tests fail due to assert not reached in DrawingArea::dispatchAfterEnsur...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Feb 2016 11:00:41 +0000 (11:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Feb 2016 11:00:41 +0000 (11:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153785

Patch by Adrien Plazas <aplazas@igalia.com> on 2016-02-02
Reviewed by Carlos Garcia Campos.

* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
* UIProcess/DrawingAreaProxyImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h

index e9a631a..31fb5fb 100644 (file)
@@ -1,3 +1,14 @@
+2016-02-02  Adrien Plazas  <aplazas@igalia.com>
+
+        [GTK] Several tests fail due to assert not reached in DrawingArea::dispatchAfterEnsuringDrawing()
+        https://bugs.webkit.org/show_bug.cgi?id=153785
+
+        Reviewed by Carlos Garcia Campos.
+
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        (WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):
+        * UIProcess/DrawingAreaProxyImpl.h:
+
 2016-02-01  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: High Level Memory Overview Instrument
index eb14190..6c41a0e 100644 (file)
@@ -322,6 +322,16 @@ void DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
 }
 #endif
 
+void DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)> callbackFunction)
+{
+    if (!m_webPageProxy.isValid()) {
+        callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
+        return;
+    }
+
+    RunLoop::main().dispatch([callbackFunction] { callbackFunction(CallbackBase::Error::None); });
+}
+
 void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
 {
     ASSERT(isInAcceleratedCompositingMode());
index 3dc9eec..24da66a 100644 (file)
@@ -53,6 +53,8 @@ public:
     void destroyNativeSurfaceHandleForCompositing();
 #endif
 
+    virtual void dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)>) override;
+
 private:
     // DrawingAreaProxy
     virtual void sizeDidChange() override;