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

Unified Diff: Source/core/html/ImageData.cpp

Issue 214153006: Oilpan: move ImageData to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
Index: Source/core/html/ImageData.cpp
diff --git a/Source/core/html/ImageData.cpp b/Source/core/html/ImageData.cpp
index 936945ce417a628c97d933008605aa30286ce03b..486a8e61457e699ff4e194dda8ebe6e0185b6296 100644
--- a/Source/core/html/ImageData.cpp
+++ b/Source/core/html/ImageData.cpp
@@ -35,7 +35,7 @@
namespace WebCore {
-PassRefPtr<ImageData> ImageData::create(const IntSize& size)
+PassRefPtrWillBeRawPtr<ImageData> ImageData::create(const IntSize& size)
{
Checked<int, RecordOverflow> dataSize = 4;
dataSize *= size.width();
@@ -43,10 +43,10 @@ PassRefPtr<ImageData> ImageData::create(const IntSize& size)
if (dataSize.hasOverflowed())
return nullptr;
- return adoptRef(new ImageData(size));
+ return adoptRefWillBeNoop(new ImageData(size));
}
-PassRefPtr<ImageData> ImageData::create(const IntSize& size, PassRefPtr<Uint8ClampedArray> byteArray)
+PassRefPtrWillBeRawPtr<ImageData> ImageData::create(const IntSize& size, PassRefPtr<Uint8ClampedArray> byteArray)
{
Checked<int, RecordOverflow> dataSize = 4;
dataSize *= size.width();
@@ -58,10 +58,10 @@ PassRefPtr<ImageData> ImageData::create(const IntSize& size, PassRefPtr<Uint8Cla
|| static_cast<unsigned>(dataSize.unsafeGet()) > byteArray->length())
return nullptr;
- return adoptRef(new ImageData(size, byteArray));
+ return adoptRefWillBeNoop(new ImageData(size, byteArray));
}
-PassRefPtr<ImageData> ImageData::create(unsigned width, unsigned height, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<ImageData> ImageData::create(unsigned width, unsigned height, ExceptionState& exceptionState)
{
if (!RuntimeEnabledFeatures::imageDataConstructorEnabled()) {
exceptionState.throwTypeError("Illegal constructor");
@@ -80,12 +80,12 @@ PassRefPtr<ImageData> ImageData::create(unsigned width, unsigned height, Excepti
return nullptr;
}
- RefPtr<ImageData> imageData = adoptRef(new ImageData(IntSize(width, height)));
+ RefPtrWillBeRawPtr<ImageData> imageData = adoptRefWillBeNoop(new ImageData(IntSize(width, height)));
imageData->data()->zeroFill();
return imageData.release();
}
-PassRefPtr<ImageData> ImageData::create(Uint8ClampedArray* data, unsigned width, unsigned height, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<ImageData> ImageData::create(Uint8ClampedArray* data, unsigned width, unsigned height, ExceptionState& exceptionState)
{
if (!RuntimeEnabledFeatures::imageDataConstructorEnabled()) {
exceptionState.throwTypeError("Illegal constructor");
@@ -121,7 +121,7 @@ PassRefPtr<ImageData> ImageData::create(Uint8ClampedArray* data, unsigned width,
return nullptr;
}
- return adoptRef(new ImageData(IntSize(width, height), data));
+ return adoptRefWillBeNoop(new ImageData(IntSize(width, height), data));
}
ImageData::ImageData(const IntSize& size)

Powered by Google App Engine
This is Rietveld 408576698