diff options
author | oleg@chromium.org <oleg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 18:06:53 +0000 |
---|---|---|
committer | oleg@chromium.org <oleg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 18:06:53 +0000 |
commit | 87a8296b236bc96bd87d05f57180a35300159ed1 (patch) | |
tree | 6717ac6f5f4627c894d020d8aa6f8587c2a8ee52 /webkit | |
parent | 03d62140b602a75862a096c0b807b8952abe7b66 (diff) | |
download | chromium_src-87a8296b236bc96bd87d05f57180a35300159ed1.zip chromium_src-87a8296b236bc96bd87d05f57180a35300159ed1.tar.gz chromium_src-87a8296b236bc96bd87d05f57180a35300159ed1.tar.bz2 |
Add a debug check to verify that FileSystemCallbackDispatcher is not NULL in FileSystemOperation.
Review URL: http://codereview.chromium.org/8390046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/fileapi/file_system_operation.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/fileapi/file_system_operation.cc b/webkit/fileapi/file_system_operation.cc index e6bb157..7c504a6 100644 --- a/webkit/fileapi/file_system_operation.cc +++ b/webkit/fileapi/file_system_operation.cc @@ -80,6 +80,7 @@ FileSystemOperation::~FileSystemOperation() { void FileSystemOperation::OpenFileSystem( const GURL& origin_url, fileapi::FileSystemType type, bool create) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = static_cast<FileSystemOperation::OperationType>( kOperationOpenFileSystem); @@ -103,6 +104,7 @@ void FileSystemOperation::OpenFileSystem( void FileSystemOperation::CreateFile(const GURL& path, bool exclusive) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationCreateFile; #endif @@ -141,6 +143,7 @@ void FileSystemOperation::CreateDirectory(const GURL& path, bool exclusive, bool recursive) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationCreateDirectory; #endif @@ -176,6 +179,7 @@ void FileSystemOperation::DelayedCreateDirectoryForQuota( void FileSystemOperation::Copy(const GURL& src_path, const GURL& dest_path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationCopy; #endif @@ -210,6 +214,7 @@ void FileSystemOperation::DelayedCopyForQuota(quota::QuotaStatusCode status, void FileSystemOperation::Move(const GURL& src_path, const GURL& dest_path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationMove; #endif @@ -243,6 +248,7 @@ void FileSystemOperation::DelayedMoveForQuota(quota::QuotaStatusCode status, void FileSystemOperation::DirectoryExists(const GURL& path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationDirectoryExists; #endif @@ -259,6 +265,7 @@ void FileSystemOperation::DirectoryExists(const GURL& path) { void FileSystemOperation::FileExists(const GURL& path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationFileExists; #endif @@ -275,6 +282,7 @@ void FileSystemOperation::FileExists(const GURL& path) { void FileSystemOperation::GetMetadata(const GURL& path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationGetMetadata; #endif @@ -291,6 +299,7 @@ void FileSystemOperation::GetMetadata(const GURL& path) { void FileSystemOperation::ReadDirectory(const GURL& path) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationReadDirectory; #endif @@ -307,6 +316,7 @@ void FileSystemOperation::ReadDirectory(const GURL& path) { void FileSystemOperation::Remove(const GURL& path, bool recursive) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationRemove; #endif @@ -327,6 +337,7 @@ void FileSystemOperation::Write( const GURL& blob_url, int64 offset) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationWrite; #endif @@ -367,6 +378,7 @@ void FileSystemOperation::DelayedWriteForQuota(quota::QuotaStatusCode status, void FileSystemOperation::Truncate(const GURL& path, int64 length) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationTruncate; #endif @@ -401,6 +413,7 @@ void FileSystemOperation::TouchFile(const GURL& path, const base::Time& last_access_time, const base::Time& last_modified_time) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationTouchFile; #endif @@ -420,6 +433,7 @@ void FileSystemOperation::OpenFile(const GURL& path, int file_flags, base::ProcessHandle peer_handle) { #ifndef NDEBUG + DCHECK(dispatcher_.get()); DCHECK(kOperationNone == pending_operation_); pending_operation_ = kOperationOpenFile; #endif |