Title: [164462] trunk/Source/WebKit2
Revision
164462
Author
[email protected]
Date
2014-02-20 18:13:49 -0800 (Thu, 20 Feb 2014)

Log Message

ASSERT on touches callbacks after r164409 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=129135

Reviewed by Alexey Proskuryakov.

The change used incorrecly true and false in TouchesCallbacks and
ImageCallback. It also reintroduced isMainThread() which doesn't work
for iOS.

* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::generateCallbackID):
(WebKit::ImageCallback::performCallbackWithReturnValue):
(WebKit::ImageCallback::invalidate):
* UIProcess/WebPageProxy.h:
(WebKit::TouchesCallback::performCallbackWithReturnValue):
(WebKit::TouchesCallback::invalidate):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (164461 => 164462)


--- trunk/Source/WebKit2/ChangeLog	2014-02-21 02:01:28 UTC (rev 164461)
+++ trunk/Source/WebKit2/ChangeLog	2014-02-21 02:13:49 UTC (rev 164462)
@@ -1,3 +1,22 @@
+2014-02-20  Enrica Casucci  <[email protected]>
+
+        ASSERT on touches callbacks after r164409 on iOS.
+        https://bugs.webkit.org/show_bug.cgi?id=129135
+
+        Reviewed by Alexey Proskuryakov.
+
+        The change used incorrecly true and false in TouchesCallbacks and
+        ImageCallback. It also reintroduced isMainThread() which doesn't work
+        for iOS.
+
+        * UIProcess/GenericCallback.h:
+        (WebKit::CallbackBase::generateCallbackID):
+        (WebKit::ImageCallback::performCallbackWithReturnValue):
+        (WebKit::ImageCallback::invalidate):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::TouchesCallback::performCallbackWithReturnValue):
+        (WebKit::TouchesCallback::invalidate):
+
 2014-02-20  Anders Carlsson  <[email protected]>
 
         We need something like WKPageUIClient in the Obj-C API

Modified: trunk/Source/WebKit2/UIProcess/GenericCallback.h (164461 => 164462)


--- trunk/Source/WebKit2/UIProcess/GenericCallback.h	2014-02-21 02:01:28 UTC (rev 164461)
+++ trunk/Source/WebKit2/UIProcess/GenericCallback.h	2014-02-21 02:13:49 UTC (rev 164462)
@@ -31,9 +31,9 @@
 #include "WKAPICast.h"
 #include <functional>
 #include <wtf/HashMap.h>
-#include <wtf/MainThread.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
+#include <wtf/RunLoop.h>
 
 namespace WebKit {
 
@@ -54,7 +54,7 @@
 private:
     static uint64_t generateCallbackID()
     {
-        ASSERT(isMainThread());
+        ASSERT(RunLoop::isMain());
         static uint64_t uniqueCallbackID = 1;
         return uniqueCallbackID++;
     }
@@ -235,7 +235,7 @@
     {
         ASSERT(m_callback);
 
-        m_callback(true, returnValue1);
+        m_callback(false, returnValue1);
 
         m_callback = 0;
     }
@@ -246,7 +246,7 @@
 
         RefPtr<API::Error> error = API::Error::create();
         ShareableBitmap::Handle handle;
-        m_callback(false, handle);
+        m_callback(true, handle);
 
         m_callback = 0;
     }

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (164461 => 164462)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-02-21 02:01:28 UTC (rev 164461)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-02-21 02:13:49 UTC (rev 164462)
@@ -289,7 +289,7 @@
     {
         ASSERT(m_callback);
 
-        m_callback(true, returnValue1, returnValue2);
+        m_callback(false, returnValue1, returnValue2);
 
         m_callback = 0;
     }
@@ -299,7 +299,7 @@
         ASSERT(m_callback);
 
         RefPtr<API::Error> error = API::Error::create();
-        m_callback(false, WebCore::IntPoint(), 0);
+        m_callback(true, WebCore::IntPoint(), 0);
         
         m_callback = 0;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to