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

Unified Diff: third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h

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/dom/MainThreadTaskRunner.h
diff --git a/third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h b/third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h
index d865782e3cdbf451475b9ebe38a4fcca5672fce5..0bd88cac8f90393b593b4dab79e8fc1a4a224155 100644
--- a/third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h
+++ b/third_party/WebKit/Source/core/dom/MainThreadTaskRunner.h
@@ -74,6 +74,7 @@ private:
Vector<std::pair<std::unique_ptr<ExecutionContextTask>, bool /* instrumenting */>> m_pendingTasks;
bool m_suspended;
WeakPtrFactory<MainThreadTaskRunner> m_weakFactory;
+ WeakPtr<MainThreadTaskRunner> m_weakPtr;
};
inline std::unique_ptr<MainThreadTaskRunner> MainThreadTaskRunner::create(ExecutionContext* context)

Powered by Google App Engine
This is Rietveld 408576698