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

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

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: 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/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 a362998b2d97014fe74d858c7e2aaa849d7d573f..5080e4645e9c20d95ca2654c71d1cbd6eb6a3806 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -113,8 +113,6 @@ Notification* Notification::create(ExecutionContext* context,
Notification* notification =
new Notification(context, Type::NonPersistent, data);
notification->schedulePrepareShow();
-
- notification->suspendIfNeeded();
return notification;
}
@@ -126,15 +124,13 @@ Notification* Notification::create(ExecutionContext* context,
new Notification(context, Type::Persistent, data);
notification->setState(showing ? State::Showing : State::Closed);
notification->setNotificationId(notificationId);
-
- notification->suspendIfNeeded();
return notification;
}
Notification::Notification(ExecutionContext* context,
Type type,
const WebNotificationData& data)
- : SuspendableObject(context),
+ : ContextLifecycleObserver(context),
m_type(type),
m_state(State::Loading),
m_data(data) {
@@ -404,7 +400,7 @@ DEFINE_TRACE(Notification) {
visitor->trace(m_prepareShowMethodRunner);
visitor->trace(m_loader);
EventTargetWithInlineData::trace(visitor);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698