Title: [130619] trunk/Source
- Revision
- 130619
- Author
- [email protected]
- Date
- 2012-10-08 00:20:17 -0700 (Mon, 08 Oct 2012)
Log Message
[EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
https://bugs.webkit.org/show_bug.cgi?id=98505
Patch by Byungwoo Lee <[email protected]> on 2012-10-08
Reviewed by Kenneth Rohde Christiansen.
Instead of ecore_pipe_write(),
use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
According to the EFL API document, this function is designed to dispatch
a function on ecore main loop by avoiding dead lock or race condition.
With this function, webkit doesn't need to maintain ecore pipe also.
Source/WebCore:
No new tests. The function to wakeup main loop is changed.
* platform/RunLoop.h:
(RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::wakeUpEvent):
(WebCore::RunLoop::wakeUp):
Source/WTF:
* wtf/efl/MainThreadEfl.cpp:
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (130618 => 130619)
--- trunk/Source/WTF/ChangeLog 2012-10-08 06:59:41 UTC (rev 130618)
+++ trunk/Source/WTF/ChangeLog 2012-10-08 07:20:17 UTC (rev 130619)
@@ -1,3 +1,22 @@
+2012-10-08 Byungwoo Lee <[email protected]>
+
+ [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
+ https://bugs.webkit.org/show_bug.cgi?id=98505
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Instead of ecore_pipe_write(),
+ use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
+
+ According to the EFL API document, this function is designed to dispatch
+ a function on ecore main loop by avoiding dead lock or race condition.
+ With this function, webkit doesn't need to maintain ecore pipe also.
+
+ * wtf/efl/MainThreadEfl.cpp:
+ (WTF::monitorDispatchFunctions):
+ (WTF::initializeMainThreadPlatform):
+ (WTF::scheduleDispatchFunctionsOnMainThread):
+
2012-10-07 Caio Marcelo de Oliveira Filho <[email protected]>
Rename first/second to key/value in HashMap iterators
Modified: trunk/Source/WTF/wtf/efl/MainThreadEfl.cpp (130618 => 130619)
--- trunk/Source/WTF/wtf/efl/MainThreadEfl.cpp 2012-10-08 06:59:41 UTC (rev 130618)
+++ trunk/Source/WTF/wtf/efl/MainThreadEfl.cpp 2012-10-08 07:20:17 UTC (rev 130619)
@@ -41,25 +41,18 @@
namespace WTF {
-static OwnPtr<Ecore_Pipe>& pipeObject()
+static void monitorDispatchFunctions(void*)
{
- DEFINE_STATIC_LOCAL(OwnPtr<Ecore_Pipe>, pipeObject, ());
- return pipeObject;
-}
-
-static void monitorDispatchFunctions(void*, void*, unsigned int)
-{
dispatchFunctionsFromMainThread();
}
void initializeMainThreadPlatform()
{
- pipeObject() = adoptPtr(ecore_pipe_add(monitorDispatchFunctions, 0));
}
void scheduleDispatchFunctionsOnMainThread()
{
- ecore_pipe_write(pipeObject().get(), "", 0);
+ ecore_main_loop_thread_safe_call_async(monitorDispatchFunctions, 0);
}
}
Modified: trunk/Source/WebCore/ChangeLog (130618 => 130619)
--- trunk/Source/WebCore/ChangeLog 2012-10-08 06:59:41 UTC (rev 130618)
+++ trunk/Source/WebCore/ChangeLog 2012-10-08 07:20:17 UTC (rev 130619)
@@ -1,3 +1,26 @@
+2012-10-08 Byungwoo Lee <[email protected]>
+
+ [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
+ https://bugs.webkit.org/show_bug.cgi?id=98505
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Instead of ecore_pipe_write(),
+ use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
+
+ According to the EFL API document, this function is designed to dispatch
+ a function on ecore main loop by avoiding dead lock or race condition.
+ With this function, webkit doesn't need to maintain ecore pipe also.
+
+ No new tests. The function to wakeup main loop is changed.
+
+ * platform/RunLoop.h:
+ (RunLoop):
+ * platform/efl/RunLoopEfl.cpp:
+ (WebCore::RunLoop::RunLoop):
+ (WebCore::RunLoop::wakeUpEvent):
+ (WebCore::RunLoop::wakeUp):
+
2012-10-07 Arpita Bahuguna <[email protected]>
:first-line pseudo selector ignoring words created from :before
Modified: trunk/Source/WebCore/platform/RunLoop.h (130618 => 130619)
--- trunk/Source/WebCore/platform/RunLoop.h 2012-10-08 06:59:41 UTC (rev 130618)
+++ trunk/Source/WebCore/platform/RunLoop.h 2012-10-08 07:20:17 UTC (rev 130619)
@@ -167,8 +167,7 @@
Vector<GRefPtr<GMainLoop> > m_runLoopMainLoops;
#elif PLATFORM(EFL)
bool m_initEfl;
- OwnPtr<Ecore_Pipe> m_pipe;
- static void wakeUpEvent(void* data, void*, unsigned int);
+ static void wakeUpEvent(void* data);
#endif
};
Modified: trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp (130618 => 130619)
--- trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp 2012-10-08 06:59:41 UTC (rev 130618)
+++ trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp 2012-10-08 07:20:17 UTC (rev 130619)
@@ -34,9 +34,6 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
-static const int ecorePipeMessageSize = 1;
-static const char wakupEcorePipeMessage[] = "W";
-
namespace WebCore {
RunLoop::RunLoop()
@@ -62,7 +59,6 @@
goto errorEdje;
}
- m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this));
m_initEfl = true;
return;
@@ -95,14 +91,14 @@
ecore_main_loop_quit();
}
-void RunLoop::wakeUpEvent(void* data, void*, unsigned int)
+void RunLoop::wakeUpEvent(void* data)
{
static_cast<RunLoop*>(data)->performWork();
}
void RunLoop::wakeUp()
{
- ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
+ ecore_main_loop_thread_safe_call_async(wakeUpEvent, this);
}
RunLoop::TimerBase::TimerBase(RunLoop*)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes