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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index bee46e661fa85faed151a4f92cfdb62aa7729cfc..2fa3ee226f9cb859e8a518b2a1087d949382bb2b 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -260,20 +260,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