[WK2] ipc thread sends wakeup message to main thread just once for series of IPC...
authorSeojin Kim <seojin.kim@samsung.com>
Mon, 10 Sep 2012 01:01:08 +0000 (10:01 +0900)
committerSeojin Kim <seojin.kim@samsung.com>
Mon, 10 Sep 2012 01:01:08 +0000 (10:01 +0900)
This patch was rollbacked by I726930d2f1532b96f6f20883f1a834ab93354225,
but need to be applied again.

[Title] only one wakeup call for series of IPC messages
[Issue #] N_SE-9731
[Problem] lockup when try to Reply the mail in gmail desktop site.
[Cause] too many IPC messages and corresponding wakeup calls causes ecore_pipe get fulled and writing action could be stuck.
[Solution] only one wakeup call for series of IPC messages
[Developer] seojin.kim

Source/WebCore/platform/efl/RunLoopEfl.cpp

index b2ce3c9..8f5d2cc 100644 (file)
@@ -106,13 +106,15 @@ void RunLoop::wakeUp()
 {
 #if ENABLE(TIZEN_RUNLOOP_WAKEUP_ERROR_WORKAROUND)
     Eina_Bool result = false;
-    while(1) {
-        result = ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
-        if (result)
-            return;
-
-        LOG_ERROR("Failed to write a wakupEcorePipeMessage\n");
-        m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this)); // due to OwnPtr, ecore_pipe_del is called automatically.
+    if (m_functionQueue.size() == 1) {
+        while(1) {
+            result = ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
+            if (result)
+                return;
+
+            LOG_ERROR("Failed to write a wakupEcorePipeMessage\n");
+            m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this)); // due to OwnPtr, ecore_pipe_del is called automatically.
+        }
     }
 #else
     // should not call ecore_pipe_write every time.