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 cae95f3253fa94900a35d387f4a8dcfa635f3e14..391a9ce9a387789b3fe74163480054a777b39a63 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h |
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.h |
@@ -17,25 +17,21 @@ |
class PNGImageEncoderState; |
class JPEGImageEncoderState; |
-class CORE_EXPORT CanvasAsyncBlobCreator : public GarbageCollectedFinalized<CanvasAsyncBlobCreator> { |
+class CORE_EXPORT CanvasAsyncBlobCreator |
+ : public RefCounted<CanvasAsyncBlobCreator> { |
public: |
- static CanvasAsyncBlobCreator* create(DOMUint8ClampedArray* unpremultipliedRGBAImageData, const String& mimeType, const IntSize&, BlobCallback*); |
+ static PassRefPtr<CanvasAsyncBlobCreator> create(PassRefPtr<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(DOMUint8ClampedArray* data, const String& mimeType, const IntSize&, BlobCallback*); |
+ CanvasAsyncBlobCreator(PassRefPtr<DOMUint8ClampedArray> data, const String& mimeType, const IntSize&, BlobCallback*); |
void scheduleCreateBlobAndCallOnMainThread(); |
void scheduleCreateNullptrAndCallOnMainThread(); |
OwnPtr<PNGImageEncoderState> m_pngEncoderState; |
OwnPtr<JPEGImageEncoderState> m_jpegEncoderState; |
- Member<DOMUint8ClampedArray> m_data; |
+ RefPtr<DOMUint8ClampedArray> m_data; |
OwnPtr<Vector<unsigned char>> m_encodedImage; |
int m_numRowsCompleted; |
@@ -44,7 +40,7 @@ |
const String m_mimeType; |
CrossThreadPersistent<BlobCallback> m_callback; |
- SelfKeepAlive<CanvasAsyncBlobCreator> m_keepAlive; |
+ RefPtr<CanvasAsyncBlobCreator> m_selfRef; |
void clearSelfReference(); |
void initiatePngEncoding(double deadlineSeconds); |