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

Unified Diff: third_party/WebKit/Source/platform/heap/GCTaskRunner.h

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/heap/GCTaskRunner.h
diff --git a/third_party/WebKit/Source/platform/heap/GCTaskRunner.h b/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
index a1db9d8bd9b3c374c5939b597d4b22999f690972..df581a834dc241a4294b0f8136bfd604e380f8d7 100644
--- a/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
+++ b/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
@@ -43,8 +43,8 @@ namespace blink {
class MessageLoopInterruptor final : public BlinkGCInterruptor {
public:
- explicit MessageLoopInterruptor(WebTaskRunner* taskRunner)
- : m_taskRunner(taskRunner) {}
+ explicit MessageLoopInterruptor(RefPtr<WebTaskRunner> taskRunner)
+ : m_taskRunner(std::move(taskRunner)) {}
void requestInterrupt() override {
// GCTask has an empty run() method. Its only purpose is to guarantee
@@ -62,7 +62,7 @@ class MessageLoopInterruptor final : public BlinkGCInterruptor {
// conservatively enters safepoint with pointers on stack.
}
- WebTaskRunner* m_taskRunner;
+ RefPtr<WebTaskRunner> m_taskRunner;
};
class GCTaskObserver final : public WebThread::TaskObserver {

Powered by Google App Engine
This is Rietveld 408576698