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

Unified Diff: Source/core/frame/ImageBitmap.cpp

Issue 190183003: Oilpan: move ImageBitmap to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Control image resource lifetimes in tests using explicit GCs 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/frame/ImageBitmap.cpp
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp
index 2b358b247a4a44f34af2e63ae90e070233cd0cda..cd66f75c36c201a96265fa80c9c135318e114e05 100644
--- a/Source/core/frame/ImageBitmap.cpp
+++ b/Source/core/frame/ImageBitmap.cpp
@@ -149,40 +149,40 @@ ImageBitmap::~ImageBitmap()
m_imageElement->removeClient(this);
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLImageElement* image, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLImageElement* image, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(image, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect));
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(video, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(video, normalizedCropRect));
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLCanvasElement* canvas, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLCanvasElement* canvas, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(canvas, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(canvas, normalizedCropRect));
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(ImageData* data, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(ImageData* data, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(data, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(data, normalizedCropRect));
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(ImageBitmap* bitmap, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(ImageBitmap* bitmap, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(bitmap, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(bitmap, normalizedCropRect));
}
-PassRefPtr<ImageBitmap> ImageBitmap::create(Image* image, const IntRect& cropRect)
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(Image* image, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(image, normalizedCropRect));
+ return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect));
}
void ImageBitmap::notifyImageSourceChanged()
@@ -224,4 +224,8 @@ FloatSize ImageBitmap::sourceSize() const
return FloatSize(width(), height());
}
+void ImageBitmap::trace(Visitor*)
+{
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698