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

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

Issue 2618893002: Fix memory leak with ScriptedIdleTaskController (Closed)
Patch Set: Improve test 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/core/dom/ScriptedIdleTaskController.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.h b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.h
index 765c90f35af1b5a1a01cfdb33e0bc4d685b14a0e..3df8b8c8389432a219a2d69b9bd4e5f9b96dd879 100644
--- a/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.h
+++ b/third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.h
@@ -10,6 +10,7 @@
#include "platform/Timer.h"
#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
+#include "wtf/WeakPtr.h"
namespace blink {
@@ -63,6 +64,7 @@ class ScriptedIdleTaskController
HeapHashMap<CallbackId, Member<IdleRequestCallback>> m_callbacks;
Vector<CallbackId> m_pendingTimeouts;
CallbackId m_nextCallbackId;
+ WTF::WeakPtrFactory<ScriptedIdleTaskController> m_weakPtrFactory;
bool m_suspended;
};

Powered by Google App Engine
This is Rietveld 408576698