| 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 d8c83a3d5801dc3afc0ff5443529bc2cc5b942f9..fa165b7138172df03bfadf670e5becf5f6b1fc25 100644
|
| --- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| +++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/dom/DOMException.h"
|
| #include "core/dom/ExecutionContext.h"
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/fileapi/Blob.h"
|
| #include "core/frame/ImageBitmap.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| @@ -258,19 +259,19 @@ void ImageBitmapFactories::ImageBitmapLoader::scheduleAsyncImageBitmapDecoding(
|
| if (arrayBuffer->byteLength() >= longTaskByteLengthThreshold)
|
| taskSize = BackgroundTaskRunner::TaskSizeLongRunningTask;
|
| WebTaskRunner* taskRunner =
|
| - Platform::current()->currentThread()->getWebTaskRunner();
|
| + TaskRunnerHelper::get(TaskType::Networking, m_resolver->getScriptState());
|
| BackgroundTaskRunner::postOnBackgroundThread(
|
| BLINK_FROM_HERE,
|
| crossThreadBind(
|
| &ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread,
|
| - wrapCrossThreadPersistent(this), crossThreadUnretained(taskRunner),
|
| + wrapCrossThreadPersistent(this), WTF::passed(taskRunner->clone()),
|
| wrapCrossThreadPersistent(arrayBuffer), m_options.premultiplyAlpha(),
|
| m_options.colorSpaceConversion()),
|
| taskSize);
|
| }
|
|
|
| void ImageBitmapFactories::ImageBitmapLoader::decodeImageOnDecoderThread(
|
| - WebTaskRunner* taskRunner,
|
| + std::unique_ptr<WebTaskRunner> taskRunner,
|
| DOMArrayBuffer* arrayBuffer,
|
| const String& premultiplyAlphaOption,
|
| const String& colorSpaceConversionOption) {
|
|
|