Index: Source/modules/indexeddb/IDBObjectStore.cpp |
diff --git a/Source/modules/indexeddb/IDBObjectStore.cpp b/Source/modules/indexeddb/IDBObjectStore.cpp |
index 67d5f0b3ad0a88020ba65054dfddb716b16606a9..b7d42bc8fdbb895a5f0707ba61cafec9845dbe7e 100644 |
--- a/Source/modules/indexeddb/IDBObjectStore.cpp |
+++ b/Source/modules/indexeddb/IDBObjectStore.cpp |
@@ -419,9 +419,9 @@ namespace { |
// cursor success handlers are kept alive. |
class IndexPopulator final : public EventListener { |
public: |
- static PassRefPtr<IndexPopulator> create(ScriptState* scriptState, IDBDatabase* database, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata) |
+ static PassRefPtrWillBeRawPtr<IndexPopulator> create(ScriptState* scriptState, IDBDatabase* database, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata) |
{ |
- return adoptRef(new IndexPopulator(scriptState, database, transactionId, objectStoreId, indexMetadata)); |
+ return adoptRefWillBeNoop(new IndexPopulator(scriptState, database, transactionId, objectStoreId, indexMetadata)); |
} |
bool operator==(const EventListener& other) override |
@@ -429,6 +429,12 @@ public: |
return this == &other; |
} |
+ DEFINE_INLINE_VIRTUAL_TRACE() |
+ { |
+ visitor->trace(m_database); |
+ EventListener::trace(visitor); |
+ } |
+ |
private: |
IndexPopulator(ScriptState* scriptState, IDBDatabase* database, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata) |
: EventListener(CPPEventListenerType) |
@@ -480,7 +486,7 @@ private: |
} |
RefPtr<ScriptState> m_scriptState; |
- Persistent<IDBDatabase> m_database; |
+ PersistentWillBeMember<IDBDatabase> m_database; |
const int64_t m_transactionId; |
const int64_t m_objectStoreId; |
const IDBIndexMetadata m_indexMetadata; |
@@ -543,7 +549,7 @@ IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na |
indexRequest->preventPropagation(); |
// This is kept alive by being the success handler of the request, which is in turn kept alive by the owning transaction. |
- RefPtr<IndexPopulator> indexPopulator = IndexPopulator::create(scriptState, transaction()->db(), m_transaction->id(), id(), metadata); |
+ RefPtrWillBeRawPtr<IndexPopulator> indexPopulator = IndexPopulator::create(scriptState, transaction()->db(), m_transaction->id(), id(), metadata); |
indexRequest->setOnsuccess(indexPopulator); |
return index; |
} |