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

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

Issue 212263002: remove use of {,un}setPendingActivity from DOMFileSystem. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/DOMFileSystem.h ('k') | Source/modules/filesystem/FileSystemCallbacks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/filesystem/DOMFileSystem.cpp
diff --git a/Source/modules/filesystem/DOMFileSystem.cpp b/Source/modules/filesystem/DOMFileSystem.cpp
index dba053248136155e7fffec7686e6d0c85a38b3ef..5acc11eb06a23ccd6b90429637c741fb78ff8dc2 100644
--- a/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/Source/modules/filesystem/DOMFileSystem.cpp
@@ -88,6 +88,7 @@ PassRefPtrWillBeRawPtr<DOMFileSystem> DOMFileSystem::createIsolatedFileSystem(Ex
DOMFileSystem::DOMFileSystem(ExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL)
: DOMFileSystemBase(context, name, type, rootURL)
, ActiveDOMObject(context)
+ , m_numberOfPendingCallbacks(0)
{
ScriptWrappable::init(this);
}
@@ -99,12 +100,19 @@ PassRefPtrWillBeRawPtr<DirectoryEntry> DOMFileSystem::root()
void DOMFileSystem::addPendingCallbacks()
{
- setPendingActivity(this);
+ ++m_numberOfPendingCallbacks;
}
void DOMFileSystem::removePendingCallbacks()
{
- unsetPendingActivity(this);
+ ASSERT(m_numberOfPendingCallbacks > 0);
+ --m_numberOfPendingCallbacks;
+}
+
+bool DOMFileSystem::hasPendingActivity() const
+{
+ ASSERT(m_numberOfPendingCallbacks >= 0);
+ return m_numberOfPendingCallbacks;
}
void DOMFileSystem::reportError(PassOwnPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
« no previous file with comments | « Source/modules/filesystem/DOMFileSystem.h ('k') | Source/modules/filesystem/FileSystemCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698