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

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

Issue 2329243002: Implement WTF::WeakPtr in terms of base::WeakPtr (Closed)
Patch Set: Thread-safety fix with comment Created 4 years, 3 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/loader/ImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index 86f65618292a28c53500d98bb06686c25897ba40..8bc2bb5869f72a265c6d8ec119e5830984e57ee2 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -264,7 +264,7 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior, Up
// We don't need to call clearLoader here: Either we were called from the
// task, or our caller updateFromElement cleared the task's loader (and set
// m_pendingTask to null).
- m_pendingTask.clear();
+ m_pendingTask.reset();
// Make sure to only decrement the count when we exit this function
std::unique_ptr<IncrementLoadEventDelayCount> loadDelayCounter;
loadDelayCounter.swap(m_loadDelayCounter);
@@ -375,7 +375,7 @@ void ImageLoader::updateFromElement(UpdateFromElementBehavior updateBehavior, Re
// now loading immediately, or we need to reset the task's state.
if (m_pendingTask) {
m_pendingTask->clearLoader();
- m_pendingTask.clear();
+ m_pendingTask.reset();
}
KURL url = imageSourceToKURL(imageSourceURL);

Powered by Google App Engine
This is Rietveld 408576698