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

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.cpp

Issue 1976083002: Make ImageLoader::Task non-WebTaskRunner::Task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Shironeko_1
Patch Set: Rebase. Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index 7e575b01d447c603b30f80fb5e09ec9e48d2db4b..66d5f545a9239f8d86a35cc847a7f1f7d52c6789 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -80,7 +80,7 @@ static ImageLoader::BypassMainWorldBehavior shouldBypassMainWorldCSP(ImageLoader
return ImageLoader::DoNotBypassMainWorldCSP;
}
-class ImageLoader::Task : public WebTaskRunner::Task {
+class ImageLoader::Task {
public:
static std::unique_ptr<Task> create(ImageLoader* loader, UpdateFromElementBehavior updateBehavior, ReferrerPolicy referrerPolicy)
{
@@ -108,11 +108,7 @@ public:
}
}
- ~Task() override
- {
- }
-
- void run() override
+ void run()
{
if (!m_loader)
return;
@@ -250,7 +246,7 @@ inline void ImageLoader::enqueueImageLoadingMicroTask(UpdateFromElementBehavior
{
std::unique_ptr<Task> task = Task::create(this, updateBehavior, referrerPolicy);
m_pendingTask = task->createWeakPtr();
- Microtask::enqueueMicrotask(std::move(task));
+ Microtask::enqueueMicrotask(WTF::bind(&Task::run, passed(std::move(task))));
m_loadDelayCounter = IncrementLoadEventDelayCount::create(m_element->document());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698