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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
index 391a9ce9a387789b3fe74163480054a777b39a63..cae95f3253fa94900a35d387f4a8dcfa635f3e14 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h
@@ -17,21 +17,25 @@ namespace blink {
class PNGImageEncoderState;
class JPEGImageEncoderState;
-class CORE_EXPORT CanvasAsyncBlobCreator
- : public RefCounted<CanvasAsyncBlobCreator> {
+class CORE_EXPORT CanvasAsyncBlobCreator : public GarbageCollectedFinalized<CanvasAsyncBlobCreator> {
public:
- static PassRefPtr<CanvasAsyncBlobCreator> create(PassRefPtr<DOMUint8ClampedArray> unpremultipliedRGBAImageData, const String& mimeType, const IntSize&, BlobCallback*);
+ static CanvasAsyncBlobCreator* create(DOMUint8ClampedArray* unpremultipliedRGBAImageData, const String& mimeType, const IntSize&, BlobCallback*);
void scheduleAsyncBlobCreation(bool canUseIdlePeriodScheduling, double quality = 0.0);
virtual ~CanvasAsyncBlobCreator();
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_data);
+ }
+
private:
- CanvasAsyncBlobCreator(PassRefPtr<DOMUint8ClampedArray> data, const String& mimeType, const IntSize&, BlobCallback*);
+ CanvasAsyncBlobCreator(DOMUint8ClampedArray* data, const String& mimeType, const IntSize&, BlobCallback*);
void scheduleCreateBlobAndCallOnMainThread();
void scheduleCreateNullptrAndCallOnMainThread();
OwnPtr<PNGImageEncoderState> m_pngEncoderState;
OwnPtr<JPEGImageEncoderState> m_jpegEncoderState;
- RefPtr<DOMUint8ClampedArray> m_data;
+ Member<DOMUint8ClampedArray> m_data;
OwnPtr<Vector<unsigned char>> m_encodedImage;
int m_numRowsCompleted;
@@ -40,7 +44,7 @@ private:
const String m_mimeType;
CrossThreadPersistent<BlobCallback> m_callback;
- RefPtr<CanvasAsyncBlobCreator> m_selfRef;
+ SelfKeepAlive<CanvasAsyncBlobCreator> m_keepAlive;
void clearSelfReference();
void initiatePngEncoding(double deadlineSeconds);

Powered by Google App Engine
This is Rietveld 408576698