Title: [136006] trunk/Source/WebCore
- Revision
- 136006
- Author
- [email protected]
- Date
- 2012-11-28 06:38:33 -0800 (Wed, 28 Nov 2012)
Log Message
[EFL] Use mutex locker in wakeUp() to ensure thread-safety.
https://bugs.webkit.org/show_bug.cgi?id=101132
Patch by Byungwoo Lee <[email protected]> on 2012-11-28
Reviewed by Gyuyoung Kim.
Add mutex locker for the ecore pipe to ensure thread-safety of
RunLoop::wakeUp().
RunLoop::wakeUp() can be called by multiple thread. It uses
ecore_pipe_write() function but the function is not thread-safe.
* platform/RunLoop.h:
(RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::wakeUp):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (136005 => 136006)
--- trunk/Source/WebCore/ChangeLog 2012-11-28 14:23:18 UTC (rev 136005)
+++ trunk/Source/WebCore/ChangeLog 2012-11-28 14:38:33 UTC (rev 136006)
@@ -1,3 +1,21 @@
+2012-11-28 Byungwoo Lee <[email protected]>
+
+ [EFL] Use mutex locker in wakeUp() to ensure thread-safety.
+ https://bugs.webkit.org/show_bug.cgi?id=101132
+
+ Reviewed by Gyuyoung Kim.
+
+ Add mutex locker for the ecore pipe to ensure thread-safety of
+ RunLoop::wakeUp().
+
+ RunLoop::wakeUp() can be called by multiple thread. It uses
+ ecore_pipe_write() function but the function is not thread-safe.
+
+ * platform/RunLoop.h:
+ (RunLoop):
+ * platform/efl/RunLoopEfl.cpp:
+ (WebCore::RunLoop::wakeUp):
+
2012-11-28 Ryuan Choi <[email protected]>
[EFL] Refactor theme to choose whether to support foreground color of selection
Modified: trunk/Source/WebCore/platform/RunLoop.h (136005 => 136006)
--- trunk/Source/WebCore/platform/RunLoop.h 2012-11-28 14:23:18 UTC (rev 136005)
+++ trunk/Source/WebCore/platform/RunLoop.h 2012-11-28 14:38:33 UTC (rev 136006)
@@ -167,7 +167,10 @@
Vector<GRefPtr<GMainLoop> > m_runLoopMainLoops;
#elif PLATFORM(EFL)
bool m_initEfl;
+
+ Mutex m_pipeLock;
OwnPtr<Ecore_Pipe> m_pipe;
+
static void wakeUpEvent(void* data, void*, unsigned int);
#endif
};
Modified: trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp (136005 => 136006)
--- trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp 2012-11-28 14:23:18 UTC (rev 136005)
+++ trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp 2012-11-28 14:38:33 UTC (rev 136006)
@@ -102,6 +102,7 @@
void RunLoop::wakeUp()
{
+ MutexLocker locker(m_pipeLock);
ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes