<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208841] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208841">208841</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2016-11-17 00:48:34 -0800 (Thu, 17 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[JSC] WTF::TemporaryChange with WTF::SetForScope
https://bugs.webkit.org/show_bug.cgi?id=164761
Reviewed by Saam Barati.
Source/JavaScriptCore:
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/SetForScope.h: Removed.
* debugger/Debugger.cpp:
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::dispatch):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):
* parser/Parser.cpp:
Source/WebCore:
No behavior change.
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::JSCustomElementRegistry::define):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateModule):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
* css/StyleResolver.cpp:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):
* css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* dom/CustomElementRegistry.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::destroyRenderTree):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/Microtasks.cpp:
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
* history/PageCache.cpp:
(WebCore::PageCache::pruneToSizeNow):
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):
* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::scan):
* html/parser/HTMLConstructionSite.h:
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::handleProvisionalLoadFailure):
* loader/SubresourceLoader.cpp:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResourcesToSize):
* page/Chrome.cpp:
(WebCore::Chrome::runModal):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::applyRecursivelyWithVisibleRect):
(WebCore::FrameView::autoSizeIfEnabled):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didReceiveHeaders):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
* platform/graphics/opengl/TemporaryOpenGLSetting.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawTexture):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
* platform/graphics/win/GraphicsLayerDirect2D.cpp:
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::writeClipboardContents):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::paint):
* rendering/RenderBlock.cpp:
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::pushMappingsToAncestor):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::dispatchInput):
* storage/StorageMap.cpp:
(WebCore::StorageMap::setItemIgnoringQuota):
* svg/SVGPathBlender.cpp:
(WebCore::SVGPathBlender::addAnimatedPath):
Source/WebKit:
* WebCoreSupport/WebResourceLoadScheduler.cpp:
Source/WebKit/mac:
* WebView/WebView.mm:
(-[WebView updateTextTouchBar]):
Source/WebKit2:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::initialize):
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(createEncodedObject):
(decodeObject):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateTextTouchBar):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
* UIProcess/gtk/WebPasteboardProxyGtk.cpp:
(WebKit::WebPasteboardProxy::writeToClipboard):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::purgeBackingStores):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::insertTextAsync):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
Source/WTF:
JavaScriptCore's bytecompiler/SetForScope.h is completely the same
to WTF::TemporaryChange. SetForScope sounds better name since it
says that this object works as Scope.
We rename WTF::TemporaryChange to WTF::SetForScope. And replace
all the use to this WTF::SetForScope.
* WTF.xcodeproj/project.pbxproj:
* wtf/SetForScope.h: Renamed from Source/WTF/wtf/TemporaryChange.h.
(WTF::SetForScope::SetForScope):
(WTF::SetForScope::~SetForScope):
Tools:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/SetForScope.cpp: Renamed from Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp.
(TestWebKitAPI::TEST):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInspectorBackendDispatchercpp">trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCustomElementRegistryCustomcpp">trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorecssElementRuleCollectorcpp">trunk/Source/WebCore/css/ElementRuleCollector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserSVGCSSParsercpp">trunk/Source/WebCore/css/parser/SVGCSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCustomElementRegistryh">trunk/Source/WebCore/dom/CustomElementRegistry.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetcpp">trunk/Source/WebCore/dom/EventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMicrotaskscpp">trunk/Source/WebCore/dom/Microtasks.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryPageCachecpp">trunk/Source/WebCore/history/PageCache.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlDOMTokenListcpp">trunk/Source/WebCore/html/DOMTokenList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserCSSPreloadScannercpp">trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLConstructionSiteh">trunk/Source/WebCore/html/parser/HTMLConstructionSite.h</a></li>
<li><a href="#trunkSourceWebCoreloaderContentFiltercpp">trunk/Source/WebCore/loader/ContentFilter.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCachecpp">trunk/Source/WebCore/loader/cache/MemoryCache.cpp</a></li>
<li><a href="#trunkSourceWebCorepageChromecpp">trunk/Source/WebCore/page/Chrome.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagecspContentSecurityPolicycpp">trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsopenglTemporaryOpenGLSettingh">trunk/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperGLcpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsLayerDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GraphicsLayerDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkPasteboardHelpercpp">trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollbarThemeMacmm">trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGeometryMapcpp">trunk/Source/WebCore/rendering/RenderGeometryMap.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayEventLoopInputDispatchercpp">trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageMapcpp">trunk/Source/WebCore/storage/StorageMap.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathBlendercpp">trunk/Source/WebCore/svg/SVGPathBlender.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulercpp">trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessPluginControllerProxycpp">trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessWebProcessConnectioncpp">trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAPICocoaWKRemoteObjectCodermm">trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingiosScrollingTreeOverflowScrollingNodeIOSmm">trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebPasteboardProxyGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCompositingCoordinatorcpp">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPICMakeListstxt">trunk/Tools/TestWebKitAPI/CMakeLists.txt</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfSetForScopeh">trunk/Source/WTF/wtf/SetForScope.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFSetForScopecpp">trunk/Tools/TestWebKitAPI/Tests/WTF/SetForScope.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecompilerSetForScopeh">trunk/Source/JavaScriptCore/bytecompiler/SetForScope.h</a></li>
<li><a href="#trunkSourceWTFwtfTemporaryChangeh">trunk/Source/WTF/wtf/TemporaryChange.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFTemporaryChangecpp">trunk/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ * bytecompiler/BytecodeGenerator.h:
+ * bytecompiler/SetForScope.h: Removed.
+ * debugger/Debugger.cpp:
+ * inspector/InspectorBackendDispatcher.cpp:
+ (Inspector::BackendDispatcher::dispatch):
+ * inspector/ScriptDebugServer.cpp:
+ (Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
+ (Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
+ (Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
+ (Inspector::ScriptDebugServer::sourceParsed):
+ (Inspector::ScriptDebugServer::dispatchFunctionToListeners):
+ * parser/Parser.cpp:
+
</ins><span class="cx"> 2016-11-16 Mark Lam <mark.lam@apple.com>
</span><span class="cx">
</span><span class="cx"> ExceptionFuzz needs to placate exception check verification before overwriting a thrown exception.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include "Nodes.h"
</span><span class="cx"> #include "ParserError.h"
</span><span class="cx"> #include "RegisterID.h"
</span><del>-#include "SetForScope.h"
</del><span class="cx"> #include "StaticPropertyAnalyzer.h"
</span><span class="cx"> #include "SymbolTable.h"
</span><span class="cx"> #include "TemplateRegistryKey.h"
</span><span class="lines">@@ -48,6 +47,7 @@
</span><span class="cx"> #include <wtf/HashTraits.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/SegmentedVector.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerSetForScopeh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/bytecompiler/SetForScope.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/SetForScope.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/bytecompiler/SetForScope.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/StdLibExtras.h>
-
-namespace JSC {
-
-template<typename T>
-class SetForScope {
-public:
- SetForScope(T& currentValue, const T& newValue)
- : m_ref(currentValue)
- , m_oldValue(currentValue)
- {
- m_ref = newValue;
- }
-
- SetForScope(T& currentValue, T&& newValue)
- : m_ref(currentValue)
- , m_oldValue(currentValue)
- {
- currentValue = WTFMove(newValue);
- }
-
- ~SetForScope()
- {
- m_ref = m_oldValue;
- }
-
-private:
- T& m_ref;
- T m_oldValue;
-};
-
-}; // namespace JSC
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> Debugger& m_debugger;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-// This is very similar to TemporaryChange<bool>, but that cannot be used
</del><ins>+// This is very similar to SetForScope<bool>, but that cannot be used
</ins><span class="cx"> // as the m_isPaused field uses only one bit.
</span><span class="cx"> class TemporaryPausedState {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInspectorBackendDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "InspectorFrontendRouter.h"
</span><span class="cx"> #include "InspectorValues.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> {
</span><span class="cx"> // In case this is a re-entrant call from a nested run loop, we don't want to lose
</span><span class="cx"> // the outer request's id just because the inner request is bogus.
</span><del>- TemporaryChange<Optional<long>> scopedRequestId(m_currentRequestId, Nullopt);
</del><ins>+ SetForScope<Optional<long>> scopedRequestId(m_currentRequestId, Nullopt);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorValue> parsedMessage;
</span><span class="cx"> if (!InspectorValue::parseJSON(message, parsedMessage)) {
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">
</span><span class="cx"> {
</span><span class="cx"> // We could be called re-entrantly from a nested run loop, so restore the previous id.
</span><del>- TemporaryChange<Optional<long>> scopedRequestId(m_currentRequestId, requestId);
</del><ins>+ SetForScope<Optional<long>> scopedRequestId(m_currentRequestId, requestId);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorValue> methodValue;
</span><span class="cx"> if (!messageObject->getValue(ASCIILiteral("method"), methodValue)) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> #include "ScriptValue.h"
</span><span class="cx"> #include "SourceProvider.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> if (m_listeners.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_callingListeners, true);
</del><ins>+ SetForScope<bool> change(m_callingListeners, true);
</ins><span class="cx">
</span><span class="cx"> Vector<ScriptDebugListener*> listenersCopy;
</span><span class="cx"> copyToVector(m_listeners, listenersCopy);
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> if (m_listeners.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_callingListeners, true);
</del><ins>+ SetForScope<bool> change(m_callingListeners, true);
</ins><span class="cx">
</span><span class="cx"> Vector<ScriptDebugListener*> listenersCopy;
</span><span class="cx"> copyToVector(m_listeners, listenersCopy);
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx"> if (m_listeners.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_callingListeners, true);
</del><ins>+ SetForScope<bool> change(m_callingListeners, true);
</ins><span class="cx">
</span><span class="cx"> unsigned sampleId = m_nextProbeSampleId++;
</span><span class="cx">
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> if (m_listeners.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_callingListeners, true);
</del><ins>+ SetForScope<bool> change(m_callingListeners, true);
</ins><span class="cx">
</span><span class="cx"> bool isError = errorLine != -1;
</span><span class="cx"> if (isError)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> if (m_listeners.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_callingListeners, true);
</del><ins>+ SetForScope<bool> change(m_callingListeners, true);
</ins><span class="cx">
</span><span class="cx"> dispatchFunctionToListeners(m_listeners, callback);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> #include "ASTBuilder.h"
</span><span class="cx"> #include "DebuggerParseData.h"
</span><span class="cx"> #include "JSCInlines.h"
</span><del>-#include "SetForScope.h"
</del><span class="cx"> #include "VM.h"
</span><span class="cx"> #include <utility>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StringPrintStream.h>
</span><span class="cx">
</span><span class="cx"> #define updateErrorMessage(shouldPrintToken, ...) do {\
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WTF/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ JavaScriptCore's bytecompiler/SetForScope.h is completely the same
+ to WTF::TemporaryChange. SetForScope sounds better name since it
+ says that this object works as Scope.
+
+ We rename WTF::TemporaryChange to WTF::SetForScope. And replace
+ all the use to this WTF::SetForScope.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/SetForScope.h: Renamed from Source/WTF/wtf/TemporaryChange.h.
+ (WTF::SetForScope::SetForScope):
+ (WTF::SetForScope::~SetForScope):
+
</ins><span class="cx"> 2016-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">                 A8A4742A151A825B004123FF /* StdLibExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47311151A825B004123FF /* StdLibExtras.h */; };
</span><span class="cx">                 A8A4742C151A825B004123FF /* StringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47313151A825B004123FF /* StringExtras.h */; };
</span><span class="cx">                 A8A4742D151A825B004123FF /* Hasher.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47314151A825B004123FF /* Hasher.h */; };
</span><del>-                A8A47433151A825B004123FF /* TemporaryChange.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4731A151A825B004123FF /* TemporaryChange.h */; };
</del><ins>+                A8A47433151A825B004123FF /* SetForScope.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4731A151A825B004123FF /* SetForScope.h */; };
</ins><span class="cx">                 A8A47434151A825B004123FF /* ASCIIFastPath.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4731C151A825B004123FF /* ASCIIFastPath.h */; };
</span><span class="cx">                 A8A47435151A825B004123FF /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A4731D151A825B004123FF /* AtomicString.cpp */; };
</span><span class="cx">                 A8A47436151A825B004123FF /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4731E151A825B004123FF /* AtomicString.h */; };
</span><span class="lines">@@ -653,7 +653,7 @@
</span><span class="cx">                 A8A47311151A825B004123FF /* StdLibExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdLibExtras.h; sourceTree = "<group>"; };
</span><span class="cx">                 A8A47313151A825B004123FF /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = "<group>"; };
</span><span class="cx">                 A8A47314151A825B004123FF /* Hasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Hasher.h; sourceTree = "<group>"; };
</span><del>-                A8A4731A151A825B004123FF /* TemporaryChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryChange.h; sourceTree = "<group>"; };
</del><ins>+                A8A4731A151A825B004123FF /* SetForScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetForScope.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A8A4731C151A825B004123FF /* ASCIIFastPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCIIFastPath.h; sourceTree = "<group>"; };
</span><span class="cx">                 A8A4731D151A825B004123FF /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicString.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A8A4731E151A825B004123FF /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicString.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -1065,7 +1065,7 @@
</span><span class="cx">                                 0FDDBFA61666DFA300C55FEF /* StringPrintStream.h */,
</span><span class="cx">                                 5597F82C1D94B9970066BC21 /* SynchronizedFixedQueue.h */,
</span><span class="cx">                                 0FB317C31C488001007E395A /* SystemTracing.h */,
</span><del>-                                A8A4731A151A825B004123FF /* TemporaryChange.h */,
</del><ins>+                                A8A4731A151A825B004123FF /* SetForScope.h */,
</ins><span class="cx">                                 A8A4732F151A825B004123FF /* ThreadFunctionInvocation.h */,
</span><span class="cx">                                 A8A47330151A825B004123FF /* ThreadIdentifierDataPthreads.cpp */,
</span><span class="cx">                                 A8A47331151A825B004123FF /* ThreadIdentifierDataPthreads.h */,
</span><span class="lines">@@ -1474,7 +1474,7 @@
</span><span class="cx">                                 70ECA60E1B02426800449739 /* SymbolImpl.h in Headers */,
</span><span class="cx">                                 70A993FF1AD7151300FA615B /* SymbolRegistry.h in Headers */,
</span><span class="cx">                                 0FB317C41C488001007E395A /* SystemTracing.h in Headers */,
</span><del>-                                A8A47433151A825B004123FF /* TemporaryChange.h in Headers */,
</del><ins>+                                A8A47433151A825B004123FF /* SetForScope.h in Headers */,
</ins><span class="cx">                                 1C181C801D3078DA00F5FA16 /* TextBreakIterator.h in Headers */,
</span><span class="cx">                                 A8A47444151A825B004123FF /* TextPosition.h in Headers */,
</span><span class="cx">                                 A8A47447151A825B004123FF /* ThreadFunctionInvocation.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfSetForScopehfromrev208840trunkSourceWTFwtfTemporaryChangeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WTF/wtf/SetForScope.h (from rev 208840, trunk/Source/WTF/wtf/TemporaryChange.h) (0 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/SetForScope.h         (rev 0)
+++ trunk/Source/WTF/wtf/SetForScope.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/Noncopyable.h>
+#include <wtf/StdLibExtras.h>
+
+namespace WTF {
+
+// SetForScope<> is useful for setting a variable to a new value only within a
+// particular scope. An SetForScope<> object changes a variable to its original
+// value upon destruction, making it an alternative to writing "var = false;"
+// or "var = oldVal;" at all of a block's exit points.
+//
+// This should be obvious, but note that an SetForScope<> instance should have a
+// shorter lifetime than its scopedVariable, to prevent invalid memory writes
+// when the SetForScope<> object is destroyed.
+
+template<typename T>
+class SetForScope {
+ WTF_MAKE_NONCOPYABLE(SetForScope);
+public:
+ SetForScope(T& scopedVariable)
+ : m_scopedVariable(scopedVariable)
+ , m_originalValue(scopedVariable)
+ {
+ }
+ template<typename U>
+ SetForScope(T& scopedVariable, U&& newValue)
+ : SetForScope(scopedVariable)
+ {
+ m_scopedVariable = std::forward<U>(newValue);
+ }
+
+ ~SetForScope()
+ {
+ m_scopedVariable = WTFMove(m_originalValue);
+ }
+
+private:
+ T& m_scopedVariable;
+ T m_originalValue;
+};
+
+}
+
+using WTF::SetForScope;
</ins></span></pre></div>
<a id="trunkSourceWTFwtfTemporaryChangeh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WTF/wtf/TemporaryChange.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/TemporaryChange.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WTF/wtf/TemporaryChange.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TemporaryChange_h
-#define TemporaryChange_h
-
-#include <wtf/Noncopyable.h>
-
-namespace WTF {
-
-// TemporaryChange<> is useful for setting a variable to a new value only within a
-// particular scope. An TemporaryChange<> object changes a variable to its original
-// value upon destruction, making it an alternative to writing "var = false;"
-// or "var = oldVal;" at all of a block's exit points.
-//
-// This should be obvious, but note that an TemporaryChange<> instance should have a
-// shorter lifetime than its scopedVariable, to prevent invalid memory writes
-// when the TemporaryChange<> object is destroyed.
-
-template<typename T>
-class TemporaryChange {
- WTF_MAKE_NONCOPYABLE(TemporaryChange);
-public:
- TemporaryChange(T& scopedVariable)
- : m_scopedVariable(scopedVariable)
- , m_originalValue(scopedVariable)
- {
- }
- TemporaryChange(T& scopedVariable, T newValue)
- : TemporaryChange(scopedVariable)
- {
- m_scopedVariable = newValue;
- }
-
- ~TemporaryChange()
- {
- m_scopedVariable = m_originalValue;
- }
-
-private:
- T& m_scopedVariable;
- T m_originalValue;
-};
-
-}
-
-using WTF::TemporaryChange;
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,90 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ No behavior change.
+
+ * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
+ (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
+ * bindings/js/JSCustomElementRegistryCustom.cpp:
+ (WebCore::JSCustomElementRegistry::define):
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateModule):
+ * css/ElementRuleCollector.cpp:
+ (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
+ * css/StyleResolver.cpp:
+ * css/parser/CSSParser.cpp:
+ (WebCore::CSSParser::parseFillShorthand):
+ (WebCore::CSSParser::parseShorthand):
+ (WebCore::CSSParser::parse4Values):
+ (WebCore::CSSParser::parseBorderRadius):
+ * css/parser/SVGCSSParser.cpp:
+ (WebCore::CSSParser::parseSVGValue):
+ * dom/CustomElementRegistry.h:
+ * dom/Document.cpp:
+ (WebCore::Document::recalcStyle):
+ (WebCore::Document::styleForElementIgnoringPendingStylesheets):
+ (WebCore::Document::destroyRenderTree):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * dom/Microtasks.cpp:
+ (WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
+ * history/PageCache.cpp:
+ (WebCore::PageCache::pruneToSizeNow):
+ * html/DOMTokenList.cpp:
+ (WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):
+ * html/parser/CSSPreloadScanner.cpp:
+ (WebCore::CSSPreloadScanner::scan):
+ * html/parser/HTMLConstructionSite.h:
+ * loader/ContentFilter.cpp:
+ (WebCore::ContentFilter::handleProvisionalLoadFailure):
+ * loader/SubresourceLoader.cpp:
+ * loader/cache/MemoryCache.cpp:
+ (WebCore::MemoryCache::pruneLiveResourcesToSize):
+ (WebCore::MemoryCache::pruneDeadResourcesToSize):
+ * page/Chrome.cpp:
+ (WebCore::Chrome::runModal):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::setScrollPosition):
+ (WebCore::FrameView::applyRecursivelyWithVisibleRect):
+ (WebCore::FrameView::autoSizeIfEnabled):
+ * page/csp/ContentSecurityPolicy.cpp:
+ (WebCore::ContentSecurityPolicy::didReceiveHeaders):
+ * page/scrolling/ScrollingTree.cpp:
+ (WebCore::ScrollingTree::commitTreeState):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+ (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
+ * platform/graphics/opengl/TemporaryOpenGLSetting.h:
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::drawTexture):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
+ * platform/graphics/win/GraphicsLayerDirect2D.cpp:
+ * platform/gtk/PasteboardHelper.cpp:
+ (WebCore::PasteboardHelper::writeClipboardContents):
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::ScrollbarThemeMac::paint):
+ * rendering/RenderBlock.cpp:
+ * rendering/RenderGeometryMap.cpp:
+ (WebCore::RenderGeometryMap::pushMappingsToAncestor):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPositions):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::hitTest):
+ * replay/EventLoopInputDispatcher.cpp:
+ (WebCore::EventLoopInputDispatcher::dispatchInput):
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::setItemIgnoringQuota):
+ * svg/SVGPathBlender.cpp:
+ (WebCore::SVGPathBlender::addAnimatedPath):
+
</ins><span class="cx"> 2016-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [WebCore] Clean up script loading code in XML
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryBackingStoreTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "MemoryIDBBackingStore.h"
</span><span class="cx"> #include "MemoryObjectStore.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "MemoryBackingStoreTransaction::abort()");
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_isAborting, true);
</del><ins>+ SetForScope<bool> change(m_isAborting, true);
</ins><span class="cx">
</span><span class="cx"> for (auto iterator : m_originalIndexNames)
</span><span class="cx"> iterator.key->rename(iterator.value);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomElementRegistryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> throwNotSupportedError(state, scope, ASCIILiteral("Cannot define a custom element while defining another custom element"));
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span><del>- TemporaryChange<bool> change(registry.elementDefinitionIsRunning(), true);
</del><ins>+ SetForScope<bool> change(registry.elementDefinitionIsRunning(), true);
</ins><span class="cx">
</span><span class="cx"> if (registry.findInterface(localName)) {
</span><span class="cx"> throwNotSupportedError(state, scope, ASCIILiteral("Cannot define multiple custom elements with the same tag name"));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> #include <runtime/JSLock.h>
</span><span class="cx"> #include <runtime/JSModuleRecord.h>
</span><span class="cx"> #include <runtime/JSNativeStdFunction.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx"> #include <wtf/text/TextPosition.h>
</span><span class="cx">
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx">
</span><span class="cx"> auto& shell = *windowShell(world);
</span><span class="cx"> auto& state = *shell.window()->globalExec();
</span><del>- TemporaryChange<const String*> sourceURLScope(m_sourceURL, &sourceURL.string());
</del><ins>+ SetForScope<const String*> sourceURLScope(m_sourceURL, &sourceURL.string());
</ins><span class="cx">
</span><span class="cx"> Ref<Frame> protector(m_frame);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssElementRuleCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/ElementRuleCollector.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> #include "StyleProperties.h"
</span><span class="cx"> #include "StyleScope.h"
</span><span class="cx"> #include "StyledElement.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx"> if (!slottedPseudoElementRules)
</span><span class="cx"> continue;
</span><span class="cx"> // Match in the current scope.
</span><del>- TemporaryChange<bool> change(m_isMatchingSlottedPseudoElements, true);
</del><ins>+ SetForScope<bool> change(m_isMatchingSlottedPseudoElements, true);
</ins><span class="cx">
</span><span class="cx"> MatchRequest scopeMatchRequest(nullptr, matchRequest.includeEmptyRules, matchRequest.treeContextOrdinal);
</span><span class="cx"> collectMatchingRulesForList(slottedPseudoElementRules.get(), scopeMatchRequest, ruleRange);
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -138,8 +138,8 @@
</span><span class="cx"> #include "WebKitFontFamilyNames.h"
</span><span class="cx"> #include "XMLNames.h"
</span><span class="cx"> #include <bitset>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/AtomicStringHash.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx"> #include <limits.h>
</span><span class="cx"> #include <wtf/HexNumber.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/dtoa.h>
</span><span class="cx"> #include <wtf/text/StringBuffer.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="lines">@@ -3416,7 +3416,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ShorthandScope scope(this, propId);
</span><del>- TemporaryChange<bool> change(m_implicitShorthand);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand);
</ins><span class="cx">
</span><span class="cx"> bool parsedProperty[cMaxFillProperties] = { false };
</span><span class="cx"> RefPtr<CSSValue> values[cMaxFillProperties];
</span><span class="lines">@@ -3812,7 +3812,7 @@
</span><span class="cx">
</span><span class="cx"> // Fill in any remaining properties with the initial value.
</span><span class="cx"> auto& cssValuePool = CSSValuePool::singleton();
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> const StylePropertyShorthand* propertiesForInitialization = shorthand.propertiesForInitialization();
</span><span class="cx"> for (unsigned i = 0; i < shorthand.length(); ++i) {
</span><span class="cx"> if (propertyFound[i])
</span><span class="lines">@@ -3849,7 +3849,7 @@
</span><span class="cx"> if (!parseValue(properties[0], important))
</span><span class="cx"> return false;
</span><span class="cx"> CSSValue* value = m_parsedProperties.last().value();
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> addProperty(properties[1], value, important);
</span><span class="cx"> addProperty(properties[2], value, important);
</span><span class="cx"> addProperty(properties[3], value, important);
</span><span class="lines">@@ -3859,7 +3859,7 @@
</span><span class="cx"> if (!parseValue(properties[0], important) || !parseValue(properties[1], important))
</span><span class="cx"> return false;
</span><span class="cx"> CSSValue* value = m_parsedProperties[m_parsedProperties.size() - 2].value();
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> addProperty(properties[2], value, important);
</span><span class="cx"> value = m_parsedProperties[m_parsedProperties.size() - 2].value();
</span><span class="cx"> addProperty(properties[3], value, important);
</span><span class="lines">@@ -3869,7 +3869,7 @@
</span><span class="cx"> if (!parseValue(properties[0], important) || !parseValue(properties[1], important) || !parseValue(properties[2], important))
</span><span class="cx"> return false;
</span><span class="cx"> CSSValue* value = m_parsedProperties[m_parsedProperties.size() - 2].value();
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> addProperty(properties[3], value, important);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -8624,7 +8624,7 @@
</span><span class="cx"> } else
</span><span class="cx"> completeBorderRadii(radii[1]);
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> addProperty(CSSPropertyBorderTopLeftRadius, createPrimitiveValuePair(WTFMove(radii[0][0]), WTFMove(radii[1][0])), important);
</span><span class="cx"> addProperty(CSSPropertyBorderTopRightRadius, createPrimitiveValuePair(WTFMove(radii[0][1]), WTFMove(radii[1][1])), important);
</span><span class="cx"> addProperty(CSSPropertyBorderBottomRightRadius, createPrimitiveValuePair(WTFMove(radii[0][2]), WTFMove(radii[1][2])), important);
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/SVGCSSParser.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/SVGCSSParser.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/css/parser/SVGCSSParser.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "SVGPaint.h"
</span><span class="cx">
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx"> case CSSPropertyMarker:
</span><span class="cx"> {
</span><span class="cx"> ShorthandScope scope(this, propId);
</span><del>- TemporaryChange<bool> change(m_implicitShorthand, true);
</del><ins>+ SetForScope<bool> change(m_implicitShorthand, true);
</ins><span class="cx"> if (!parseValue(CSSPropertyMarkerStart, important))
</span><span class="cx"> return false;
</span><span class="cx"> if (m_valueList->current()) {
</span></span></pre></div>
<a id="trunkSourceWebCoredomCustomElementRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CustomElementRegistry.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CustomElementRegistry.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/dom/CustomElementRegistry.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #include "JSDOMPromise.h"
</span><span class="cx"> #include "QualifiedName.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx"> #include <wtf/text/AtomicStringHash.h>
</span><span class="cx">
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">
</span><span class="cx"> bool m_elementDefinitionIsRunning { false };
</span><span class="cx">
</span><del>- friend class ElementDefinitionIsRunningTemporaryChange;
</del><ins>+ friend class ElementDefinitionIsRunningSetForScope;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -192,8 +192,8 @@
</span><span class="cx"> #include <inspector/ScriptCallStack.h>
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/SystemTracing.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/text/StringBuffer.h>
</span><span class="cx"> #include <yarr/RegularExpression.h>
</span><span class="cx">
</span><span class="lines">@@ -1840,7 +1840,7 @@
</span><span class="cx"> m_inStyleRecalc = false;
</span><span class="cx">
</span><span class="cx"> if (styleUpdate) {
</span><del>- TemporaryChange<bool> inRenderTreeUpdate(m_inRenderTreeUpdate, true);
</del><ins>+ SetForScope<bool> inRenderTreeUpdate(m_inRenderTreeUpdate, true);
</ins><span class="cx">
</span><span class="cx"> RenderTreeUpdater updater(*this);
</span><span class="cx"> updater.commit(WTFMove(styleUpdate));
</span><span class="lines">@@ -1969,7 +1969,7 @@
</span><span class="cx"> // On iOS request delegates called during styleForElement may result in re-entering WebKit and killing the style resolver.
</span><span class="cx"> Style::PostResolutionCallbackDisabler disabler(*this);
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_ignorePendingStylesheets, true);
</del><ins>+ SetForScope<bool> change(m_ignorePendingStylesheets, true);
</ins><span class="cx"> auto elementStyle = element.resolveStyle(parentStyle);
</span><span class="cx">
</span><span class="cx"> if (elementStyle.relations) {
</span><span class="lines">@@ -2218,7 +2218,7 @@
</span><span class="cx"> ASSERT(hasLivingRenderTree());
</span><span class="cx"> ASSERT(m_pageCacheState != InPageCache);
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_renderTreeBeingDestroyed, true);
</del><ins>+ SetForScope<bool> change(m_renderTreeBeingDestroyed, true);
</ins><span class="cx">
</span><span class="cx"> if (this == &topDocument())
</span><span class="cx"> clearAXObjectCache();
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/dom/EventTarget.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -42,8 +42,8 @@
</span><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/Ref.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> using namespace WTF;
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> if (!data)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- TemporaryChange<bool> firingEventListenersScope(data->isFiringEventListeners, true);
</del><ins>+ SetForScope<bool> firingEventListenersScope(data->isFiringEventListeners, true);
</ins><span class="cx">
</span><span class="cx"> if (auto* listenersVector = data->eventListenerMap.find(event.type())) {
</span><span class="cx"> fireEventListeners(event, *listenersVector);
</span></span></pre></div>
<a id="trunkSourceWebCoredomMicrotaskscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Microtasks.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Microtasks.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/dom/Microtasks.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> #include "Microtasks.h"
</span><span class="cx">
</span><span class="cx"> #include <wtf/MainThread.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> if (m_performingMicrotaskCheckpoint)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> change(m_performingMicrotaskCheckpoint, true);
</del><ins>+ SetForScope<bool> change(m_performingMicrotaskCheckpoint, true);
</ins><span class="cx">
</span><span class="cx"> Vector<std::unique_ptr<Microtask>> queue = WTFMove(m_microtaskQueue);
</span><span class="cx"> for (auto& task : queue) {
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryPageCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/PageCache.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/PageCache.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/history/PageCache.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> #include "SubframeLoader.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/StringConcatenate.h>
</span><span class="cx">
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">
</span><span class="cx"> void PageCache::pruneToSizeNow(unsigned size, PruningReason pruningReason)
</span><span class="cx"> {
</span><del>- TemporaryChange<unsigned> change(m_maxSize, size);
</del><ins>+ SetForScope<unsigned> change(m_maxSize, size);
</ins><span class="cx"> prune(pruningReason);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlDOMTokenListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/DOMTokenList.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/DOMTokenList.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/html/DOMTokenList.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><span class="cx"> #include "SpaceSplitString.h"
</span><span class="cx"> #include <wtf/HashSet.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/AtomicStringHash.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx">
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> }
</span><span class="cx"> AtomicString serializedValue = builder.toAtomicString();
</span><span class="cx">
</span><del>- TemporaryChange<bool> inAttributeUpdate(m_inUpdateAssociatedAttributeFromTokens, true);
</del><ins>+ SetForScope<bool> inAttributeUpdate(m_inUpdateAssociatedAttributeFromTokens, true);
</ins><span class="cx"> m_element.setAttribute(m_attributeName, serializedValue);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserCSSPreloadScannercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "CSSPreloadScanner.h"
</span><span class="cx">
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> void CSSPreloadScanner::scan(const HTMLToken::DataVector& data, PreloadRequestStream& requests)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!m_requests);
</span><del>- TemporaryChange<PreloadRequestStream*> change(m_requests, &requests);
</del><ins>+ SetForScope<PreloadRequestStream*> change(m_requests, &requests);
</ins><span class="cx">
</span><span class="cx"> for (UChar c : data) {
</span><span class="cx"> if (m_state == DoneParsingImportRules)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLConstructionSiteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "HTMLFormattingElementList.h"
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx"> { }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- TemporaryChange<bool> m_redirectAttachToFosterParentChange;
</del><ins>+ SetForScope<bool> m_redirectAttachToFosterParentChange;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> static bool isFormattingTag(const AtomicString&);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderContentFiltercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ContentFilter.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ContentFilter.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/loader/ContentFilter.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> #include "SharedBuffer.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/Ref.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx"> RefPtr<SharedBuffer> replacementData { m_blockingContentFilter->replacementData() };
</span><span class="cx"> ResourceResponse response { URL(), ASCIILiteral("text/html"), replacementData->size(), ASCIILiteral("UTF-8") };
</span><span class="cx"> SubstituteData substituteData { WTFMove(replacementData), error.failingURL(), response, SubstituteData::SessionHistoryVisibility::Hidden };
</span><del>- TemporaryChange<bool> loadingBlockedPage { m_isLoadingBlockedPage, true };
</del><ins>+ SetForScope<bool> loadingBlockedPage { m_isLoadingBlockedPage, true };
</ins><span class="cx"> m_documentLoader.frameLoader()->load(FrameLoadRequest(m_documentLoader.frame(), blockedPageURL(), ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/RefCountedLeakCounter.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -314,7 +314,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_inPruneResources)
</span><span class="cx"> return;
</span><del>- TemporaryChange<bool> reentrancyProtector(m_inPruneResources, true);
</del><ins>+ SetForScope<bool> reentrancyProtector(m_inPruneResources, true);
</ins><span class="cx">
</span><span class="cx"> double currentTime = FrameView::currentPaintTimeStamp();
</span><span class="cx"> if (!currentTime) // In case prune is called directly, outside of a Frame paint.
</span><span class="lines">@@ -371,7 +371,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_inPruneResources)
</span><span class="cx"> return;
</span><del>- TemporaryChange<bool> reentrancyProtector(m_inPruneResources, true);
</del><ins>+ SetForScope<bool> reentrancyProtector(m_inPruneResources, true);
</ins><span class="cx">
</span><span class="cx"> if (targetSize && m_deadSize <= targetSize)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Chrome.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Chrome.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/page/Chrome.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> #include <runtime/VM.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">
</span><span class="cx"> // JavaScript that runs within the nested event loop must not be run in the context of the
</span><span class="cx"> // script that called showModalDialog. Null out entryScope to break the connection.
</span><del>- TemporaryChange<JSC::VMEntryScope*> entryScopeNullifier { m_page.mainFrame().document()->vm().entryScope, nullptr };
</del><ins>+ SetForScope<JSC::VMEntryScope*> entryScopeNullifier { m_page.mainFrame().document()->vm().entryScope, nullptr };
</ins><span class="cx">
</span><span class="cx"> TimerBase::fireTimersInNestedEventLoop();
</span><span class="cx"> m_client.runModal();
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -99,8 +99,8 @@
</span><span class="cx">
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/Ref.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/SystemTracing.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx">
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include "TiledBackingStore.h"
</span><span class="lines">@@ -1288,10 +1288,10 @@
</span><span class="cx">
</span><span class="cx"> // Many of the tasks performed during layout can cause this function to be re-entered,
</span><span class="cx"> // so save the layout phase now and restore it on exit.
</span><del>- TemporaryChange<LayoutPhase> layoutPhaseRestorer(m_layoutPhase, InPreLayout);
</del><ins>+ SetForScope<LayoutPhase> layoutPhaseRestorer(m_layoutPhase, InPreLayout);
</ins><span class="cx">
</span><span class="cx"> // Every scroll that happens during layout is programmatic.
</span><del>- TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</del><ins>+ SetForScope<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</ins><span class="cx">
</span><span class="cx"> bool inChildFrameLayoutWithFrameFlattening = isInChildFrameWithFrameFlattening();
</span><span class="cx">
</span><span class="lines">@@ -1331,12 +1331,12 @@
</span><span class="cx"> ASSERT(document.pageCacheState() == Document::NotInPageCache);
</span><span class="cx">
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</del><ins>+ SetForScope<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</ins><span class="cx">
</span><span class="cx"> if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTasksTimer.isActive() && !inChildFrameLayoutWithFrameFlattening) {
</span><span class="cx"> // This is a new top-level layout. If there are any remaining tasks from the previous
</span><span class="cx"> // layout, finish them now.
</span><del>- TemporaryChange<bool> inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</del><ins>+ SetForScope<bool> inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</ins><span class="cx"> performPostLayoutTasks();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1378,7 +1378,7 @@
</span><span class="cx"> ++m_nestedLayoutCount;
</span><span class="cx">
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</del><ins>+ SetForScope<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</ins><span class="cx">
</span><span class="cx"> autoSizeIfEnabled();
</span><span class="cx">
</span><span class="lines">@@ -1550,7 +1550,7 @@
</span><span class="cx"> if (inChildFrameLayoutWithFrameFlattening)
</span><span class="cx"> updateWidgetPositions();
</span><span class="cx"> else {
</span><del>- TemporaryChange<bool> inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</del><ins>+ SetForScope<bool> inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</ins><span class="cx"> performPostLayoutTasks(); // Calls resumeScheduledEvents().
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2359,7 +2359,7 @@
</span><span class="cx">
</span><span class="cx"> void FrameView::setScrollPosition(const ScrollPosition& scrollPosition)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</del><ins>+ SetForScope<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</ins><span class="cx"> m_maintainScrollPositionAnchor = nullptr;
</span><span class="cx"> Page* page = frame().page();
</span><span class="cx"> if (page && page->expectsWheelEventTriggers())
</span><span class="lines">@@ -2465,7 +2465,7 @@
</span><span class="cx"> apply(*this, visibleRect);
</span><span class="cx">
</span><span class="cx"> // Recursive call for subframes. We cache the current FrameView's windowClipRect to avoid recomputing it for every subframe.
</span><del>- TemporaryChange<IntRect*> windowClipRectCache(m_cachedWindowClipRect, &windowClipRect);
</del><ins>+ SetForScope<IntRect*> windowClipRectCache(m_cachedWindowClipRect, &windowClipRect);
</ins><span class="cx"> for (Frame* childFrame = frame().tree().firstChild(); childFrame; childFrame = childFrame->tree().nextSibling()) {
</span><span class="cx"> if (auto* childView = childFrame->view())
</span><span class="cx"> childView->applyRecursivelyWithVisibleRect(apply);
</span><span class="lines">@@ -3539,7 +3539,7 @@
</span><span class="cx">
</span><span class="cx"> LOG(Layout, "FrameView %p autoSizeIfEnabled", this);
</span><span class="cx">
</span><del>- TemporaryChange<bool> changeInAutoSize(m_inAutoSize, true);
</del><ins>+ SetForScope<bool> changeInAutoSize(m_inAutoSize, true);
</ins><span class="cx">
</span><span class="cx"> Document* document = frame().document();
</span><span class="cx"> if (!document)
</span></span></pre></div>
<a id="trunkSourceWebCorepagecspContentSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/page/csp/ContentSecurityPolicy.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> #include <inspector/InspectorValues.h>
</span><span class="cx"> #include <inspector/ScriptCallStack.h>
</span><span class="cx"> #include <inspector/ScriptCallStackFactory.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx"> #include <wtf/text/TextPosition.h>
</span><span class="cx">
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">
</span><span class="cx"> void ContentSecurityPolicy::didReceiveHeaders(const ContentSecurityPolicyResponseHeaders& headers, ReportParsingErrors reportParsingErrors)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> isReportingEnabled(m_isReportingEnabled, reportParsingErrors == ReportParsingErrors::Yes);
</del><ins>+ SetForScope<bool> isReportingEnabled(m_isReportingEnabled, reportParsingErrors == ReportParsingErrors::Yes);
</ins><span class="cx"> for (auto& header : headers.m_headers)
</span><span class="cx"> didReceiveHeader(header.first, header.second, ContentSecurityPolicy::PolicyFrom::HTTPHeader);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #include "ScrollingTreeOverflowScrollingNode.h"
</span><span class="cx"> #include "ScrollingTreeScrollingNode.h"
</span><span class="cx"> #include "TextStream.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool scrollRequestIsProgammatic = rootNode ? rootNode->requestedScrollPositionRepresentsProgrammaticScroll() : false;
</span><del>- TemporaryChange<bool> changeHandlingProgrammaticScroll(m_isHandlingProgrammaticScroll, scrollRequestIsProgammatic);
</del><ins>+ SetForScope<bool> changeHandlingProgrammaticScroll(m_isHandlingProgrammaticScroll, scrollRequestIsProgammatic);
</ins><span class="cx">
</span><span class="cx"> removeDestroyedNodes(*scrollingStateTree);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/SystemTracing.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -1534,7 +1534,7 @@
</span><span class="cx">
</span><span class="cx"> void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> committingChangesChange(m_isCommittingChanges, true);
</del><ins>+ SetForScope<bool> committingChangesChange(m_isCommittingChanges, true);
</ins><span class="cx">
</span><span class="cx"> ++commitState.treeDepth;
</span><span class="cx"> if (m_structuralLayer)
</span><span class="lines">@@ -1688,7 +1688,7 @@
</span><span class="cx"> if (!m_uncommittedChanges)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> committingChangesChange(m_isCommittingChanges, true);
</del><ins>+ SetForScope<bool> committingChangesChange(m_isCommittingChanges, true);
</ins><span class="cx">
</span><span class="cx"> if (m_uncommittedChanges & MaskLayerChanged)
</span><span class="cx"> updateMaskLayer();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsopenglTemporaryOpenGLSettingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.h (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.h        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.h        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> // value upon destruction, making it an alternative to checking, clearing, and resetting each flag
</span><span class="cx"> // at all of a block's exit points.
</span><span class="cx"> //
</span><del>-// Based on WTF::TemporaryChange<>
</del><ins>+// Based on WTF::SetForScope<>
</ins><span class="cx">
</span><span class="cx"> class TemporaryOpenGLSetting {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(TemporaryOpenGLSetting);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapTextureMapperGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><span class="cx"> #include "CairoUtilities.h"
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> const BitmapTextureGL& textureGL = static_cast<const BitmapTextureGL&>(texture);
</span><del>- TemporaryChange<const BitmapTextureGL::FilterInfo*> filterInfo(data().filterInfo, textureGL.filterInfo());
</del><ins>+ SetForScope<const BitmapTextureGL::FilterInfo*> filterInfo(data().filterInfo, textureGL.filterInfo());
</ins><span class="cx">
</span><span class="cx"> drawTexture(textureGL.id(), textureGL.isOpaque() ? 0 : ShouldBlend, textureGL.size(), targetRect, matrix, opacity, exposedEdges);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include "ScrollableArea.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #ifndef NDEBUG
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #endif
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="lines">@@ -1041,7 +1041,7 @@
</span><span class="cx"> void CoordinatedGraphicsLayer::purgeBackingStores()
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>- TemporaryChange<bool> updateModeProtector(m_isPurging, true);
</del><ins>+ SetForScope<bool> updateModeProtector(m_isPurging, true);
</ins><span class="cx"> #endif
</span><span class="cx"> m_mainBackingStore = nullptr;
</span><span class="cx"> m_previousBackingStore = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsLayerDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsLayerDirect2D.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsLayerDirect2D.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsLayerDirect2D.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/SystemTracing.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkPasteboardHelpercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "GtkVersioning.h"
</span><span class="cx"> #include "SelectionData.h"
</span><span class="cx"> #include <gtk/gtk.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/glib/GUniquePtr.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx"> GtkTargetEntry* table = gtk_target_table_new_from_list(list.get(), &numberOfTargets);
</span><span class="cx">
</span><span class="cx"> if (numberOfTargets > 0 && table) {
</span><del>- TemporaryChange<SelectionData*> change(settingClipboardSelection, const_cast<SelectionData*>(&selection));
</del><ins>+ SetForScope<SelectionData*> change(settingClipboardSelection, const_cast<SelectionData*>(&selection));
</ins><span class="cx"> auto data = std::make_unique<ClipboardSetData>(*settingClipboardSelection, WTFMove(primarySelectionCleared));
</span><span class="cx"> if (gtk_clipboard_set_with_data(clipboard, table, numberOfTargets, getClipboardContentsCallback, clearClipboardContentsCallback, data.get())) {
</span><span class="cx"> gtk_clipboard_set_can_store(clipboard, nullptr, 0);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollbarThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> #include <wtf/BlockObjCExceptions.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx">
</span><span class="cx"> // FIXME: There are repainting problems due to Aqua scroll bar buttons' visual overflow.
</span><span class="cx">
</span><span class="lines">@@ -549,7 +549,7 @@
</span><span class="cx"> if (scrollbar.supportsUpdateOnSecondaryThread())
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- TemporaryChange<bool> isCurrentlyDrawingIntoLayer(g_isCurrentlyDrawingIntoLayer, context.isCALayerContext());
</del><ins>+ SetForScope<bool> isCurrentlyDrawingIntoLayer(g_isCurrentlyDrawingIntoLayer, context.isCALayerContext());
</ins><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(context);
</span><span class="cx"> context.clip(damageRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx">
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/Optional.h>
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StackStats.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx">
</span><span class="cx"> using namespace WTF;
</span><span class="cx"> using namespace Unicode;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGeometryMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "RenderLayer.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "TransformState.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> void RenderGeometryMap::pushMappingsToAncestor(const RenderObject* renderer, const RenderLayerModelObject* ancestorRenderer)
</span><span class="cx"> {
</span><span class="cx"> // We need to push mappings in reverse order here, so do insertions rather than appends.
</span><del>- TemporaryChange<size_t> positionChange(m_insertionPosition, m_mapping.size());
</del><ins>+ SetForScope<size_t> positionChange(m_insertionPosition, m_mapping.size());
</ins><span class="cx"> do {
</span><span class="cx"> renderer = renderer->pushMappingToContainer(ancestorRenderer, *this);
</span><span class="cx"> } while (renderer && renderer != ancestorRenderer);
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx"> void RenderGeometryMap::pushMappingsToAncestor(const RenderLayer* layer, const RenderLayer* ancestorLayer, bool respectTransforms)
</span><span class="cx"> {
</span><span class="cx"> MapCoordinatesFlags newFlags = respectTransforms ? m_mapCoordinatesFlags : m_mapCoordinatesFlags & ~UseTransforms;
</span><del>- TemporaryChange<MapCoordinatesFlags> flagsChange(m_mapCoordinatesFlags, newFlags);
</del><ins>+ SetForScope<MapCoordinatesFlags> flagsChange(m_mapCoordinatesFlags, newFlags);
</ins><span class="cx">
</span><span class="cx"> const RenderLayerModelObject& renderer = layer->renderer();
</span><span class="cx">
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> pushMappingsToAncestor(&ancestorLayer->renderer(), nullptr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- TemporaryChange<size_t> positionChange(m_insertionPosition, m_mapping.size());
</del><ins>+ SetForScope<size_t> positionChange(m_insertionPosition, m_mapping.size());
</ins><span class="cx"> push(&renderer, layerOffset, /*accumulatingTransform*/ true, /*isNonUniform*/ false, /*isFixedPosition*/ false, /*hasTransform*/ false);
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx">
</span><span class="cx"> // With all our children positioned, now update our marquee if we need to.
</span><span class="cx"> if (m_marquee) {
</span><del>- // FIXME: would like to use TemporaryChange<> but it doesn't work with bitfields.
</del><ins>+ // FIXME: would like to use SetForScope<> but it doesn't work with bitfields.
</ins><span class="cx"> bool oldUpdatingMarqueePosition = m_updatingMarqueePosition;
</span><span class="cx"> m_updatingMarqueePosition = true;
</span><span class="cx"> m_marquee->updateMarqueePosition();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> #include "TiledBacking.h"
</span><span class="cx"> #include "TransformState.h"
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx">
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx">
</span><span class="cx"> AnimationUpdateBlock animationUpdateBlock(&m_renderView.frameView().frame().animation());
</span><span class="cx">
</span><del>- TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true);
</del><ins>+ SetForScope<bool> postLayoutChange(m_inPostLayoutUpdate, true);
</ins><span class="cx">
</span><span class="cx"> bool checkForHierarchyUpdate = m_reevaluateCompositingAfterLayout;
</span><span class="cx"> bool needGeometryUpdate = false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "StyleInheritedData.h"
</span><span class="cx"> #include "TransformState.h"
</span><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/StackStats.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx"> document().updateLayout();
</span><span class="cx">
</span><span class="cx"> #if !ASSERT_DISABLED
</span><del>- TemporaryChange<bool> hitTestRestorer { m_inHitTesting, true };
</del><ins>+ SetForScope<bool> hitTestRestorer { m_inHitTesting, true };
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> FrameFlatteningLayoutDisallower disallower(frameView());
</span></span></pre></div>
<a id="trunkSourceWebCorereplayEventLoopInputDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/replay/EventLoopInputDispatcher.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "ReplayingInputCursor.h"
</span><span class="cx"> #include "WebReplayInputs.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="cx"> #include "Logging.h"
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> change(m_dispatching, true);
</del><ins>+ SetForScope<bool> change(m_dispatching, true);
</ins><span class="cx"> m_currentWork.input->dispatch(m_page.replayController());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageMap.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageMap.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/storage/StorageMap.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "StorageMap.h"
</span><span class="cx">
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<StorageMap> StorageMap::setItemIgnoringQuota(const String& key, const String& value)
</span><span class="cx"> {
</span><del>- TemporaryChange<unsigned> quotaSizeChange(m_quotaSize, noQuota);
</del><ins>+ SetForScope<unsigned> quotaSizeChange(m_quotaSize, noQuota);
</ins><span class="cx">
</span><span class="cx"> String oldValue;
</span><span class="cx"> bool quotaException;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathBlendercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathBlender.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathBlender.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebCore/svg/SVGPathBlender.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> #include "AnimationUtilities.h"
</span><span class="cx"> #include "SVGPathSeg.h"
</span><span class="cx"> #include "SVGPathSource.h"
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx">
</span><span class="cx"> bool SVGPathBlender::addAnimatedPath(unsigned repeatCount)
</span><span class="cx"> {
</span><del>- TemporaryChange<unsigned> change(m_addTypesCount, repeatCount);
</del><ins>+ SetForScope<unsigned> change(m_addTypesCount, repeatCount);
</ins><span class="cx"> return blendAnimatedPath(0);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ * WebCoreSupport/WebResourceLoadScheduler.cpp:
+
</ins><span class="cx"> 2016-11-14 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
</span></span></pre></div>
<a id="trunkSourceWebKitWebCoreSupportWebResourceLoadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit/WebCoreSupport/WebResourceLoadScheduler.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #include <WebCore/SubresourceLoader.h>
</span><span class="cx"> #include <WebCore/URL.h>
</span><span class="cx"> #include <wtf/MainThread.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ * WebView/WebView.mm:
+ (-[WebView updateTextTouchBar]):
+
</ins><span class="cx"> 2016-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -219,8 +219,8 @@
</span><span class="cx"> #import <wtf/RefCountedLeakCounter.h>
</span><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx"> #import <wtf/RunLoop.h>
</span><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx"> #import <wtf/StdLibExtras.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><span class="cx"> #import <wtf/spi/darwin/dyldSPI.h>
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -9416,7 +9416,7 @@
</span><span class="cx"> if (_private->_isUpdatingTextTouchBar)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<BOOL> isUpdatingTextTouchBar(_private->_isUpdatingTextTouchBar, YES);
</del><ins>+ SetForScope<BOOL> isUpdatingTextTouchBar(_private->_isUpdatingTextTouchBar, YES);
</ins><span class="cx">
</span><span class="cx"> if (!_private->_textTouchBarItemController)
</span><span class="cx"> _private->_textTouchBarItemController = adoptNS([[WebTextTouchBarItemController alloc] initWithWebView:self]);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ * PluginProcess/PluginControllerProxy.cpp:
+ (WebKit::PluginControllerProxy::initialize):
+ * PluginProcess/WebProcessConnection.cpp:
+ (WebKit::WebProcessConnection::didReceiveMessage):
+ (WebKit::WebProcessConnection::didReceiveSyncMessage):
+ * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+ (createEncodedObject):
+ (decodeObject):
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::WebViewImpl::updateTextTouchBar):
+ * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+ (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
+ * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
+ (WebKit::WebPasteboardProxy::writeToClipboard):
+ * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+ (WebKit::CompositingCoordinator::flushPendingLayerChanges):
+ (WebKit::CompositingCoordinator::purgeBackingStores):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::mouseEvent):
+ (WebKit::WebPage::keyEvent):
+ (WebKit::WebPage::dispatchTouchEvent):
+ (WebKit::WebPage::setInitialFocus):
+ (WebKit::WebPage::insertTextAsync):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::dynamicViewportSizeUpdate):
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+
</ins><span class="cx"> 2016-11-16 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed build fix after r208589
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessPluginControllerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> #include <WebCore/HTTPHeaderMap.h>
</span><span class="cx"> #include <WebCore/IdentifierRep.h>
</span><span class="cx"> #include <WebCore/NotImplemented.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> ASSERT(!m_plugin);
</span><span class="cx">
</span><span class="cx"> ASSERT(!m_isInitializing);
</span><del>- m_isInitializing = true; // Cannot use TemporaryChange here, because this object can be deleted before the function returns.
</del><ins>+ m_isInitializing = true; // Cannot use SetForScope here, because this object can be deleted before the function returns.
</ins><span class="cx">
</span><span class="cx"> m_plugin = NetscapePlugin::create(PluginProcess::singleton().netscapePluginModule());
</span><span class="cx"> if (!m_plugin) {
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessWebProcessConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> #include "PluginProxyMessages.h"
</span><span class="cx"> #include "WebProcessConnectionMessages.h"
</span><span class="cx"> #include <unistd.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">
</span><span class="cx"> void WebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
</span><span class="cx"> {
</span><del>- TemporaryChange<IPC::Connection*> currentConnectionChange(currentConnection, &connection);
</del><ins>+ SetForScope<IPC::Connection*> currentConnectionChange(currentConnection, &connection);
</ins><span class="cx">
</span><span class="cx"> if (decoder.messageReceiverName() == Messages::WebProcessConnection::messageReceiverName()) {
</span><span class="cx"> didReceiveWebProcessConnectionMessage(connection, decoder);
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">
</span><span class="cx"> void WebProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder)
</span><span class="cx"> {
</span><del>- TemporaryChange<IPC::Connection*> currentConnectionChange(currentConnection, &connection);
</del><ins>+ SetForScope<IPC::Connection*> currentConnectionChange(currentConnection, &connection);
</ins><span class="cx">
</span><span class="cx"> uint64_t destinationID = decoder.destinationID();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoaWKRemoteObjectCodermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #import "_WKRemoteObjectInterfaceInternal.h"
</span><span class="cx"> #import <objc/runtime.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx"> #import <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> static const char* const classNameKey = "$class";
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> Ref<API::Dictionary> dictionary = API::Dictionary::create();
</span><del>- TemporaryChange<API::Dictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.ptr());
</del><ins>+ SetForScope<API::Dictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.ptr());
</ins><span class="cx">
</span><span class="cx"> encodeObject(encoder, object);
</span><span class="cx">
</span><span class="lines">@@ -667,13 +667,13 @@
</span><span class="cx"> if (!dictionary)
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- TemporaryChange<const API::Dictionary*> dictionaryChange(decoder->_currentDictionary, dictionary);
</del><ins>+ SetForScope<const API::Dictionary*> dictionaryChange(decoder->_currentDictionary, dictionary);
</ins><span class="cx">
</span><span class="cx"> // If no allowed classes were listed, just use the currently allowed classes.
</span><span class="cx"> if (allowedClasses.isEmpty())
</span><span class="cx"> return decodeObject(decoder);
</span><span class="cx">
</span><del>- TemporaryChange<const HashSet<Class>*> allowedClassesChange(decoder->_allowedClasses, &allowedClasses);
</del><ins>+ SetForScope<const HashSet<Class>*> allowedClassesChange(decoder->_allowedClasses, &allowedClasses);
</ins><span class="cx"> return decodeObject(decoder);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="cx"> #import <wtf/Optional.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx"> #import <wtf/spi/darwin/dyldSPI.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -2163,7 +2163,7 @@
</span><span class="cx">
</span><span class="cx"> if (adjustScrollView) {
</span><span class="cx"> CGFloat bottomInsetBeforeAdjustment = [_scrollView contentInset].bottom;
</span><del>- TemporaryChange<BOOL> insetAdjustmentGuard(_currentlyAdjustingScrollViewInsetsForKeyboard, YES);
</del><ins>+ SetForScope<BOOL> insetAdjustmentGuard(_currentlyAdjustingScrollViewInsetsForKeyboard, YES);
</ins><span class="cx"> [_scrollView _adjustForAutomaticKeyboardInfo:keyboardInfo animated:YES lastAdjustment:&_lastAdjustmentForScroller];
</span><span class="cx"> CGFloat bottomInsetAfterAdjustment = [_scrollView contentInset].bottom;
</span><span class="cx"> if (bottomInsetBeforeAdjustment != bottomInsetAfterAdjustment)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> #import <WebKitSystemInterface.h>
</span><span class="cx"> #import <sys/stat.h>
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
</span><span class="cx"> SOFT_LINK_FRAMEWORK(AVKit)
</span><span class="lines">@@ -986,7 +986,7 @@
</span><span class="cx"> if (m_isUpdatingTextTouchBar)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> isUpdatingTextFunctionBar(m_isUpdatingTextTouchBar, true);
</del><ins>+ SetForScope<bool> isUpdatingTextFunctionBar(m_isUpdatingTextTouchBar, true);
</ins><span class="cx">
</span><span class="cx"> if (!m_textTouchBarItemController)
</span><span class="cx"> m_textTouchBarItemController = adoptNS([[WKTextTouchBarItemController alloc] initWithWebViewImpl:this]);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingiosScrollingTreeOverflowScrollingNodeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #import <UIKit/UIPanGestureRecognizer.h>
</span><span class="cx"> #import <UIKit/UIScrollView.h>
</span><span class="cx"> #import <wtf/BlockObjCExceptions.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> #import <WebCore/AxisScrollSnapOffsets.h>
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> {
</span><span class="cx"> ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);
</span><span class="cx">
</span><del>- TemporaryChange<bool> updatingChange(m_updatingFromStateNode, true);
</del><ins>+ SetForScope<bool> updatingChange(m_updatingFromStateNode, true);
</ins><span class="cx">
</span><span class="cx"> const auto& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebPasteboardProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "WebFrameProxy.h"
</span><span class="cx"> #include "WebSelectionData.h"
</span><span class="cx"> #include <WebCore/PlatformPasteboard.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPasteboardProxy::writeToClipboard(const String& pasteboardName, const WebSelectionData& selection)
</span><span class="cx"> {
</span><del>- TemporaryChange<WebFrameProxy*> frameWritingToClipboard(m_frameWritingToClipboard, m_primarySelectionOwner);
</del><ins>+ SetForScope<WebFrameProxy*> frameWritingToClipboard(m_frameWritingToClipboard, m_primarySelectionOwner);
</ins><span class="cx"> PlatformPasteboard(pasteboardName).writeToClipboard(selection.selectionData, [this] {
</span><span class="cx"> if (m_frameWritingToClipboard == m_primarySelectionOwner)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCompositingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #include <WebCore/InspectorController.h>
</span><span class="cx"> #include <WebCore/MainFrame.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">
</span><span class="cx"> bool CompositingCoordinator::flushPendingLayerChanges()
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> protector(m_isFlushingLayerChanges, true);
</del><ins>+ SetForScope<bool> protector(m_isFlushingLayerChanges, true);
</ins><span class="cx">
</span><span class="cx"> initializeRootCompositingLayerIfNeeded();
</span><span class="cx">
</span><span class="lines">@@ -373,7 +373,7 @@
</span><span class="cx">
</span><span class="cx"> void CompositingCoordinator::purgeBackingStores()
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> purgingToggle(m_isPurging, true);
</del><ins>+ SetForScope<bool> purgingToggle(m_isPurging, true);
</ins><span class="cx">
</span><span class="cx"> for (auto& registeredLayer : m_registeredLayers.values())
</span><span class="cx"> registeredLayer->purgeBackingStores();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> #include <runtime/JSLock.h>
</span><span class="cx"> #include <runtime/SamplingProfiler.h>
</span><span class="cx"> #include <wtf/RunLoop.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx"> #include "DataDetectionResult.h"
</span><span class="lines">@@ -2238,7 +2238,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::mouseEvent(const WebMouseEvent& mouseEvent)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+ SetForScope<bool> userIsInteractingChange { m_userIsInteracting, true };
</ins><span class="cx">
</span><span class="cx"> m_userActivityHysteresis.impulse();
</span><span class="cx">
</span><span class="lines">@@ -2316,7 +2316,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+ SetForScope<bool> userIsInteractingChange { m_userIsInteracting, true };
</ins><span class="cx">
</span><span class="cx"> m_userActivityHysteresis.impulse();
</span><span class="cx">
</span><span class="lines">@@ -2378,7 +2378,7 @@
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx"> void WebPage::dispatchTouchEvent(const WebTouchEvent& touchEvent, bool& handled)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+ SetForScope<bool> userIsInteractingChange { m_userIsInteracting, true };
</ins><span class="cx">
</span><span class="cx"> m_lastInteractionLocation = touchEvent.position();
</span><span class="cx"> CurrentEvent currentEvent(touchEvent);
</span><span class="lines">@@ -2539,7 +2539,7 @@
</span><span class="cx"> if (!m_page)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- TemporaryChange<bool> userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+ SetForScope<bool> userIsInteractingChange { m_userIsInteracting, true };
</ins><span class="cx">
</span><span class="cx"> Frame& frame = m_page->focusController().focusedOrMainFrame();
</span><span class="cx"> frame.document()->setFocusedElement(0);
</span><span class="lines">@@ -4642,7 +4642,7 @@
</span><span class="cx"> if (replacementEditingRange.location != notFound) {
</span><span class="cx"> RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange, static_cast<EditingRangeIsRelativeTo>(editingRangeIsRelativeTo));
</span><span class="cx"> if (replacementRange) {
</span><del>- TemporaryChange<bool> isSelectingTextWhileInsertingAsynchronously(m_isSelectingTextWhileInsertingAsynchronously, suppressSelectionUpdate);
</del><ins>+ SetForScope<bool> isSelectingTextWhileInsertingAsynchronously(m_isSelectingTextWhileInsertingAsynchronously, suppressSelectionUpdate);
</ins><span class="cx"> frame.selection().setSelection(VisibleSelection(*replacementRange, SEL_DEFAULT_AFFINITY));
</span><span class="cx"> replacesText = true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> #import <WebCore/WKContentObservation.h>
</span><span class="cx"> #import <WebCore/WebEvent.h>
</span><span class="cx"> #import <wtf/MathExtras.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -2687,7 +2687,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::dynamicViewportSizeUpdate(const FloatSize& minimumLayoutSize, const WebCore::FloatSize& maximumUnobscuredSize, const FloatRect& targetExposedContentRect, const FloatRect& targetUnobscuredRect, const WebCore::FloatRect& targetUnobscuredRectInScrollViewCoordinates, double targetScale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID)
</span><span class="cx"> {
</span><del>- TemporaryChange<bool> dynamicSizeUpdateGuard(m_inDynamicSizeUpdate, true);
</del><ins>+ SetForScope<bool> dynamicSizeUpdateGuard(m_inDynamicSizeUpdate, true);
</ins><span class="cx"> // FIXME: this does not handle the cases where the content would change the content size or scroll position from JavaScript.
</span><span class="cx"> // To handle those cases, we would need to redo this computation on every change until the next visible content rect update.
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> #import <WebCore/FrameView.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx"> #import <wtf/SystemTracing.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> #import <WebCore/WindowsKeyboardCodes.h>
</span><span class="cx"> #import <WebCore/htmlediting.h>
</span><span class="cx"> #import <WebKitSystemInterface.h>
</span><del>-#import <wtf/TemporaryChange.h>
</del><ins>+#import <wtf/SetForScope.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx"> #include <WebCore/MediaPlaybackTargetMac.h>
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Tools/ChangeLog        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [JSC] WTF::TemporaryChange with WTF::SetForScope
+ https://bugs.webkit.org/show_bug.cgi?id=164761
+
+ Reviewed by Saam Barati.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WTF/SetForScope.cpp: Renamed from Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp.
+ (TestWebKitAPI::TEST):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
</ins><span class="cx"> 2016-11-16 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r208455): LayoutTests swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html are failing
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPICMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/CMakeLists.txt        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -74,12 +74,12 @@
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/Scope.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/ScopedLambda.cpp
</span><ins>+ ${TESTWEBKITAPI_DIR}/Tests/WTF/SetForScope.cpp
</ins><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/StringBuilder.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/StringHasher.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/StringImpl.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/StringView.cpp
</span><del>- ${TESTWEBKITAPI_DIR}/Tests/WTF/TemporaryChange.cpp
</del><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/Time.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/UniqueRef.cpp
</span><span class="cx"> ${TESTWEBKITAPI_DIR}/Tests/WTF/Variant.cpp
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx">                 7C83DF371D0A590C00FEBCF3 /* StringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F1B44315CA434F00D1E4BF /* StringImpl.cpp */; };
</span><span class="cx">                 7C83DF381D0A590C00FEBCF3 /* StringOperators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01363C713C3997300EF3964 /* StringOperators.cpp */; };
</span><span class="cx">                 7C83DF3A1D0A590C00FEBCF3 /* StringView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C74D42D188228F300E5ED57 /* StringView.cpp */; };
</span><del>-                7C83DF3D1D0A590C00FEBCF3 /* TemporaryChange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */; };
</del><ins>+                7C83DF3D1D0A590C00FEBCF3 /* SetForScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BCD85691485C98B00EA2003 /* SetForScope.cpp */; };
</ins><span class="cx">                 7C83DF401D0A590C00FEBCF3 /* TestsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC131AA8117131FC00B69727 /* TestsController.cpp */; };
</span><span class="cx">                 7C83DF4C1D0A590C00FEBCF3 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC55F5F814AD78EE00484BE1 /* Vector.cpp */; };
</span><span class="cx">                 7C83DF591D0A590C00FEBCF3 /* ParkingLot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE447971B76F1E3009498EB /* ParkingLot.cpp */; };
</span><span class="lines">@@ -731,7 +731,7 @@
</span><span class="cx">                 00CD9F6215BE312C002DA2CE /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0766DD1F1A5AD5200023E3BB /* PendingAPIRequestURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PendingAPIRequestURL.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0BCD833414857CE400EA2003 /* HashMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashMap.cpp; sourceTree = "<group>"; };
</span><del>-                0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemporaryChange.cpp; sourceTree = "<group>"; };
</del><ins>+                0BCD85691485C98B00EA2003 /* SetForScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SetForScope.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformUtilitiesCocoa.mm; path = cocoa/PlatformUtilitiesCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F139E751A423A5300F590F5 /* WeakObjCPtr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WeakObjCPtr.mm; path = cocoa/WeakObjCPtr.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreStatisticsWithNoWebProcess.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -1848,7 +1848,7 @@
</span><span class="cx">                                 C01363C713C3997300EF3964 /* StringOperators.cpp */,
</span><span class="cx">                                 7C74D42D188228F300E5ED57 /* StringView.cpp */,
</span><span class="cx">                                 5597F8341D9596C80066BC21 /* SynchronizedFixedQueue.cpp */,
</span><del>-                                0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */,
</del><ins>+                                0BCD85691485C98B00EA2003 /* SetForScope.cpp */,
</ins><span class="cx">                                 0F2C20B71DCD544800542D9E /* Time.cpp */,
</span><span class="cx">                                 5C5E633D1D0B67940085A025 /* UniqueRef.cpp */,
</span><span class="cx">                                 7CD0D5AA1D5534DE000CC9E1 /* Variant.cpp */,
</span><span class="lines">@@ -2353,7 +2353,7 @@
</span><span class="cx">                                 7C83DF381D0A590C00FEBCF3 /* StringOperators.cpp in Sources */,
</span><span class="cx">                                 5597F8361D9596C80066BC21 /* SynchronizedFixedQueue.cpp in Sources */,
</span><span class="cx">                                 7C83DF3A1D0A590C00FEBCF3 /* StringView.cpp in Sources */,
</span><del>-                                7C83DF3D1D0A590C00FEBCF3 /* TemporaryChange.cpp in Sources */,
</del><ins>+                                7C83DF3D1D0A590C00FEBCF3 /* SetForScope.cpp in Sources */,
</ins><span class="cx">                                 7C83DF401D0A590C00FEBCF3 /* TestsController.cpp in Sources */,
</span><span class="cx">                                 7C83E03B1D0A602700FEBCF3 /* UtilitiesCocoa.mm in Sources */,
</span><span class="cx">                                 7C83FC711D5535A8001DFBCD /* Variant.cpp in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFSetForScopecppfromrev208840trunkToolsTestWebKitAPITestsWTFTemporaryChangecpp"></a>
<div class="copfile"><h4>Copied: trunk/Tools/TestWebKitAPI/Tests/WTF/SetForScope.cpp (from rev 208840, trunk/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp) (0 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/SetForScope.cpp         (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/SetForScope.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <wtf/SetForScope.h>
+
+namespace TestWebKitAPI {
+
+TEST(WTF, SetForScopeNested)
+{
+ bool originallyFalse = false;
+ {
+ SetForScope<bool> change1OriginallyFalse(originallyFalse, true);
+ EXPECT_TRUE(originallyFalse);
+ {
+ SetForScope<bool> change2OriginallyFalse(originallyFalse, false);
+ EXPECT_FALSE(originallyFalse);
+ }
+ EXPECT_TRUE(originallyFalse);
+ }
+ EXPECT_FALSE(originallyFalse);
+}
+
+} // namespace TestWebKitAPI
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFTemporaryChangecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include <wtf/TemporaryChange.h>
-
-namespace TestWebKitAPI {
-
-TEST(WTF, TemporaryChangeNested)
-{
- bool originallyFalse = false;
- {
- TemporaryChange<bool> change1OriginallyFalse(originallyFalse, true);
- EXPECT_TRUE(originallyFalse);
- {
- TemporaryChange<bool> change2OriginallyFalse(originallyFalse, false);
- EXPECT_FALSE(originallyFalse);
- }
- EXPECT_TRUE(originallyFalse);
- }
- EXPECT_FALSE(originallyFalse);
-}
-
-} // namespace TestWebKitAPI
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (208840 => 208841)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2016-11-17 06:47:31 UTC (rev 208840)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2016-11-17 08:48:34 UTC (rev 208841)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RunLoop.h>
</span><del>-#include <wtf/TemporaryChange.h>
</del><ins>+#include <wtf/SetForScope.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -692,7 +692,7 @@
</span><span class="cx">
</span><span class="cx"> bool TestController::resetStateToConsistentValues(const TestOptions& options)
</span><span class="cx"> {
</span><del>- TemporaryChange<State> changeState(m_state, Resetting);
</del><ins>+ SetForScope<State> changeState(m_state, Resetting);
</ins><span class="cx"> m_beforeUnloadReturnValue = true;
</span><span class="cx">
</span><span class="cx"> // This setting differs between the antique and modern Mac WebKit2 API.
</span></span></pre>
</div>
</div>
</body>
</html>