Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: Source/bindings/core/v8/ScriptValueSerializer.cpp

Issue 1084313004: Oilpan: keep ImageData on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ensure timely disposal of temporary ImageData buffers Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptValueSerializer.cpp
diff --git a/Source/bindings/core/v8/ScriptValueSerializer.cpp b/Source/bindings/core/v8/ScriptValueSerializer.cpp
index 21908d25933fdcc104cdd07bcfa04ce33d7f5fc1..4e79076bf14e711b54d7be1603a016e1910f5de3 100644
--- a/Source/bindings/core/v8/ScriptValueSerializer.cpp
+++ b/Source/bindings/core/v8/ScriptValueSerializer.cpp
@@ -1400,13 +1400,13 @@ bool SerializedScriptValueReader::readImageData(v8::Local<v8::Value>* value)
return false;
if (m_position + pixelDataLength > m_length)
return false;
- RefPtrWillBeRawPtr<ImageData> imageData = ImageData::create(IntSize(width, height));
+ ImageData* imageData = ImageData::create(IntSize(width, height));
DOMUint8ClampedArray* pixelArray = imageData->data();
ASSERT(pixelArray);
ASSERT(pixelArray->length() >= pixelDataLength);
memcpy(pixelArray->data(), m_buffer + m_position, pixelDataLength);
m_position += pixelDataLength;
- *value = toV8(imageData.release(), m_scriptState->context()->Global(), isolate());
+ *value = toV8(imageData, m_scriptState->context()->Global(), isolate());
return true;
}
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698