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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseContext.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/webdatabase/DatabaseContext.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
index 2ce7237af419f8c4a40e556d34b602132ecfa149..a11c11c33ebd06d9dafb27d040e5b4676c7360c9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
@@ -69,7 +69,8 @@ namespace blink {
// 1. "outlive" the ExecutionContext.
// - This is needed because the DatabaseContext needs to remove itself from
// the
-// ExecutionContext's SuspendableObject list and ContextLifecycleObserver
+// ExecutionContext's ContextLifecycleObserver list and
+// ContextLifecycleObserver
// list. This removal needs to be executed on the script's thread. Hence,
// we
// rely on the ExecutionContext's shutdown process to call
@@ -98,14 +99,11 @@ DatabaseContext* DatabaseContext::create(ExecutionContext* context) {
}
DatabaseContext::DatabaseContext(ExecutionContext* context)
- : SuspendableObject(context),
+ : ContextLifecycleObserver(context),
m_hasOpenDatabases(false),
m_hasRequestedTermination(false) {
DCHECK(isMainThread());
- // SuspendableObject expects this to be called to set internal flags.
- suspendIfNeeded();
-
// For debug accounting only. We must do this before we register the
// instance. The assertions assume this.
DatabaseManager::manager().didConstructDatabaseContext();
@@ -119,7 +117,7 @@ DatabaseContext::~DatabaseContext() {
DEFINE_TRACE(DatabaseContext) {
visitor->trace(m_databaseThread);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
// This is called if the associated ExecutionContext is destructing while

Powered by Google App Engine
This is Rietveld 408576698