Index: third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp |
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp |
index a917430d263822706ba8eb916a46465db16dfaa2..c9e6a51738d215f28d33f7ad0449cde40bc5630e 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp |
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp |
@@ -118,7 +118,7 @@ void CanvasAsyncBlobCreator::scheduleAsyncBlobCreation(bool canUseIdlePeriodSche |
} |
// We post the below task to check if the above idle task isn't late. |
// There's no risk of concurrency as both tasks are on main thread. |
- this->postDelayedTaskToMainThread(BLINK_FROM_HERE, bind(&CanvasAsyncBlobCreator::idleTaskStartTimeoutEvent, this, quality), IdleTaskStartTimeoutDelay); |
+ this->postDelayedTaskToMainThread(BLINK_FROM_HERE, bind(&CanvasAsyncBlobCreator::idleTaskStartTimeoutEvent, WeakPersistentThisPointer<CanvasAsyncBlobCreator>(this), quality), IdleTaskStartTimeoutDelay); |
} else if (m_mimeType == MimeTypeWebp) { |
BackgroundTaskRunner::TaskSize taskSize = (m_size.height() * m_size.width() >= LongTaskImageSizeThreshold) ? BackgroundTaskRunner::TaskSizeLongRunningTask : BackgroundTaskRunner::TaskSizeShortRunningTask; |
BackgroundTaskRunner::postOnBackgroundThread(BLINK_FROM_HERE, threadSafeBind(&CanvasAsyncBlobCreator::encodeImageOnEncoderThread, wrapCrossThreadPersistent(this), quality), taskSize); |