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

Unified Diff: Source/modules/indexeddb/IDBObjectStore.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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: 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;
}

Powered by Google App Engine
This is Rietveld 408576698