{"push_id":1016457854,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"283d18607e366095c377ddf72d196a8c4e256429","before":"c4ee1b31b39e60353d43e0c7564885e08b768577","commits":[{"sha":"283d18607e366095c377ddf72d196a8c4e256429","author":{"email":"6810b8f87fa537b04ef539ae31f2dcabd55c8914@chromium.org","name":"xidachen"},"message":"Fix data race problem in createImageBitmap(Blob)\n\nIn createImageBitmap(Blob), the method creates an ImageDecoder\nin a background thread, does the image decoding in the same thread, and\npass the ImageDecoder back to the main thread for creating an ImageBitmap.\nThis is causing the data race problem because the ImageDecoder\ndoes some non-atomic reference counts internally.\n\nThis CL should fix the data race problem. In particular, we let the\nImageDecoder does image decoding in the background thread, and creates\na SkImage from the ImageDecoder, and pass the SkImage across threads.\nBecause SkImage is thread-safe RefCnted, this solves the data race\nproblem. In order to let postTask taking a SkImage, this CL changes\nthe CrossThreadCopier so that it can take an object that is SkRefCnt.\n\nLocally I was able to repro the test case reported in the bug by\nusing the tsan build. With this CL the data race goes away.\nAlso, an existing layout tests that have data race condition\nis changed.\n\nBUG=593224\n\nReview URL: https://codereview.chromium.org/1781613002\n\nCr-Commit-Position: refs/heads/master@{#380609}","distinct":true,"url":"https://api.github.com/repos/dstockwell/chromium/commits/283d18607e366095c377ddf72d196a8c4e256429"}]}