From: commit-queue@webkit.org Date: Wed, 28 Nov 2012 14:38:33 +0000 (+0000) Subject: [EFL] Use mutex locker in wakeUp() to ensure thread-safety. X-Git-Tag: 2.1_release~297 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3fbf0afcc3a995c33a05dc5666809504fa2136a;p=platform%2Fframework%2Fweb%2Fwebkit-efl.git [EFL] Use mutex locker in wakeUp() to ensure thread-safety. https://bugs.webkit.org/show_bug.cgi?id=101132 Patch by Byungwoo Lee 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): Change-Id: I36bae620af903781cdb3470888aabc434dbdb7b9 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136006 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index c59f731..c8e7ad5 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,12 +1,3 @@ -2012-11-30 Jer Noble - - Unreviewed Windows build fix. - - Add a default: entry to an case statement to fix a build error when compiled in VS2005. - - * html/MediaController.cpp: - (MediaController::playbackState): - 2012-12-11 Viatcheslav Ostapenko Remove conversion to/from float and float division from ImageFrame::setRGBA @@ -25,6 +16,33 @@ (WebCore::ImageFrame::fixPointUnsignedMultiply): (WebCore::ImageFrame::setRGBA): +2012-11-30 Jer Noble + + Unreviewed Windows build fix. + + Add a default: entry to an case statement to fix a build error when compiled in VS2005. + + * html/MediaController.cpp: + (MediaController::playbackState): + +2012-11-28 Byungwoo Lee + + [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-09 Huang Dongsung Coordinated Graphics: Remove a backing store of GraphicsLayer when the layer is far from the viewport. diff --git a/Source/WebCore/platform/RunLoop.h b/Source/WebCore/platform/RunLoop.h index 90d0ad7..fbfb837 100644 --- a/Source/WebCore/platform/RunLoop.h +++ b/Source/WebCore/platform/RunLoop.h @@ -137,8 +137,6 @@ private: Mutex m_functionQueueLock; Deque > m_functionQueue; - Mutex m_wakeUpLock; - #if PLATFORM(WIN) static bool registerRunLoopMessageWindowClass(); static LRESULT CALLBACK RunLoopWndProc(HWND, UINT, WPARAM, LPARAM); @@ -169,7 +167,10 @@ private: Vector > m_runLoopMainLoops; #elif PLATFORM(EFL) bool m_initEfl; + + Mutex m_pipeLock; OwnPtr m_pipe; + static void wakeUpEvent(void* data, void*, unsigned int); #endif }; diff --git a/Source/WebCore/platform/efl/RunLoopEfl.cpp b/Source/WebCore/platform/efl/RunLoopEfl.cpp index d7df114..8fd97dc 100644 --- a/Source/WebCore/platform/efl/RunLoopEfl.cpp +++ b/Source/WebCore/platform/efl/RunLoopEfl.cpp @@ -104,7 +104,7 @@ void RunLoop::wakeUpEvent(void* data, void*, unsigned int) void RunLoop::wakeUp() { - MutexLocker locker(m_wakeUpLock); + MutexLocker locker(m_pipeLock); #if ENABLE(TIZEN_RUNLOOP_WAKEUP_ERROR_WORKAROUND) Eina_Bool result = false; while(1) {