Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index e94c050d65721863e42ffe202d848853b91a665f..45b456923521cd6d190795f0b01959ebf19eac9e 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -392,7 +392,7 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, const double* qualit |
RefPtr<ImageData> imageData = getImageData(); |
if (imageData) |
- return ImageDataToDataURL(*imageData, encodingMimeType, quality); |
+ return ImageDataToDataURL(ImageDataBuffer(imageData->size(), imageData->data()), encodingMimeType, quality); |
if (m_context) |
m_context->paintRenderingResultsToCanvas(); |