Changeset 91171 in webkit
- Timestamp:
- Jul 17, 2011 7:58:46 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r91168 r91171 1 2011-07-17 Ryuan Choi <ryuan.choi@samsung.com> 2 3 [EFL] Refactor scheduleDispatchFunctionsOnMainThread to fix crash. 4 https://bugs.webkit.org/show_bug.cgi?id=64337 5 6 Replace ecore_timer_add to Ecore_Pipe. 7 This is needed because ecore_timer should not be called in a child thread, 8 but in the main thread. 9 10 Reviewed by Antonio Gomes. 11 12 * wtf/efl/MainThreadEfl.cpp: 13 (WTF::pipeObject): 14 (WTF::monitorDispatchFunctions): 15 (WTF::initializeMainThreadPlatform): 16 (WTF::scheduleDispatchFunctionsOnMainThread): 17 1 18 2011-07-17 Filip Pizlo <fpizlo@apple.com> 2 19 -
trunk/Source/JavaScriptCore/wtf/efl/MainThreadEfl.cpp
r62015 r91171 36 36 37 37 #include <Ecore.h> 38 #include <wtf/OwnPtr.h> 39 #include <wtf/PassOwnPtr.h> 40 #include <wtf/StdLibExtras.h> 38 41 39 42 namespace WTF { 40 43 44 static OwnPtr<Ecore_Pipe>& pipeObject() 45 { 46 DEFINE_STATIC_LOCAL(OwnPtr<Ecore_Pipe>, pipeObject, ()); 47 return pipeObject; 48 } 49 50 static void monitorDispatchFunctions(void*, void*, unsigned int) 51 { 52 dispatchFunctionsFromMainThread(); 53 } 54 41 55 void initializeMainThreadPlatform() 42 56 { 43 } 44 45 static Eina_Bool timeoutFired(void*) 46 { 47 dispatchFunctionsFromMainThread(); 48 return ECORE_CALLBACK_CANCEL; 57 pipeObject() = adoptPtr(ecore_pipe_add(monitorDispatchFunctions, 0)); 49 58 } 50 59 51 60 void scheduleDispatchFunctionsOnMainThread() 52 61 { 53 ecore_ timer_add(0, timeoutFired, 0);62 ecore_pipe_write(pipeObject().get(), "", 0); 54 63 } 55 64 56 57 65 }
Note: See TracChangeset
for help on using the changeset viewer.