DescriptionFix use-after-free in gfx::Image.
ToImageSkia, ToUIImage and ToNSImage would insert an ImageRep into the
map, then return the pointer to the ImageRep. If the map already
contained a rep of that type, the new rep gets freed and the returned
pointer is dangling. Adds a CHECK for this case so it will now crash
cleanly.
This should not happen, but it is evidently possible. This could mean
that ToImageSkia is being called from two threads at the same time
(which is bad, because gfx::Image is not thread safe).
BUG=590882
Committed: https://crrev.com/7e551c12da627989bf8f31afd7b671279113d92d
Cr-Commit-Position: refs/heads/master@{#381141}
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 10 (5 generated)
|