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

Unified Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.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/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
index cf252bf58aed11cf8b00cd84356980beb795dd20..7496236290c9fd01a4f90853dcada202472d78eb 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -158,7 +158,7 @@ void OffscreenCanvasFrameDispatcherImpl::
namespace {
void updatePlaceholderImage(WeakPtr<OffscreenCanvasFrameDispatcher> dispatcher,
- std::unique_ptr<WebTaskRunner> taskRunner,
+ RefPtr<WebTaskRunner> taskRunner,
int placeholderCanvasId,
RefPtr<blink::Image> image,
unsigned resourceId) {
@@ -243,8 +243,8 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
// After this point, |image| can only be used on the main thread, until
// it is returned.
image->transfer();
- std::unique_ptr<WebTaskRunner> dispatcherTaskRunner =
- Platform::current()->currentThread()->getWebTaskRunner()->clone();
+ RefPtr<WebTaskRunner> dispatcherTaskRunner =
+ Platform::current()->currentThread()->getWebTaskRunner();
Platform::current()->mainThread()->getWebTaskRunner()->postTask(
BLINK_FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698