Changeset 244273 in webkit
- Timestamp:
- Apr 15, 2019 11:27:06 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r244260 r244273 1 2019-04-15 Per Arne Vollan <pvollan@apple.com> 2 3 TestRunner::notifyDone() should be safely reentrant 4 https://bugs.webkit.org/show_bug.cgi?id=196898 5 6 Reviewed by Darin Adler. 7 8 It is currently possible that TestRunner::notifyDone() will call itself, since 9 notifyDone() will force a repaint, which can start executing JavaScript, which 10 may call notifyDone() again. This can lead to test failures and flakiness. 11 Fix this by setting the m_waitToDump flag before calling the dump() method. 12 13 * DumpRenderTree/mac/TestRunnerMac.mm: 14 (TestRunner::notifyDone): 15 (TestRunner::forceImmediateCompletion): 16 * DumpRenderTree/win/TestRunnerWin.cpp: 17 (TestRunner::notifyDone): 18 (TestRunner::forceImmediateCompletion): 19 1 20 2019-04-15 Philippe Normand <pnormand@igalia.com> 2 21 -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r241597 r244273 294 294 void TestRunner::notifyDone() 295 295 { 296 if (m_waitToDump && !topLoadingFrame && !DRT::WorkQueue::singleton().count()) 297 dump(); 298 m_waitToDump = false; 296 if (m_waitToDump) { 297 m_waitToDump = false; 298 if (!topLoadingFrame && !DRT::WorkQueue::singleton().count()) 299 dump(); 300 } else 301 fprintf(stderr, "TestRunner::notifyDone() called unexpectedly."); 299 302 } 300 303 301 304 void TestRunner::forceImmediateCompletion() 302 305 { 303 if (m_waitToDump && !DRT::WorkQueue::singleton().count()) 304 dump(); 305 m_waitToDump = false; 306 if (m_waitToDump) { 307 m_waitToDump = false; 308 if (!DRT::WorkQueue::singleton().count()) 309 dump(); 310 } else 311 fprintf(stderr, "TestRunner::forceImmediateCompletion() called unexpectedly."); 306 312 } 307 313 -
trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp
r239832 r244273 305 305 { 306 306 // Same as on mac. This can be shared. 307 if (m_waitToDump && !topLoadingFrame && !DRT::WorkQueue::singleton().count()) 308 dump(); 309 m_waitToDump = false; 307 if (m_waitToDump) { 308 m_waitToDump = false; 309 if (!topLoadingFrame && !DRT::WorkQueue::singleton().count()) 310 dump(); 311 } else 312 fprintf(stderr, "TestRunner::notifyDone() called unexpectedly."); 310 313 } 311 314 … … 313 316 { 314 317 // Same as on mac. This can be shared. 315 if (m_waitToDump && !DRT::WorkQueue::singleton().count()) 316 dump(); 317 m_waitToDump = false; 318 if (m_waitToDump) { 319 m_waitToDump = false; 320 if (!DRT::WorkQueue::singleton().count()) 321 dump(); 322 } else 323 fprintf(stderr, "TestRunner::forceImmediateCompletion() called unexpectedly."); 318 324 } 319 325
Note: See TracChangeset
for help on using the changeset viewer.