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

Unified Diff: third_party/WebKit/Source/modules/notifications/Notification.cpp

Issue 1580883002: Oilpan: move AsyncMethodRunner to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename to RawPtrOrMemberTrait<> Created 4 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/modules/notifications/Notification.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index 65d44fa6bdc02103dd3b9511818675e2d1579c8b..00801a281c23bbe7999da1cdf14e399a025ebd59 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -116,7 +116,7 @@ Notification::Notification(ExecutionContext* context, const WebNotificationData&
, m_data(data)
, m_persistentId(kInvalidPersistentId)
, m_state(NotificationStateIdle)
- , m_asyncRunner(this, &Notification::show)
+ , m_asyncRunner(AsyncMethodRunner<Notification>::create(this, &Notification::show))
{
ASSERT(notificationManager());
}
@@ -128,9 +128,9 @@ Notification::~Notification()
void Notification::scheduleShow()
{
ASSERT(m_state == NotificationStateIdle);
- ASSERT(!m_asyncRunner.isActive());
+ ASSERT(!m_asyncRunner->isActive());
- m_asyncRunner.runAsync();
+ m_asyncRunner->runAsync();
}
void Notification::show()
@@ -354,16 +354,17 @@ void Notification::stop()
m_state = NotificationStateClosed;
- m_asyncRunner.stop();
+ m_asyncRunner->stop();
}
bool Notification::hasPendingActivity() const
{
- return m_state == NotificationStateShowing || m_asyncRunner.isActive();
+ return m_state == NotificationStateShowing || m_asyncRunner->isActive();
}
DEFINE_TRACE(Notification)
{
+ visitor->trace(m_asyncRunner);
RefCountedGarbageCollectedEventTargetWithInlineData<Notification>::trace(visitor);
ActiveDOMObject::trace(visitor);
}
« no previous file with comments | « third_party/WebKit/Source/modules/notifications/Notification.h ('k') | third_party/WebKit/Source/platform/AsyncMethodRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698