Index: Source/platform/graphics/DeferredImageDecoder.cpp |
diff --git a/Source/platform/graphics/DeferredImageDecoder.cpp b/Source/platform/graphics/DeferredImageDecoder.cpp |
index 88fc0e885f855207e3bc988972073ac64db61153..b73d967212909074a4c2f062a05630d98f9bd5bd 100644 |
--- a/Source/platform/graphics/DeferredImageDecoder.cpp |
+++ b/Source/platform/graphics/DeferredImageDecoder.cpp |
@@ -117,21 +117,21 @@ ImageFrame* DeferredImageDecoder::frameBufferAtIndex(size_t index) |
return 0; |
} |
-void DeferredImageDecoder::setData(SharedBuffer* data, bool allDataReceived) |
+void DeferredImageDecoder::setData(SharedBuffer& data, bool allDataReceived) |
{ |
if (m_actualDecoder) { |
- const bool firstData = !m_data && data; |
- const bool moreData = data && data->size() > m_lastDataSize; |
+ const bool firstData = !m_data; |
+ const bool moreData = data.size() > m_lastDataSize; |
m_dataChanged = firstData || moreData; |
- m_data = data; |
- m_lastDataSize = data->size(); |
Inactive
2014/04/20 13:16:51
There was no null check here.
|
+ m_data = RefPtr<SharedBuffer>(data); |
+ m_lastDataSize = data.size(); |
m_allDataReceived = allDataReceived; |
- m_actualDecoder->setData(data, allDataReceived); |
+ m_actualDecoder->setData(&data, allDataReceived); |
prepareLazyDecodedFrames(); |
} |
if (m_frameGenerator) |
- m_frameGenerator->setData(data, allDataReceived); |
+ m_frameGenerator->setData(&data, allDataReceived); |
} |
bool DeferredImageDecoder::isSizeAvailable() |