Changeset 254696 in webkit
- Timestamp:
- Jan 16, 2020 11:07:28 AM (4 years ago)
- Location:
- branches/safari-610.1.1-branch/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610.1.1-branch/Source/WebCore/ChangeLog
r254650 r254696 1 2020-01-16 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r254692. rdar://problem/58480028 4 5 REGRESSION (r254291): [ Catalina wk2 Debug ] Flaky ASSERT on fast/images/animated-image-loop-count.html 6 https://bugs.webkit.org/show_bug.cgi?id=206068 7 <rdar://problem/58480028> 8 9 Patch by Chris Lord <clord@igalia.com> on 2020-01-16 10 Reviewed by Chris Dumez. 11 12 No new tests, covered by existing tests. 13 14 * platform/graphics/ImageSource.cpp: 15 (WebCore::ImageSource::startAsyncDecodingQueue): 16 17 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254692 268f45cc-cd09-0410-ab3c-d52691b4dbfc 18 19 2020-01-16 Chris Lord <clord@igalia.com> 20 21 REGRESSION (r254291): [ Catalina wk2 Debug ] Flaky ASSERT on fast/images/animated-image-loop-count.html 22 https://bugs.webkit.org/show_bug.cgi?id=206068 23 <rdar://problem/58480028> 24 25 Reviewed by Chris Dumez. 26 27 No new tests, covered by existing tests. 28 29 * platform/graphics/ImageSource.cpp: 30 (WebCore::ImageSource::startAsyncDecodingQueue): 31 1 32 2020-01-15 Kocsen Chung <kocsen_chung@apple.com> 2 33 -
branches/safari-610.1.1-branch/Source/WebCore/platform/graphics/ImageSource.cpp
r254291 r254696 346 346 return; 347 347 348 // Async decoding is only enabled for HTMLImageElement and CSS background images. 349 ASSERT(isMainThread()); 350 348 351 // We need to protect this, m_decodingQueue and m_decoder from being deleted while we are in the decoding loop. 349 decodingQueue().dispatch([protectedThis = makeRef(*this), protectedDecodingQueue = makeRef(decodingQueue()), protectedFrameRequestQueue = makeRef(frameRequestQueue()), protectedDecoder = makeRef(*m_decoder), sourceURL = sourceURL().string().isolatedCopy()] {352 decodingQueue().dispatch([protectedThis = makeRef(*this), protectedDecodingQueue = makeRef(decodingQueue()), protectedFrameRequestQueue = makeRef(frameRequestQueue()), protectedDecoder = makeRef(*m_decoder), sourceURL = sourceURL().string().isolatedCopy()] () mutable { 350 353 ImageFrameRequest frameRequest; 351 354 Seconds minDecodingDuration = protectedThis->frameDecodingDurationForTesting(); … … 372 375 373 376 // Update the cached frames on the creation thread to avoid updating the MemoryCache from a different thread. 374 protectedThis->m_runLoop.dispatch([protectedThis = protectedThis.copyRef(), protectedQueue = protectedDecodingQueue.copyRef(), protectedDecoder = protectedDecoder.copyRef(), sourceURL = sourceURL.isolatedCopy(), nativeImage = WTFMove(nativeImage), frameRequest] () mutable {377 callOnMainThread([protectedThis = protectedThis.copyRef(), protectedQueue = protectedDecodingQueue.copyRef(), protectedDecoder = protectedDecoder.copyRef(), sourceURL = sourceURL.isolatedCopy(), nativeImage = WTFMove(nativeImage), frameRequest] () mutable { 375 378 // The queue may have been closed if after we got the frame NativeImage, stopAsyncDecodingQueue() was called. 376 379 if (protectedQueue.ptr() == protectedThis->m_decodingQueue && protectedDecoder.ptr() == protectedThis->m_decoder) { … … 382 385 }); 383 386 } 387 388 // Ensure destruction happens on creation thread. 389 callOnMainThread([protectedThis = WTFMove(protectedThis), protectedQueue = WTFMove(protectedDecodingQueue), protectedDecoder = WTFMove(protectedDecoder)] () mutable { }); 384 390 }); 385 391 }
Note: See TracChangeset
for help on using the changeset viewer.