Speculative fix for reference count issue in Canvas2DLayerBridge
Speculative fix for reference count issue in Canvas2DLayerBridge

The syzyASAN report suggests the reference count on SkImage is sometimes
off by one on the m_image member of Canvas2DLayerBridge::MailboxInfo.
There is a refcount optimization in the copy constructor of
Canvas2DLayerBridge::MailboxInfo that is potentially unsafe due
to the use of const_cast. I was unable to reproduce the bug in
a local build. This fix is based on the hypothesis that the const_cast
may lead to unsafe compiler optimizations that assume there is no
aliasing of the members of MailboxInfo, which may lead to a net unref()
when entries are being moved around inside a WTF::Deque.  This patch
removes the potentially unsafe cast, which was arguably an
"over optimization".

BUG=449047
TEST=clusterfuzz case 6685777877532672

Review URL: https://codereview.chromium.org/937483002

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@190356 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,smishenk/blink-crosswalk,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk