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

Unified Diff: Source/modules/filesystem/DirectoryReaderSync.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/DirectoryReaderSync.h ('k') | Source/modules/filesystem/DirectoryReaderSync.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/DirectoryReaderSync.cpp
diff --git a/Source/modules/filesystem/DirectoryReaderSync.cpp b/Source/modules/filesystem/DirectoryReaderSync.cpp
index a2e7422d4bfffa69090ba1caae21389251f13003..2ac5eef29b406c48d5f51d16e84882ec0db7f67e 100644
--- a/Source/modules/filesystem/DirectoryReaderSync.cpp
+++ b/Source/modules/filesystem/DirectoryReaderSync.cpp
@@ -44,14 +44,14 @@ namespace WebCore {
class DirectoryReaderSync::EntriesCallbackHelper : public EntriesCallback {
public:
- EntriesCallbackHelper(PassRefPtr<DirectoryReaderSync> reader)
+ EntriesCallbackHelper(PassRefPtrWillBeRawPtr<DirectoryReaderSync> reader)
: m_reader(reader)
{
}
- virtual void handleEvent(const Vector<RefPtr<Entry> >& entries) OVERRIDE
+ virtual void handleEvent(const EntryHeapVector& entries) OVERRIDE
{
- EntrySyncVector syncEntries;
+ EntrySyncHeapVector syncEntries;
syncEntries.reserveInitialCapacity(entries.size());
for (size_t i = 0; i < entries.size(); ++i)
syncEntries.uncheckedAppend(EntrySync::create(entries[i].get()));
@@ -59,12 +59,12 @@ public:
}
private:
- RefPtr<DirectoryReaderSync> m_reader;
+ RefPtrWillBePersistent<DirectoryReaderSync> m_reader;
};
class DirectoryReaderSync::ErrorCallbackHelper : public ErrorCallback {
public:
- ErrorCallbackHelper(PassRefPtr<DirectoryReaderSync> reader)
+ ErrorCallbackHelper(PassRefPtrWillBeRawPtr<DirectoryReaderSync> reader)
: m_reader(reader)
{
}
@@ -75,10 +75,10 @@ public:
}
private:
- RefPtr<DirectoryReaderSync> m_reader;
+ RefPtrWillBePersistent<DirectoryReaderSync> m_reader;
};
-DirectoryReaderSync::DirectoryReaderSync(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
+DirectoryReaderSync::DirectoryReaderSync(PassRefPtrWillBeRawPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
: DirectoryReaderBase(fileSystem, fullPath)
, m_callbacksId(0)
, m_errorCode(FileError::OK)
@@ -90,7 +90,7 @@ DirectoryReaderSync::~DirectoryReaderSync()
{
}
-EntrySyncVector DirectoryReaderSync::readEntries(ExceptionState& exceptionState)
+EntrySyncHeapVector DirectoryReaderSync::readEntries(ExceptionState& exceptionState)
{
if (!m_callbacksId) {
m_callbacksId = filesystem()->readDirectory(this, m_fullPath, adoptPtr(new EntriesCallbackHelper(this)), adoptPtr(new ErrorCallbackHelper(this)), DOMFileSystemBase::Synchronous);
@@ -101,12 +101,18 @@ EntrySyncVector DirectoryReaderSync::readEntries(ExceptionState& exceptionState)
if (m_errorCode != FileError::OK) {
FileError::throwDOMException(exceptionState, m_errorCode);
- return EntrySyncVector();
+ return EntrySyncHeapVector();
}
- EntrySyncVector result;
+ EntrySyncHeapVector result;
result.swap(m_entries);
return result;
}
+void DirectoryReaderSync::trace(Visitor* visitor)
+{
+ visitor->trace(m_entries);
+ DirectoryReaderBase::trace(visitor);
+}
+
} // namespace
« no previous file with comments | « Source/modules/filesystem/DirectoryReaderSync.h ('k') | Source/modules/filesystem/DirectoryReaderSync.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698