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

Unified Diff: third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.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/dom/ContextLifecycleNotifier.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
index bd44cef0e1ffcd94280744e349e2061c102ed347..3cc38034b72d41cef463152338575f2e7040d6f4 100644
--- a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
+++ b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.cpp
@@ -28,13 +28,13 @@
#include "core/dom/ContextLifecycleNotifier.h"
#include "core/dom/ActiveDOMObject.h"
-#include "wtf/TemporaryChange.h"
+#include "wtf/AutoReset.h"
namespace blink {
void ContextLifecycleNotifier::notifyResumingActiveDOMObjects()
{
- TemporaryChange<IterationState> scope(m_iterationState, AllowingNone);
+ AutoReset<IterationState> scope(&m_iterationState, AllowingNone);
for (ContextLifecycleObserver* observer : m_observers) {
if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjectType)
continue;
@@ -49,7 +49,7 @@ void ContextLifecycleNotifier::notifyResumingActiveDOMObjects()
void ContextLifecycleNotifier::notifySuspendingActiveDOMObjects()
{
- TemporaryChange<IterationState> scope(m_iterationState, AllowingNone);
+ AutoReset<IterationState> scope(&m_iterationState, AllowingNone);
for (ContextLifecycleObserver* observer : m_observers) {
if (observer->observerType() != ContextLifecycleObserver::ActiveDOMObjectType)
continue;
@@ -65,7 +65,7 @@ void ContextLifecycleNotifier::notifySuspendingActiveDOMObjects()
void ContextLifecycleNotifier::notifyStoppingActiveDOMObjects()
{
// Observers may be removed, but handled after iteration has completed.
- TemporaryChange<IterationState> scope(m_iterationState, AllowPendingRemoval);
+ AutoReset<IterationState> scope(&m_iterationState, AllowPendingRemoval);
ObserverSet observers;
m_observers.swap(observers);
for (ContextLifecycleObserver* observer : observers) {
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.cpp ('k') | third_party/WebKit/Source/core/dom/DOMURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698