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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReader.cpp

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TemporaryChange -> AutoReset Created 4 years, 5 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: third_party/WebKit/Source/core/fileapi/FileReader.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReader.cpp b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
index f1d323748eee8d113e4817d22f168595f03f8b5d..d6bbde3fd48c228ece4e2485b9b24b4730cf2504 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -42,10 +42,10 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "platform/Logging.h"
#include "platform/Supplementable.h"
+#include "wtf/AutoReset.h"
#include "wtf/CurrentTime.h"
#include "wtf/Deque.h"
#include "wtf/HashSet.h"
-#include "wtf/TemporaryChange.h"
#include "wtf/text/CString.h"
namespace blink {
@@ -343,7 +343,7 @@ void FileReader::abort()
void FileReader::doAbort()
{
ASSERT(m_state != DONE);
- TemporaryChange<bool> firingEvents(m_stillFiringEvents, true);
+ AutoReset<bool> firingEvents(&m_stillFiringEvents, true);
terminate();
@@ -383,7 +383,7 @@ void FileReader::terminate()
void FileReader::didStartLoading()
{
- TemporaryChange<bool> firingEvents(m_stillFiringEvents, true);
+ AutoReset<bool> firingEvents(&m_stillFiringEvents, true);
fireEvent(EventTypeNames::loadstart);
}
@@ -394,7 +394,7 @@ void FileReader::didReceiveData()
if (!m_lastProgressNotificationTimeMS) {
m_lastProgressNotificationTimeMS = now;
} else if (now - m_lastProgressNotificationTimeMS > progressNotificationIntervalMS) {
- TemporaryChange<bool> firingEvents(m_stillFiringEvents, true);
+ AutoReset<bool> firingEvents(&m_stillFiringEvents, true);
fireEvent(EventTypeNames::progress);
m_lastProgressNotificationTimeMS = now;
}
@@ -411,7 +411,7 @@ void FileReader::didFinishLoading()
// use this separate variable to keep the wrapper of this FileReader alive.
// An alternative would be to keep any active DOM object alive that is on
// the stack.
- TemporaryChange<bool> firingEvents(m_stillFiringEvents, true);
+ AutoReset<bool> firingEvents(&m_stillFiringEvents, true);
// It's important that we change m_loadingState before firing any events
// since any of the events could call abort(), which internally checks
@@ -438,7 +438,7 @@ void FileReader::didFail(FileError::ErrorCode errorCode)
if (m_loadingState == LoadingStateAborted)
return;
- TemporaryChange<bool> firingEvents(m_stillFiringEvents, true);
+ AutoReset<bool> firingEvents(&m_stillFiringEvents, true);
ASSERT(m_loadingState == LoadingStateLoading);
m_loadingState = LoadingStateNone;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698