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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

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/StyleEngine.h
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.h b/third_party/WebKit/Source/core/dom/StyleEngine.h
index f3977aab71156ee3f17f16de3f295035f0e665ae..1ff4b284b27257a323a66bf6328ede12bf7c6467 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -39,8 +39,8 @@
#include "core/dom/StyleEngineContext.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
+#include "wtf/AutoReset.h"
#include "wtf/ListHashSet.h"
-#include "wtf/TemporaryChange.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
#include <memory>
@@ -60,13 +60,15 @@ class CORE_EXPORT StyleEngine final : public GarbageCollectedFinalized<StyleEngi
USING_GARBAGE_COLLECTED_MIXIN(StyleEngine);
public:
- class IgnoringPendingStylesheet : public TemporaryChange<bool> {
+ class IgnoringPendingStylesheet {
DISALLOW_NEW();
public:
IgnoringPendingStylesheet(StyleEngine& engine)
- : TemporaryChange<bool>(engine.m_ignorePendingStylesheets, true)
+ : m_scope(&engine.m_ignorePendingStylesheets, true)
{
}
+ private:
+ AutoReset<bool> m_scope;
};
friend class IgnoringPendingStylesheet;

Powered by Google App Engine
This is Rietveld 408576698