<!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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;mark.lam@apple.com&gt;
</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 &quot;Nodes.h&quot;
</span><span class="cx"> #include &quot;ParserError.h&quot;
</span><span class="cx"> #include &quot;RegisterID.h&quot;
</span><del>-#include &quot;SetForScope.h&quot;
</del><span class="cx"> #include &quot;StaticPropertyAnalyzer.h&quot;
</span><span class="cx"> #include &quot;SymbolTable.h&quot;
</span><span class="cx"> #include &quot;TemplateRegistryKey.h&quot;
</span><span class="lines">@@ -48,6 +47,7 @@
</span><span class="cx"> #include &lt;wtf/HashTraits.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/SegmentedVector.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</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 &lt;wtf/StdLibExtras.h&gt;
-
-namespace JSC {
-
-template&lt;typename T&gt;
-class SetForScope {
-public:
-    SetForScope(T&amp; currentValue, const T&amp; newValue)
-        : m_ref(currentValue)
-        , m_oldValue(currentValue)
-    {
-        m_ref = newValue;
-    }
-
-    SetForScope(T&amp; currentValue, T&amp;&amp; newValue)
-        : m_ref(currentValue)
-        , m_oldValue(currentValue)
-    {
-        currentValue = WTFMove(newValue);
-    }
-
-    ~SetForScope()
-    {
-        m_ref = m_oldValue;
-    }
-
-private:
-    T&amp; 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&amp; m_debugger;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// This is very similar to TemporaryChange&lt;bool&gt;, but that cannot be used
</del><ins>+// This is very similar to SetForScope&lt;bool&gt;, 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 &quot;InspectorFrontendRouter.h&quot;
</span><span class="cx"> #include &quot;InspectorValues.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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&lt;Optional&lt;long&gt;&gt; scopedRequestId(m_currentRequestId, Nullopt);
</del><ins>+        SetForScope&lt;Optional&lt;long&gt;&gt; scopedRequestId(m_currentRequestId, Nullopt);
</ins><span class="cx"> 
</span><span class="cx">         RefPtr&lt;InspectorValue&gt; 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&lt;Optional&lt;long&gt;&gt; scopedRequestId(m_currentRequestId, requestId);
</del><ins>+        SetForScope&lt;Optional&lt;long&gt;&gt; scopedRequestId(m_currentRequestId, requestId);
</ins><span class="cx"> 
</span><span class="cx">         RefPtr&lt;InspectorValue&gt; methodValue;
</span><span class="cx">         if (!messageObject-&gt;getValue(ASCIILiteral(&quot;method&quot;), 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 &quot;ScriptValue.h&quot;
</span><span class="cx"> #include &quot;SourceProvider.h&quot;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;bool&gt; change(m_callingListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_callingListeners, true);
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;ScriptDebugListener*&gt; 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&lt;bool&gt; change(m_callingListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_callingListeners, true);
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;ScriptDebugListener*&gt; 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&lt;bool&gt; change(m_callingListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_callingListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_callingListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &quot;ASTBuilder.h&quot;
</span><span class="cx"> #include &quot;DebuggerParseData.h&quot;
</span><span class="cx"> #include &quot;JSCInlines.h&quot;
</span><del>-#include &quot;SetForScope.h&quot;
</del><span class="cx"> #include &quot;VM.h&quot;
</span><span class="cx"> #include &lt;utility&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StringPrintStream.h&gt;
</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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;utatane.tea@gmail.com&gt;
</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 = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47313151A825B004123FF /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A47314151A825B004123FF /* Hasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Hasher.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A8A4731A151A825B004123FF /* TemporaryChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryChange.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A8A4731A151A825B004123FF /* SetForScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetForScope.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A8A4731C151A825B004123FF /* ASCIIFastPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCIIFastPath.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A4731D151A825B004123FF /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicString.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A8A4731E151A825B004123FF /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicString.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</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 &quot;AS IS&quot; 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 &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/StdLibExtras.h&gt;
+
+namespace WTF {
+
+// SetForScope&lt;&gt; is useful for setting a variable to a new value only within a
+// particular scope. An SetForScope&lt;&gt; object changes a variable to its original
+// value upon destruction, making it an alternative to writing &quot;var = false;&quot;
+// or &quot;var = oldVal;&quot; at all of a block's exit points.
+//
+// This should be obvious, but note that an SetForScope&lt;&gt; instance should have a
+// shorter lifetime than its scopedVariable, to prevent invalid memory writes
+// when the SetForScope&lt;&gt; object is destroyed.
+
+template&lt;typename T&gt;
+class SetForScope {
+    WTF_MAKE_NONCOPYABLE(SetForScope);
+public:
+    SetForScope(T&amp; scopedVariable)
+        : m_scopedVariable(scopedVariable)
+        , m_originalValue(scopedVariable)
+    {
+    }
+    template&lt;typename U&gt;
+    SetForScope(T&amp; scopedVariable, U&amp;&amp; newValue)
+        : SetForScope(scopedVariable)
+    {
+        m_scopedVariable = std::forward&lt;U&gt;(newValue);
+    }
+
+    ~SetForScope()
+    {
+        m_scopedVariable = WTFMove(m_originalValue);
+    }
+
+private:
+    T&amp; 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 &quot;AS IS&quot; 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 &lt;wtf/Noncopyable.h&gt;
-
-namespace WTF {
-
-// TemporaryChange&lt;&gt; is useful for setting a variable to a new value only within a
-// particular scope. An TemporaryChange&lt;&gt; object changes a variable to its original
-// value upon destruction, making it an alternative to writing &quot;var = false;&quot;
-// or &quot;var = oldVal;&quot; at all of a block's exit points.
-//
-// This should be obvious, but note that an TemporaryChange&lt;&gt; instance should have a
-// shorter lifetime than its scopedVariable, to prevent invalid memory writes
-// when the TemporaryChange&lt;&gt; object is destroyed.
-
-template&lt;typename T&gt;
-class TemporaryChange {
-    WTF_MAKE_NONCOPYABLE(TemporaryChange);
-public:
-    TemporaryChange(T&amp; scopedVariable)
-        : m_scopedVariable(scopedVariable)
-        , m_originalValue(scopedVariable)
-    {
-    }
-    TemporaryChange(T&amp; scopedVariable, T newValue)
-        : TemporaryChange(scopedVariable)
-    {
-        m_scopedVariable = newValue;
-    }
-
-    ~TemporaryChange()
-    {
-        m_scopedVariable = m_originalValue;
-    }
-
-private:
-    T&amp; 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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;utatane.tea@gmail.com&gt;
</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 &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;MemoryIDBBackingStore.h&quot;
</span><span class="cx"> #include &quot;MemoryObjectStore.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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, &quot;MemoryBackingStoreTransaction::abort()&quot;);
</span><span class="cx"> 
</span><del>-    TemporaryChange&lt;bool&gt; change(m_isAborting, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_isAborting, true);
</ins><span class="cx"> 
</span><span class="cx">     for (auto iterator : m_originalIndexNames)
</span><span class="cx">         iterator.key-&gt;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(&quot;Cannot define a custom element while defining another custom element&quot;));
</span><span class="cx">         return jsUndefined();
</span><span class="cx">     }
</span><del>-    TemporaryChange&lt;bool&gt; change(registry.elementDefinitionIsRunning(), true);
</del><ins>+    SetForScope&lt;bool&gt; change(registry.elementDefinitionIsRunning(), true);
</ins><span class="cx"> 
</span><span class="cx">     if (registry.findInterface(localName)) {
</span><span class="cx">         throwNotSupportedError(state, scope, ASCIILiteral(&quot;Cannot define multiple custom elements with the same tag name&quot;));
</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 &lt;runtime/JSLock.h&gt;
</span><span class="cx"> #include &lt;runtime/JSModuleRecord.h&gt;
</span><span class="cx"> #include &lt;runtime/JSNativeStdFunction.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><span class="cx"> #include &lt;wtf/text/TextPosition.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto&amp; shell = *windowShell(world);
</span><span class="cx">     auto&amp; state = *shell.window()-&gt;globalExec();
</span><del>-    TemporaryChange&lt;const String*&gt; sourceURLScope(m_sourceURL, &amp;sourceURL.string());
</del><ins>+    SetForScope&lt;const String*&gt; sourceURLScope(m_sourceURL, &amp;sourceURL.string());
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;Frame&gt; 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 &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleScope.h&quot;
</span><span class="cx"> #include &quot;StyledElement.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;bool&gt; change(m_isMatchingSlottedPseudoElements, true);
</del><ins>+        SetForScope&lt;bool&gt; 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 &quot;WebKitFontFamilyNames.h&quot;
</span><span class="cx"> #include &quot;XMLNames.h&quot;
</span><span class="cx"> #include &lt;bitset&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/AtomicStringHash.h&gt;
</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 &lt;limits.h&gt;
</span><span class="cx"> #include &lt;wtf/HexNumber.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/dtoa.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuffer.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</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&lt;bool&gt; change(m_implicitShorthand);
</del><ins>+    SetForScope&lt;bool&gt; change(m_implicitShorthand);
</ins><span class="cx"> 
</span><span class="cx">     bool parsedProperty[cMaxFillProperties] = { false };
</span><span class="cx">     RefPtr&lt;CSSValue&gt; 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&amp; cssValuePool = CSSValuePool::singleton();
</span><del>-    TemporaryChange&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_implicitShorthand, true);
</ins><span class="cx">     const StylePropertyShorthand* propertiesForInitialization = shorthand.propertiesForInitialization();
</span><span class="cx">     for (unsigned i = 0; i &lt; 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&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+            SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+            SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+            SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;SVGPaint.h&quot;
</span><span class="cx"> 
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;bool&gt; change(m_implicitShorthand, true);
</del><ins>+        SetForScope&lt;bool&gt; 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-&gt;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 &quot;JSDOMPromise.h&quot;
</span><span class="cx"> #include &quot;QualifiedName.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/AtomicString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/AtomicStringHash.h&gt;
</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 &lt;inspector/ScriptCallStack.h&gt;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/SystemTracing.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/text/StringBuffer.h&gt;
</span><span class="cx"> #include &lt;yarr/RegularExpression.h&gt;
</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&lt;bool&gt; inRenderTreeUpdate(m_inRenderTreeUpdate, true);
</del><ins>+            SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_ignorePendingStylesheets, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; change(m_renderTreeBeingDestroyed, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_renderTreeBeingDestroyed, true);
</ins><span class="cx"> 
</span><span class="cx">     if (this == &amp;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 &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/Vector.h&gt;
</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&lt;bool&gt; firingEventListenersScope(data-&gt;isFiringEventListeners, true);
</del><ins>+    SetForScope&lt;bool&gt; firingEventListenersScope(data-&gt;isFiringEventListeners, true);
</ins><span class="cx"> 
</span><span class="cx">     if (auto* listenersVector = data-&gt;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 &quot;Microtasks.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;bool&gt; change(m_performingMicrotaskCheckpoint, true);
</del><ins>+    SetForScope&lt;bool&gt; change(m_performingMicrotaskCheckpoint, true);
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;std::unique_ptr&lt;Microtask&gt;&gt; queue = WTFMove(m_microtaskQueue);
</span><span class="cx">     for (auto&amp; 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 &quot;SubframeLoader.h&quot;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringConcatenate.h&gt;
</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&lt;unsigned&gt; change(m_maxSize, size);
</del><ins>+    SetForScope&lt;unsigned&gt; 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 &quot;HTMLParserIdioms.h&quot;
</span><span class="cx"> #include &quot;SpaceSplitString.h&quot;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/AtomicStringHash.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</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&lt;bool&gt; inAttributeUpdate(m_inUpdateAssociatedAttributeFromTokens, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &quot;CSSPreloadScanner.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;HTMLParserIdioms.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&amp; data, PreloadRequestStream&amp; requests)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_requests);
</span><del>-    TemporaryChange&lt;PreloadRequestStream*&gt; change(m_requests, &amp;requests);
</del><ins>+    SetForScope&lt;PreloadRequestStream*&gt; change(m_requests, &amp;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 &quot;HTMLFormattingElementList.h&quot;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</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&lt;bool&gt; m_redirectAttachToFosterParentChange;
</del><ins>+        SetForScope&lt;bool&gt; m_redirectAttachToFosterParentChange;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     static bool isFormattingTag(const AtomicString&amp;);
</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 &quot;SharedBuffer.h&quot;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx">     RefPtr&lt;SharedBuffer&gt; replacementData { m_blockingContentFilter-&gt;replacementData() };
</span><span class="cx">     ResourceResponse response { URL(), ASCIILiteral(&quot;text/html&quot;), replacementData-&gt;size(), ASCIILiteral(&quot;UTF-8&quot;) };
</span><span class="cx">     SubstituteData substituteData { WTFMove(replacementData), error.failingURL(), response, SubstituteData::SessionHistoryVisibility::Hidden };
</span><del>-    TemporaryChange&lt;bool&gt; loadingBlockedPage { m_isLoadingBlockedPage, true };
</del><ins>+    SetForScope&lt;bool&gt; loadingBlockedPage { m_isLoadingBlockedPage, true };
</ins><span class="cx">     m_documentLoader.frameLoader()-&gt;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 &quot;RuntimeEnabledFeatures.h&quot;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCountedLeakCounter.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</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 &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</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&lt;bool&gt; reentrancyProtector(m_inPruneResources, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; reentrancyProtector(m_inPruneResources, true);
</del><ins>+    SetForScope&lt;bool&gt; reentrancyProtector(m_inPruneResources, true);
</ins><span class="cx">  
</span><span class="cx">     if (targetSize &amp;&amp; m_deadSize &lt;= 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 &lt;runtime/VM.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</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&lt;JSC::VMEntryScope*&gt; entryScopeNullifier { m_page.mainFrame().document()-&gt;vm().entryScope, nullptr };
</del><ins>+    SetForScope&lt;JSC::VMEntryScope*&gt; entryScopeNullifier { m_page.mainFrame().document()-&gt;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 &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/SystemTracing.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> 
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include &quot;TiledBackingStore.h&quot;
</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&lt;LayoutPhase&gt; layoutPhaseRestorer(m_layoutPhase, InPreLayout);
</del><ins>+    SetForScope&lt;LayoutPhase&gt; layoutPhaseRestorer(m_layoutPhase, InPreLayout);
</ins><span class="cx"> 
</span><span class="cx">     // Every scroll that happens during layout is programmatic.
</span><del>-    TemporaryChange&lt;bool&gt; changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</del><ins>+        SetForScope&lt;bool&gt; changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</ins><span class="cx"> 
</span><span class="cx">         if (!m_nestedLayoutCount &amp;&amp; !m_inSynchronousPostLayout &amp;&amp; m_postLayoutTasksTimer.isActive() &amp;&amp; !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&lt;bool&gt; inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</del><ins>+            SetForScope&lt;bool&gt; 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&lt;bool&gt; changeSchedulingEnabled(m_layoutSchedulingEnabled, false);
</del><ins>+        SetForScope&lt;bool&gt; 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&lt;bool&gt; inSynchronousPostLayoutChange(m_inSynchronousPostLayout, true);
</del><ins>+                SetForScope&lt;bool&gt; 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&amp; scrollPosition)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &amp;&amp; page-&gt;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&lt;IntRect*&gt; windowClipRectCache(m_cachedWindowClipRect, &amp;windowClipRect);
</del><ins>+    SetForScope&lt;IntRect*&gt; windowClipRectCache(m_cachedWindowClipRect, &amp;windowClipRect);
</ins><span class="cx">     for (Frame* childFrame = frame().tree().firstChild(); childFrame; childFrame = childFrame-&gt;tree().nextSibling()) {
</span><span class="cx">         if (auto* childView = childFrame-&gt;view())
</span><span class="cx">             childView-&gt;applyRecursivelyWithVisibleRect(apply);
</span><span class="lines">@@ -3539,7 +3539,7 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(Layout, &quot;FrameView %p autoSizeIfEnabled&quot;, this);
</span><span class="cx"> 
</span><del>-    TemporaryChange&lt;bool&gt; changeInAutoSize(m_inAutoSize, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;inspector/InspectorValues.h&gt;
</span><span class="cx"> #include &lt;inspector/ScriptCallStack.h&gt;
</span><span class="cx"> #include &lt;inspector/ScriptCallStackFactory.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> #include &lt;wtf/text/TextPosition.h&gt;
</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&amp; headers, ReportParsingErrors reportParsingErrors)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; isReportingEnabled(m_isReportingEnabled, reportParsingErrors == ReportParsingErrors::Yes);
</del><ins>+    SetForScope&lt;bool&gt; isReportingEnabled(m_isReportingEnabled, reportParsingErrors == ReportParsingErrors::Yes);
</ins><span class="cx">     for (auto&amp; 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 &quot;ScrollingTreeOverflowScrollingNode.h&quot;
</span><span class="cx"> #include &quot;ScrollingTreeScrollingNode.h&quot;
</span><span class="cx"> #include &quot;TextStream.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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-&gt;requestedScrollPositionRepresentsProgrammaticScroll() : false;
</span><del>-    TemporaryChange&lt;bool&gt; changeHandlingProgrammaticScroll(m_isHandlingProgrammaticScroll, scrollRequestIsProgammatic);
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/SystemTracing.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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&amp; commitState, float pageScaleFactor, const FloatPoint&amp; positionRelativeToBase)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; committingChangesChange(m_isCommittingChanges, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; committingChangesChange(m_isCommittingChanges, true);
</del><ins>+    SetForScope&lt;bool&gt; committingChangesChange(m_isCommittingChanges, true);
</ins><span class="cx"> 
</span><span class="cx">     if (m_uncommittedChanges &amp; 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&lt;&gt;
</del><ins>+// Based on WTF::SetForScope&lt;&gt;
</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 &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CAIRO)
</span><span class="cx"> #include &quot;CairoUtilities.h&quot;
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     const BitmapTextureGL&amp; textureGL = static_cast&lt;const BitmapTextureGL&amp;&gt;(texture);
</span><del>-    TemporaryChange&lt;const BitmapTextureGL::FilterInfo*&gt; filterInfo(data().filterInfo, textureGL.filterInfo());
</del><ins>+    SetForScope&lt;const BitmapTextureGL::FilterInfo*&gt; 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 &quot;ScrollableArea.h&quot;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #ifndef NDEBUG
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #endif
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</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&lt;bool&gt; updateModeProtector(m_isPurging, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/SystemTracing.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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 &quot;GtkVersioning.h&quot;
</span><span class="cx"> #include &quot;SelectionData.h&quot;
</span><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/glib/GUniquePtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</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(), &amp;numberOfTargets);
</span><span class="cx"> 
</span><span class="cx">     if (numberOfTargets &gt; 0 &amp;&amp; table) {
</span><del>-        TemporaryChange&lt;SelectionData*&gt; change(settingClipboardSelection, const_cast&lt;SelectionData*&gt;(&amp;selection));
</del><ins>+        SetForScope&lt;SelectionData*&gt; change(settingClipboardSelection, const_cast&lt;SelectionData*&gt;(&amp;selection));
</ins><span class="cx">         auto data = std::make_unique&lt;ClipboardSetData&gt;(*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 &lt;wtf/BlockObjCExceptions.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</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&lt;bool&gt; isCurrentlyDrawingIntoLayer(g_isCurrentlyDrawingIntoLayer, context.isCALayerContext());
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #include &lt;wtf/Optional.h&gt;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StackStats.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</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 &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;TransformState.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;size_t&gt; positionChange(m_insertionPosition, m_mapping.size());
</del><ins>+    SetForScope&lt;size_t&gt; positionChange(m_insertionPosition, m_mapping.size());
</ins><span class="cx">     do {
</span><span class="cx">         renderer = renderer-&gt;pushMappingToContainer(ancestorRenderer, *this);
</span><span class="cx">     } while (renderer &amp;&amp; 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 &amp; ~UseTransforms;
</span><del>-    TemporaryChange&lt;MapCoordinatesFlags&gt; flagsChange(m_mapCoordinatesFlags, newFlags);
</del><ins>+    SetForScope&lt;MapCoordinatesFlags&gt; flagsChange(m_mapCoordinatesFlags, newFlags);
</ins><span class="cx"> 
</span><span class="cx">     const RenderLayerModelObject&amp; renderer = layer-&gt;renderer();
</span><span class="cx"> 
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">             pushMappingsToAncestor(&amp;ancestorLayer-&gt;renderer(), nullptr);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        TemporaryChange&lt;size_t&gt; positionChange(m_insertionPosition, m_mapping.size());
</del><ins>+        SetForScope&lt;size_t&gt; positionChange(m_insertionPosition, m_mapping.size());
</ins><span class="cx">         push(&amp;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&lt;&gt; but it doesn't work with bitfields.
</del><ins>+        // FIXME: would like to use SetForScope&lt;&gt; 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-&gt;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 &quot;TiledBacking.h&quot;
</span><span class="cx"> #include &quot;TransformState.h&quot;
</span><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx"> 
</span><span class="cx">     AnimationUpdateBlock animationUpdateBlock(&amp;m_renderView.frameView().frame().animation());
</span><span class="cx"> 
</span><del>-    TemporaryChange&lt;bool&gt; postLayoutChange(m_inPostLayoutUpdate, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyleInheritedData.h&quot;
</span><span class="cx"> #include &quot;TransformState.h&quot;
</span><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/StackStats.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</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&lt;bool&gt; hitTestRestorer { m_inHitTesting, true };
</del><ins>+    SetForScope&lt;bool&gt; 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 &quot;Page.h&quot;
</span><span class="cx"> #include &quot;ReplayingInputCursor.h&quot;
</span><span class="cx"> #include &quot;WebReplayInputs.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     {
</span><del>-        TemporaryChange&lt;bool&gt; change(m_dispatching, true);
</del><ins>+        SetForScope&lt;bool&gt; change(m_dispatching, true);
</ins><span class="cx">         m_currentWork.input-&gt;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 &quot;config.h&quot;
</span><span class="cx"> #include &quot;StorageMap.h&quot;
</span><span class="cx"> 
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;StorageMap&gt; StorageMap::setItemIgnoringQuota(const String&amp; key, const String&amp; value)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;unsigned&gt; quotaSizeChange(m_quotaSize, noQuota);
</del><ins>+    SetForScope&lt;unsigned&gt; 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 &quot;AnimationUtilities.h&quot;
</span><span class="cx"> #include &quot;SVGPathSeg.h&quot;
</span><span class="cx"> #include &quot;SVGPathSource.h&quot;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;unsigned&gt; change(m_addTypesCount, repeatCount);
</del><ins>+    SetForScope&lt;unsigned&gt; 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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;achristensen@webkit.org&gt;
</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 &lt;WebCore/SubresourceLoader.h&gt;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;utatane.tea@gmail.com&gt;
</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 &lt;wtf/RefCountedLeakCounter.h&gt;
</span><span class="cx"> #import &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #import &lt;wtf/RunLoop.h&gt;
</span><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #import &lt;wtf/StdLibExtras.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><span class="cx"> #import &lt;wtf/spi/darwin/dyldSPI.h&gt;
</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-&gt;_isUpdatingTextTouchBar)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    TemporaryChange&lt;BOOL&gt; isUpdatingTextTouchBar(_private-&gt;_isUpdatingTextTouchBar, YES);
</del><ins>+    SetForScope&lt;BOOL&gt; isUpdatingTextTouchBar(_private-&gt;_isUpdatingTextTouchBar, YES);
</ins><span class="cx"> 
</span><span class="cx">     if (!_private-&gt;_textTouchBarItemController)
</span><span class="cx">         _private-&gt;_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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;bfulgham@apple.com&gt;
</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 &lt;WebCore/HTTPHeaderMap.h&gt;
</span><span class="cx"> #include &lt;WebCore/IdentifierRep.h&gt;
</span><span class="cx"> #include &lt;WebCore/NotImplemented.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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 &quot;PluginProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcessConnectionMessages.h&quot;
</span><span class="cx"> #include &lt;unistd.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&amp; connection, IPC::Decoder&amp; decoder)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;IPC::Connection*&gt; currentConnectionChange(currentConnection, &amp;connection);
</del><ins>+    SetForScope&lt;IPC::Connection*&gt; currentConnectionChange(currentConnection, &amp;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&amp; connection, IPC::Decoder&amp; decoder, std::unique_ptr&lt;IPC::Encoder&gt;&amp; replyEncoder)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;IPC::Connection*&gt; currentConnectionChange(currentConnection, &amp;connection);
</del><ins>+    SetForScope&lt;IPC::Connection*&gt; currentConnectionChange(currentConnection, &amp;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 &quot;_WKRemoteObjectInterfaceInternal.h&quot;
</span><span class="cx"> #import &lt;objc/runtime.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #import &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> static const char* const classNameKey = &quot;$class&quot;;
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx">         return nil;
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;API::Dictionary&gt; dictionary = API::Dictionary::create();
</span><del>-    TemporaryChange&lt;API::Dictionary*&gt; dictionaryChange(encoder-&gt;_currentDictionary, dictionary.ptr());
</del><ins>+    SetForScope&lt;API::Dictionary*&gt; dictionaryChange(encoder-&gt;_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&lt;const API::Dictionary*&gt; dictionaryChange(decoder-&gt;_currentDictionary, dictionary);
</del><ins>+    SetForScope&lt;const API::Dictionary*&gt; dictionaryChange(decoder-&gt;_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&lt;const HashSet&lt;Class&gt;*&gt; allowedClassesChange(decoder-&gt;_allowedClasses, &amp;allowedClasses);
</del><ins>+    SetForScope&lt;const HashSet&lt;Class&gt;*&gt; allowedClassesChange(decoder-&gt;_allowedClasses, &amp;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 &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> #import &lt;wtf/Optional.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #import &lt;wtf/spi/darwin/dyldSPI.h&gt;
</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&lt;BOOL&gt; insetAdjustmentGuard(_currentlyAdjustingScrollViewInsetsForKeyboard, YES);
</del><ins>+        SetForScope&lt;BOOL&gt; insetAdjustmentGuard(_currentlyAdjustingScrollViewInsetsForKeyboard, YES);
</ins><span class="cx">         [_scrollView _adjustForAutomaticKeyboardInfo:keyboardInfo animated:YES lastAdjustment:&amp;_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 &lt;WebKitSystemInterface.h&gt;
</span><span class="cx"> #import &lt;sys/stat.h&gt;
</span><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if HAVE(TOUCH_BAR) &amp;&amp; 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&lt;bool&gt; isUpdatingTextFunctionBar(m_isUpdatingTextTouchBar, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;UIKit/UIPanGestureRecognizer.h&gt;
</span><span class="cx"> #import &lt;UIKit/UIScrollView.h&gt;
</span><span class="cx"> #import &lt;wtf/BlockObjCExceptions.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> #import &lt;WebCore/AxisScrollSnapOffsets.h&gt;
</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&lt;bool&gt; updatingChange(m_updatingFromStateNode, true);
</del><ins>+    SetForScope&lt;bool&gt; updatingChange(m_updatingFromStateNode, true);
</ins><span class="cx"> 
</span><span class="cx">     const auto&amp; scrollingStateNode = downcast&lt;ScrollingStateOverflowScrollingNode&gt;(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 &quot;WebFrameProxy.h&quot;
</span><span class="cx"> #include &quot;WebSelectionData.h&quot;
</span><span class="cx"> #include &lt;WebCore/PlatformPasteboard.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&amp; pasteboardName, const WebSelectionData&amp; selection)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;WebFrameProxy*&gt; frameWritingToClipboard(m_frameWritingToClipboard, m_primarySelectionOwner);
</del><ins>+    SetForScope&lt;WebFrameProxy*&gt; 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 &lt;WebCore/InspectorController.h&gt;
</span><span class="cx"> #include &lt;WebCore/MainFrame.h&gt;
</span><span class="cx"> #include &lt;WebCore/Page.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</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&lt;bool&gt; protector(m_isFlushingLayerChanges, true);
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; purgingToggle(m_isPurging, true);
</del><ins>+    SetForScope&lt;bool&gt; purgingToggle(m_isPurging, true);
</ins><span class="cx"> 
</span><span class="cx">     for (auto&amp; registeredLayer : m_registeredLayers.values())
</span><span class="cx">         registeredLayer-&gt;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 &lt;runtime/JSLock.h&gt;
</span><span class="cx"> #include &lt;runtime/SamplingProfiler.h&gt;
</span><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx"> #include &quot;DataDetectionResult.h&quot;
</span><span class="lines">@@ -2238,7 +2238,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::mouseEvent(const WebMouseEvent&amp; mouseEvent)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+    SetForScope&lt;bool&gt; 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&amp; keyboardEvent)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+    SetForScope&lt;bool&gt; 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&amp; touchEvent, bool&amp; handled)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+    SetForScope&lt;bool&gt; 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&lt;bool&gt; userIsInteractingChange { m_userIsInteracting, true };
</del><ins>+    SetForScope&lt;bool&gt; userIsInteractingChange { m_userIsInteracting, true };
</ins><span class="cx"> 
</span><span class="cx">     Frame&amp; frame = m_page-&gt;focusController().focusedOrMainFrame();
</span><span class="cx">     frame.document()-&gt;setFocusedElement(0);
</span><span class="lines">@@ -4642,7 +4642,7 @@
</span><span class="cx">     if (replacementEditingRange.location != notFound) {
</span><span class="cx">         RefPtr&lt;Range&gt; replacementRange = rangeFromEditingRange(frame, replacementEditingRange, static_cast&lt;EditingRangeIsRelativeTo&gt;(editingRangeIsRelativeTo));
</span><span class="cx">         if (replacementRange) {
</span><del>-            TemporaryChange&lt;bool&gt; isSelectingTextWhileInsertingAsynchronously(m_isSelectingTextWhileInsertingAsynchronously, suppressSelectionUpdate);
</del><ins>+            SetForScope&lt;bool&gt; 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 &lt;WebCore/WKContentObservation.h&gt;
</span><span class="cx"> #import &lt;WebCore/WebEvent.h&gt;
</span><span class="cx"> #import &lt;wtf/MathExtras.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</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&amp; minimumLayoutSize, const WebCore::FloatSize&amp; maximumUnobscuredSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double targetScale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;bool&gt; dynamicSizeUpdateGuard(m_inDynamicSizeUpdate, true);
</del><ins>+    SetForScope&lt;bool&gt; 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 &lt;WebCore/FrameView.h&gt;
</span><span class="cx"> #import &lt;WebCore/MainFrame.h&gt;
</span><span class="cx"> #import &lt;WebCore/Page.h&gt;
</span><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #import &lt;wtf/SystemTracing.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</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 &lt;WebCore/WindowsKeyboardCodes.h&gt;
</span><span class="cx"> #import &lt;WebCore/htmlediting.h&gt;
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><del>-#import &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#import &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx"> #include &lt;WebCore/MediaPlaybackTargetMac.h&gt;
</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  &lt;utatane.tea@gmail.com&gt;
+
+        [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  &lt;ap@apple.com&gt;
</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 = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0766DD1F1A5AD5200023E3BB /* PendingAPIRequestURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PendingAPIRequestURL.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0BCD833414857CE400EA2003 /* HashMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemporaryChange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                0BCD85691485C98B00EA2003 /* SetForScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SetForScope.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformUtilitiesCocoa.mm; path = cocoa/PlatformUtilitiesCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F139E751A423A5300F590F5 /* WeakObjCPtr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WeakObjCPtr.mm; path = cocoa/WeakObjCPtr.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreStatisticsWithNoWebProcess.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</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 &quot;config.h&quot;
+
+#include &lt;wtf/SetForScope.h&gt;
+
+namespace TestWebKitAPI {
+
+TEST(WTF, SetForScopeNested)
+{
+    bool originallyFalse = false;
+    {
+        SetForScope&lt;bool&gt; change1OriginallyFalse(originallyFalse, true);
+        EXPECT_TRUE(originallyFalse);
+        {
+            SetForScope&lt;bool&gt; 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 &quot;config.h&quot;
-
-#include &lt;wtf/TemporaryChange.h&gt;
-
-namespace TestWebKitAPI {
-
-TEST(WTF, TemporaryChangeNested)
-{
-    bool originallyFalse = false;
-    {
-        TemporaryChange&lt;bool&gt; change1OriginallyFalse(originallyFalse, true);
-        EXPECT_TRUE(originallyFalse);
-        {
-            TemporaryChange&lt;bool&gt; 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 &lt;wtf/MainThread.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><del>-#include &lt;wtf/TemporaryChange.h&gt;
</del><ins>+#include &lt;wtf/SetForScope.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</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&amp; options)
</span><span class="cx"> {
</span><del>-    TemporaryChange&lt;State&gt; changeState(m_state, Resetting);
</del><ins>+    SetForScope&lt;State&gt; 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>