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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.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/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 1933d2435d47daccc4d08727bab91032a6df8935..832f73f5713e9abbf8b9749c400fdca055fd8399 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -96,7 +96,7 @@
#include "platform/weborigin/Suborigin.h"
#include "public/platform/WebCachePolicy.h"
#include "public/platform/WebURLRequest.h"
-#include "wtf/TemporaryChange.h"
+#include "wtf/AutoReset.h"
#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
#include <memory>
@@ -744,7 +744,7 @@ void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
detachDocumentLoader(m_provisionalDocumentLoader);
if (!m_frame->host())
return;
- TemporaryChange<FrameLoadType> loadTypeChange(m_loadType, frameLoadType);
+ AutoReset<FrameLoadType> loadTypeChange(&m_loadType, frameLoadType);
saveScrollState();
KURL oldURL = m_frame->document()->url();
@@ -1119,7 +1119,7 @@ bool FrameLoader::prepareForCommit()
// At this point, the provisional document loader should not detach, because
// then the FrameLoader would not have any attached DocumentLoaders.
if (m_documentLoader) {
- TemporaryChange<bool> inDetachDocumentLoader(m_protectProvisionalLoader, true);
+ AutoReset<bool> inDetachDocumentLoader(&m_protectProvisionalLoader, true);
detachDocumentLoader(m_documentLoader);
}
// 'abort' listeners can also detach the frame.
@@ -1549,8 +1549,8 @@ void FrameLoader::dispatchDidClearDocumentOfWindowObject()
if (m_dispatchingDidClearWindowObjectInMainWorld)
return;
- TemporaryChange<bool>
- inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, true);
+ AutoReset<bool>
+ inDidClearWindowObject(&m_dispatchingDidClearWindowObjectInMainWorld, true);
// We just cleared the document, not the entire window object, but for the
// embedder that's close enough.
client()->dispatchDidClearWindowObjectInMainWorld();
@@ -1563,8 +1563,8 @@ void FrameLoader::dispatchDidClearWindowObjectInMainWorld()
if (m_dispatchingDidClearWindowObjectInMainWorld)
return;
- TemporaryChange<bool>
- inDidClearWindowObject(m_dispatchingDidClearWindowObjectInMainWorld, true);
+ AutoReset<bool>
+ inDidClearWindowObject(&m_dispatchingDidClearWindowObjectInMainWorld, true);
client()->dispatchDidClearWindowObjectInMainWorld();
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698