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

Unified Diff: Source/modules/filesystem/SyncCallbackHelper.h

Issue 188503002: Oilpan: add transition types to FileSystem APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve some type names 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
Index: Source/modules/filesystem/SyncCallbackHelper.h
diff --git a/Source/modules/filesystem/SyncCallbackHelper.h b/Source/modules/filesystem/SyncCallbackHelper.h
index 13518fdc333a7575f44188cf8c07eb233dacc5cc..5f4794117219f1c0ea6a00a96c54a0ab3d3acb81 100644
--- a/Source/modules/filesystem/SyncCallbackHelper.h
+++ b/Source/modules/filesystem/SyncCallbackHelper.h
@@ -35,6 +35,7 @@
#include "bindings/v8/ExceptionState.h"
#include "core/fileapi/FileError.h"
#include "core/html/VoidCallback.h"
+#include "heap/Handle.h"
#include "modules/filesystem/DirectoryEntry.h"
#include "modules/filesystem/DirectoryReaderSync.h"
#include "modules/filesystem/EntriesCallback.h"
@@ -51,8 +52,8 @@ namespace WebCore {
template <typename ResultType, typename CallbackArg>
struct HelperResultType {
haraken 2014/03/10 01:55:26 Shall we add STACK_ALLOCATED or DISALLOW_ALLOCATIO
sof 2014/03/10 10:01:23 Done (DISALLOW_ALLOCATION.)
- typedef PassRefPtr<ResultType> ReturnType;
- typedef RefPtr<ResultType> StorageType;
+ typedef PassRefPtrWillBeRawPtr<ResultType> ReturnType;
+ typedef RefPtrWillBeRawPtr<ResultType> StorageType;
static ReturnType createFromCallbackArg(CallbackArg argument)
{
@@ -61,13 +62,13 @@ struct HelperResultType {
};
template <>
-struct HelperResultType<EntrySyncVector, const EntryVector&> {
- typedef EntrySyncVector ReturnType;
- typedef EntrySyncVector StorageType;
+struct HelperResultType<EntrySyncHeapVector, const EntryHeapVector&> {
haraken 2014/03/10 01:55:26 Ditto.
+ typedef EntrySyncHeapVector ReturnType;
+ typedef EntrySyncHeapVector StorageType;
- static EntrySyncVector createFromCallbackArg(const EntryVector& entries)
+ static EntrySyncHeapVector createFromCallbackArg(const EntryHeapVector& entries)
{
- EntrySyncVector result;
+ EntrySyncHeapVector result;
size_t entryCount = entries.size();
result.reserveInitialCapacity(entryCount);
for (size_t i = 0; i < entryCount; ++i)
@@ -80,6 +81,7 @@ struct HelperResultType<EntrySyncVector, const EntryVector&> {
template <typename SuccessCallback, typename CallbackArg, typename ResultType>
class SyncCallbackHelper {
WTF_MAKE_NONCOPYABLE(SyncCallbackHelper);
+ STACK_ALLOCATED();
public:
typedef SyncCallbackHelper<SuccessCallback, CallbackArg, ResultType> HelperType;
typedef HelperResultType<ResultType, CallbackArg> ResultTypeTrait;
@@ -168,14 +170,14 @@ private:
};
struct EmptyType : public RefCounted<EmptyType> {
- static PassRefPtr<EmptyType> create(EmptyType*)
+ static PassRefPtrWillBeRawPtr<EmptyType> create(EmptyType*)
{
return nullptr;
}
};
typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHelper;
-typedef SyncCallbackHelper<EntriesCallback, const EntryVector&, EntrySyncVector> EntriesSyncCallbackHelper;
+typedef SyncCallbackHelper<EntriesCallback, const EntryHeapVector&, EntrySyncHeapVector> EntriesSyncCallbackHelper;
typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCallbackHelper;
typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallbackHelper;
typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync> FileSystemSyncCallbackHelper;

Powered by Google App Engine
This is Rietveld 408576698