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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: mac fix Created 4 years 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/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index f053a33e37d4afb757810137089f54b41c110043..d80833304e81fd3e5058522414a4c56f51fe1d9b 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -257,20 +257,20 @@ void ImageBitmapFactories::ImageBitmapLoader::scheduleAsyncImageBitmapDecoding(
BackgroundTaskRunner::TaskSizeShortRunningTask;
if (arrayBuffer->byteLength() >= longTaskByteLengthThreshold)
taskSize = BackgroundTaskRunner::TaskSizeLongRunningTask;
- WebTaskRunner* taskRunner =
+ RefPtr<WebTaskRunner> taskRunner =
Platform::current()->currentThread()->getWebTaskRunner();
BackgroundTaskRunner::postOnBackgroundThread(
BLINK_FROM_HERE,
crossThreadBind(
&ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread,
- wrapCrossThreadPersistent(this), crossThreadUnretained(taskRunner),
+ wrapCrossThreadPersistent(this), std::move(taskRunner),
wrapCrossThreadPersistent(arrayBuffer), m_options.premultiplyAlpha(),
m_options.colorSpaceConversion()),
taskSize);
}
void ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread(
- WebTaskRunner* taskRunner,
+ RefPtr<WebTaskRunner> taskRunner,
DOMArrayBuffer* arrayBuffer,
const String& premultiplyAlphaOption,
const String& colorSpaceConversionOption) {

Powered by Google App Engine
This is Rietveld 408576698