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

Unified Diff: Source/modules/filesystem/DirectoryReader.cpp

Issue 188503002: Oilpan: add transition types to FileSystem APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 9 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
« no previous file with comments | « Source/modules/filesystem/DirectoryReader.h ('k') | Source/modules/filesystem/DirectoryReader.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/DirectoryReader.cpp
diff --git a/Source/modules/filesystem/DirectoryReader.cpp b/Source/modules/filesystem/DirectoryReader.cpp
index c97fdea446c26cfa0a6396cce9ea9698f11cb19f..9d4de7ff69ecc28228a6d7b537f4f799bc615749 100644
--- a/Source/modules/filesystem/DirectoryReader.cpp
+++ b/Source/modules/filesystem/DirectoryReader.cpp
@@ -40,24 +40,24 @@ namespace WebCore {
class DirectoryReader::EntriesCallbackHelper : public EntriesCallback {
public:
- EntriesCallbackHelper(PassRefPtr<DirectoryReader> reader)
+ EntriesCallbackHelper(PassRefPtrWillBeRawPtr<DirectoryReader> reader)
: m_reader(reader)
{
}
- virtual void handleEvent(const Vector<RefPtr<Entry> >& entries) OVERRIDE
+ virtual void handleEvent(const EntryHeapVector& entries) OVERRIDE
{
m_reader->addEntries(entries);
}
private:
// FIXME: This RefPtr keeps the reader alive until all of the readDirectory results are received. crbug.com/350285
- RefPtr<DirectoryReader> m_reader;
+ RefPtrWillBePersistent<DirectoryReader> m_reader;
};
class DirectoryReader::ErrorCallbackHelper : public ErrorCallback {
public:
- ErrorCallbackHelper(PassRefPtr<DirectoryReader> reader)
+ ErrorCallbackHelper(PassRefPtrWillBeRawPtr<DirectoryReader> reader)
: m_reader(reader)
{
}
@@ -68,10 +68,10 @@ public:
}
private:
- RefPtr<DirectoryReader> m_reader;
+ RefPtrWillBePersistent<DirectoryReader> m_reader;
};
-DirectoryReader::DirectoryReader(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
+DirectoryReader::DirectoryReader(PassRefPtrWillBeRawPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
: DirectoryReaderBase(fileSystem, fullPath)
, m_isReading(false)
{
@@ -110,12 +110,12 @@ void DirectoryReader::readEntries(PassOwnPtr<EntriesCallback> entriesCallback, P
m_errorCallback = errorCallback;
}
-void DirectoryReader::addEntries(const Vector<RefPtr<Entry> >& entries)
+void DirectoryReader::addEntries(const EntryHeapVector& entries)
{
m_entries.appendVector(entries);
if (m_entriesCallback) {
OwnPtr<EntriesCallback> entriesCallback = m_entriesCallback.release();
- Vector<RefPtr<Entry> > entries;
+ EntryHeapVector entries;
entries.swap(m_entries);
entriesCallback->handleEvent(entries);
}
@@ -128,4 +128,11 @@ void DirectoryReader::onError(FileError* error)
m_errorCallback->handleEvent(error);
}
+void DirectoryReader::trace(Visitor* visitor)
+{
+ visitor->trace(m_entries);
+ visitor->trace(m_error);
+ DirectoryReaderBase::trace(visitor);
+}
+
}
« no previous file with comments | « Source/modules/filesystem/DirectoryReader.h ('k') | Source/modules/filesystem/DirectoryReader.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698