Index: third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp |
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp |
index 6e79090d655630b4d8000258deb2710d6421bb2f..7372e87ca97e756527cdbbfa777d9cdd905f03d6 100644 |
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp |
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp |
@@ -75,28 +75,10 @@ DatabaseManager::~DatabaseManager() |
{ |
} |
-class DatabaseCreationCallbackTask final : public ExecutionContextTask { |
-public: |
- static std::unique_ptr<DatabaseCreationCallbackTask> create(Database* database, DatabaseCallback* creationCallback) |
- { |
- return wrapUnique(new DatabaseCreationCallbackTask(database, creationCallback)); |
- } |
- |
- void performTask(ExecutionContext*) override |
- { |
- m_creationCallback->handleEvent(m_database.get()); |
- } |
- |
-private: |
- DatabaseCreationCallbackTask(Database* database, DatabaseCallback* callback) |
- : m_database(database) |
- , m_creationCallback(callback) |
- { |
- } |
- |
- Persistent<Database> m_database; |
- Persistent<DatabaseCallback> m_creationCallback; |
-}; |
+static void databaseCallbackHandleEvent(DatabaseCallback* callback, Database* database) |
hiroshige
2016/06/26 10:42:37
This is just for ignoring DatabaseCallback::handle
tzik
2016/06/26 14:16:50
Could you leave that as a comment?
hiroshige
2016/06/27 07:28:38
Done.
|
+{ |
+ callback->handleEvent(database); |
+} |
DatabaseContext* DatabaseManager::existingDatabaseContextFor(ExecutionContext* context) |
{ |
@@ -214,7 +196,7 @@ Database* DatabaseManager::openDatabase(ExecutionContext* context, |
if (database->isNew() && creationCallback) { |
WTF_LOG(StorageAPI, "Scheduling DatabaseCreationCallbackTask for database %p\n", database); |
- database->getExecutionContext()->postTask(BLINK_FROM_HERE, DatabaseCreationCallbackTask::create(database, creationCallback), "openDatabase"); |
+ database->getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&databaseCallbackHandleEvent, wrapPersistent(creationCallback), wrapPersistent(database)), "openDatabase"); |
} |
ASSERT(database); |