DescriptionBug fix: Fix wrong assumption in ImageResource when adding observer
When the response is not multipart, if |m_data| exists, |m_image| must
be created. This is assured that |updateImage()| is called when
|appendData()| is called.
On the other hand, when the response is multipart, |updateImage()| is
not called in |appendData()|, which means |m_image| might not be created
even when |m_data| exists. This is intentional since creating a |m_image|
on receiving data might destroy an existing image in a previous part.
This CL fixes the wrong DCHECK in addObserver and didAddClient in
ImageResource.
BUG=630983
TEST=webkit_unit_tests --gtest_filter=ImageResourceTest.MultipartImage
Committed: https://crrev.com/d1e1dd413401a3434537e12f1f12637e7c8bf2fb
Cr-Commit-Position: refs/heads/master@{#408092}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address on hiroshige's review #
Depends on Patchset: Messages
Total messages: 18 (10 generated)
|