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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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/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 211ff27faeb0992d5bc1ab70fd495552eaf1adbf..60f71569e419273fd50fc1f7cf4fb0741e6ae551 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