Changeset 186006 in webkit
- Timestamp:
- Jun 26, 2015, 12:21:02 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r185907 r186006 1 2015-06-26 Antti Koivisto <antti@apple.com> 2 3 Network process hangs fetching disk cache entries 4 https://bugs.webkit.org/show_bug.cgi?id=146348 5 <rdar://problem/21528072> 6 7 Reviewed by Anders Carlsson. 8 9 RunLoop::dispatch may deadlock if invoked with std::function that captures an object that calls RunLoop::dispatch in destructor. 10 11 * wtf/RunLoop.cpp: 12 (WTF::RunLoop::performWork): 13 14 Don't reuse std::function variable in loop. We may end up destroying previously held std::function in assignment 15 while holding the runloop mutex. With this change std::function is always destroyed with mutex unlocked. 16 1 17 2015-06-24 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Source/WTF/wtf/RunLoop.cpp
r180434 r186006 89 89 // we guarantee to occasionally return from the run loop so other event sources will be allowed to spin. 90 90 91 std::function<void()> function;92 91 size_t functionsToHandle = 0; 92 { 93 std::function<void()> function; 94 { 95 MutexLocker locker(m_functionQueueLock); 96 functionsToHandle = m_functionQueue.size(); 93 97 94 { 95 MutexLocker locker(m_functionQueueLock); 96 functionsToHandle = m_functionQueue.size(); 98 if (m_functionQueue.isEmpty()) 99 return; 97 100 98 if (m_functionQueue.isEmpty())99 return;101 function = m_functionQueue.takeFirst(); 102 } 100 103 101 function = m_functionQueue.takeFirst();104 function(); 102 105 } 103 106 104 function();105 106 107 for (size_t functionsHandled = 1; functionsHandled < functionsToHandle; ++functionsHandled) { 108 std::function<void()> function; 107 109 { 108 110 MutexLocker locker(m_functionQueueLock); -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r185915 r186006 300 300 E19DB9791B32137C00DB38D4 /* NavigatorLanguage.mm in Sources */ = {isa = PBXBuildFile; fileRef = E19DB9781B32137C00DB38D4 /* NavigatorLanguage.mm */; }; 301 301 E40019331ACE9B88001B0A2A /* BloomFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E40019301ACE9B5C001B0A2A /* BloomFilter.cpp */; }; 302 E4C9ABC91B3DB2C40040A987 /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4C9ABC71B3DB1710040A987 /* RunLoop.cpp */; }; 302 303 F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA0F15A5F624003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp */; }; 303 304 F660AA1515A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA1415A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp */; }; … … 728 729 E490296714E2E3A4002BEDD1 /* TypingStyleCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TypingStyleCrash.mm; sourceTree = "<group>"; }; 729 730 E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Deque.cpp; sourceTree = "<group>"; }; 731 E4C9ABC71B3DB1710040A987 /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = "<group>"; }; 730 732 F3FC3EE213678B7300126A65 /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgtest.a; sourceTree = BUILT_PRODUCTS_DIR; }; 731 733 F660AA0C15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetInjectedBundleInitializationUserDataCallback.cpp; sourceTree = "<group>"; }; … … 1097 1099 93A427AD180DA60F00CD24D7 /* RefLogger.h */, 1098 1100 93A427A8180D9B0700CD24D7 /* RefPtr.cpp */, 1101 E4C9ABC71B3DB1710040A987 /* RunLoop.cpp */, 1099 1102 14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */, 1100 1103 CD5393C91757BAC400C07123 /* SHA1.cpp */, … … 1528 1531 7CCE7F071A411AE600447C4C /* PageLoadBasic.cpp in Sources */, 1529 1532 7CCE7F081A411AE600447C4C /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */, 1533 E4C9ABC91B3DB2C40040A987 /* RunLoop.cpp in Sources */, 1530 1534 7CCE7EC71A411A7E00447C4C /* PageVisibilityStateWithWindowChanges.mm in Sources */, 1531 1535 7CCE7F091A411AE600447C4C /* ParentFrame.cpp in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.