<!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>[211403] trunk/Source</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/211403">211403</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2017-01-30 19:37:34 -0800 (Mon, 30 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>JSDOMBinding is too big. Split it up!
https://bugs.webkit.org/show_bug.cgi?id=167601
Reviewed by Darin Adler.
Source/WebCore:
Splits JSDOMBinding.h/cpp up a bit by splitting out:
- JSDOMBindingCaller.h
- JSDOMBindingSecurity.h/cpp
- JSDOMExceptionHandling.h/cpp
- JSDOMWrapperCache.h/cpp
Also:
- Moves all constructor objects to JSDOMConstructor.h/cpp,
- Moves special DOMWindow accessors to JSDOMWindowBase.
- Deletes unused CallbackFunction.h/cpp
* CMakeLists.txt:
* Modules/webdatabase/Database.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CallbackFunction.cpp: Removed.
* bindings/js/CallbackFunction.h: Removed.
* bindings/js/DOMConstructorWithDocument.h: Removed.
* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSCustomXPathNSResolver.cpp:
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMBindingCaller.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
* bindings/js/JSDOMBindingSecurity.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMBindingSecurity.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
* bindings/js/JSDOMConstructor.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMConstructor.h:
* bindings/js/JSDOMConvert.h:
* bindings/js/JSDOMExceptionHandling.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMExceptionHandling.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::callerDOMWindow): Moved from JSDOMBinding.h
(WebCore::activeDOMWindow): Moved from JSDOMBinding.h
(WebCore::firstDOMWindow): Moved from JSDOMBinding.h
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDOMWindowProperties.cpp:
* bindings/js/JSDOMWrapperCache.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
* bindings/js/JSDOMWrapperCache.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
* bindings/js/JSEventTargetCustom.h:
* bindings/js/JSHTMLElementCustom.cpp:
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
* bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSWorkerCustom.cpp:
* bindings/js/JSXPathNSResolverCustom.cpp:
* bindings/js/ScheduledAction.cpp:
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* bindings/js/ScriptGlobalObject.cpp:
(WebCore::ScriptGlobalObject::set):
* bindings/js/StructuredClone.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateCallWith):
(GenerateParametersCheck):
(GenerateCallbackImplementationContent):
(NativeToJSValue):
* bridge/objc/WebScriptObject.mm:
* html/HTMLFrameElementBase.cpp:
* html/HTMLVideoElement.cpp:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/PageScriptDebugServer.cpp:
* inspector/WorkerScriptDebugServer.cpp:
Source/WebKit2:
* Shared/WebCoreArgumentCoders.cpp:
Replace include of JSDOMBinding with JSDOMExceptionHandling.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabasecpp">trunk/Source/WebCore/Modules/webdatabase/Database.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCustomXPathNSResolvercpp">trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorh">trunk/Source/WebCore/bindings/js/JSDOMConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConverth">trunk/Source/WebCore/bindings/js/JSDOMConvert.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBaseh">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowPropertiescpp">trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSEventTargetCustomh">trunk/Source/WebCore/bindings/js/JSEventTargetCustom.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSLocationCustomcpp">trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp">trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSQLStatementErrorCallbackCustomcpp">trunk/Source/WebCore/bindings/js/JSSQLStatementErrorCallbackCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSStorageCustomcpp">trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerCustomcpp">trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSXPathNSResolverCustomcpp">trunk/Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScheduledActioncpp">trunk/Source/WebCore/bindings/js/ScheduledAction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllerh">trunk/Source/WebCore/bindings/js/ScriptController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptGlobalObjectcpp">trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsStructuredClonecpp">trunk/Source/WebCore/bindings/js/StructuredClone.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSInterfaceNamecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsStringifiercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionWithTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestDOMJITcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceLeadingUnderscorecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestIterablecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializationcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebridgeobjcWebScriptObjectmm">trunk/Source/WebCore/bridge/objc/WebScriptObject.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameElementBasecpp">trunk/Source/WebCore/html/HTMLFrameElementBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementcpp">trunk/Source/WebCore/html/HTMLVideoElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageScriptDebugServercpp">trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerScriptDebugServercpp">trunk/Source/WebCore/inspector/WorkerScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkitmessagespy">trunk/Source/WebKit2/Scripts/webkit/messages.py</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingCallerh">trunk/Source/WebCore/bindings/js/JSDOMBindingCaller.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingSecuritycpp">trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingSecurityh">trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorcpp">trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMExceptionHandlingcpp">trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMExceptionHandlingh">trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWrapperCachecpp">trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWrapperCacheh">trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsCallbackFunctioncpp">trunk/Source/WebCore/bindings/js/CallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCallbackFunctionh">trunk/Source/WebCore/bindings/js/CallbackFunction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsDOMConstructorWithDocumenth">trunk/Source/WebCore/bindings/js/DOMConstructorWithDocument.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1069,7 +1069,6 @@
</span><span class="cx">
</span><span class="cx"> bindings/js/CachedModuleScriptLoader.cpp
</span><span class="cx"> bindings/js/CachedScriptFetcher.cpp
</span><del>- bindings/js/CallbackFunction.cpp
</del><span class="cx"> bindings/js/CommonVM.cpp
</span><span class="cx"> bindings/js/DOMWrapperWorld.cpp
</span><span class="cx"> bindings/js/GCController.cpp
</span><span class="lines">@@ -1100,6 +1099,9 @@
</span><span class="cx"> bindings/js/JSCustomEventCustom.cpp
</span><span class="cx"> bindings/js/JSCustomXPathNSResolver.cpp
</span><span class="cx"> bindings/js/JSDOMBinding.cpp
</span><ins>+ bindings/js/JSDOMBindingSecurity.cpp
+ bindings/js/JSDOMConstructor.cpp
+ bindings/js/JSDOMExceptionHandling.cpp
</ins><span class="cx"> bindings/js/JSDOMGlobalObject.cpp
</span><span class="cx"> bindings/js/JSDOMGlobalObjectTask.cpp
</span><span class="cx"> bindings/js/JSDOMPromise.cpp
</span><span class="lines">@@ -1109,6 +1111,7 @@
</span><span class="cx"> bindings/js/JSDOMWindowProperties.cpp
</span><span class="cx"> bindings/js/JSDOMWindowShell.cpp
</span><span class="cx"> bindings/js/JSDOMWrapper.cpp
</span><ins>+ bindings/js/JSDOMWrapperCache.cpp
</ins><span class="cx"> bindings/js/JSDocumentCustom.cpp
</span><span class="cx"> bindings/js/JSDocumentFragmentCustom.cpp
</span><span class="cx"> bindings/js/JSElementCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/ChangeLog        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1,3 +1,76 @@
</span><ins>+2017-01-30 Sam Weinig <sam@webkit.org>
+
+ JSDOMBinding is too big. Split it up!
+ https://bugs.webkit.org/show_bug.cgi?id=167601
+
+ Reviewed by Darin Adler.
+
+ Splits JSDOMBinding.h/cpp up a bit by splitting out:
+ - JSDOMBindingCaller.h
+ - JSDOMBindingSecurity.h/cpp
+ - JSDOMExceptionHandling.h/cpp
+ - JSDOMWrapperCache.h/cpp
+
+ Also:
+ - Moves all constructor objects to JSDOMConstructor.h/cpp,
+ - Moves special DOMWindow accessors to JSDOMWindowBase.
+ - Deletes unused CallbackFunction.h/cpp
+
+ * CMakeLists.txt:
+ * Modules/webdatabase/Database.cpp:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/CallbackFunction.cpp: Removed.
+ * bindings/js/CallbackFunction.h: Removed.
+ * bindings/js/DOMConstructorWithDocument.h: Removed.
+ * bindings/js/JSCryptoCustom.cpp:
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ * bindings/js/JSDOMBinding.cpp:
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMBindingCaller.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
+ * bindings/js/JSDOMBindingSecurity.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+ * bindings/js/JSDOMBindingSecurity.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
+ * bindings/js/JSDOMConstructor.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+ * bindings/js/JSDOMConstructor.h:
+ * bindings/js/JSDOMConvert.h:
+ * bindings/js/JSDOMExceptionHandling.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+ * bindings/js/JSDOMExceptionHandling.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::callerDOMWindow): Moved from JSDOMBinding.h
+ (WebCore::activeDOMWindow): Moved from JSDOMBinding.h
+ (WebCore::firstDOMWindow): Moved from JSDOMBinding.h
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ * bindings/js/JSDOMWindowProperties.cpp:
+ * bindings/js/JSDOMWrapperCache.cpp: Copied from Source/WebCore/bindings/js/JSDOMBinding.cpp.
+ * bindings/js/JSDOMWrapperCache.h: Copied from Source/WebCore/bindings/js/JSDOMBinding.h.
+ * bindings/js/JSEventTargetCustom.h:
+ * bindings/js/JSHTMLElementCustom.cpp:
+ * bindings/js/JSLocationCustom.cpp:
+ * bindings/js/JSMutationObserverCustom.cpp:
+ * bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
+ * bindings/js/JSStorageCustom.cpp:
+ * bindings/js/JSWorkerCustom.cpp:
+ * bindings/js/JSXPathNSResolverCustom.cpp:
+ * bindings/js/ScheduledAction.cpp:
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptGlobalObject.cpp:
+ (WebCore::ScriptGlobalObject::set):
+ * bindings/js/StructuredClone.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+ (GenerateCallWith):
+ (GenerateParametersCheck):
+ (GenerateCallbackImplementationContent):
+ (NativeToJSValue):
+ * bridge/objc/WebScriptObject.mm:
+ * html/HTMLFrameElementBase.cpp:
+ * html/HTMLVideoElement.cpp:
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorDOMAgent.cpp:
+ * inspector/PageScriptDebugServer.cpp:
+ * inspector/WorkerScriptDebugServer.cpp:
+
</ins><span class="cx"> 2017-01-30 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [QuickLook] FrameLoaderClient should return the new QuickLookHandleClient it creates
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include "DatabaseThread.h"
</span><span class="cx"> #include "DatabaseTracker.h"
</span><span class="cx"> #include "Document.h"
</span><ins>+#include "ExceptionCode.h"
</ins><span class="cx"> #include "JSDOMWindow.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "SQLError.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -2837,6 +2837,14 @@
</span><span class="cx">                 7C3E510B18DF8F3500C112F7 /* HTMLConverter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C3E510918DF8F3500C112F7 /* HTMLConverter.mm */; };
</span><span class="cx">                 7C3F01C11C8E5ABA00ADD962 /* UserContentProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C3F01C01C8E5AB100ADD962 /* UserContentProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C3F01C21C8E5AC200ADD962 /* UserContentProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F01BF1C8E5AB100ADD962 /* UserContentProvider.cpp */; };
</span><ins>+                7C45C9CF1E3EFDF700AAB558 /* JSDOMBindingSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */; };
+                7C45C9D01E3EFDFB00AAB558 /* JSDOMWrapperCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */; };
+                7C45C9D11E3EFE0500AAB558 /* JSDOMConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */; };
+                7C45C9D21E3EFE0800AAB558 /* JSDOMExceptionHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */; };
+                7C45C9D31E3FCBD700AAB558 /* JSDOMWrapperCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C81E3E8B5100AAB558 /* JSDOMWrapperCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C45C9D41E3FCBDF00AAB558 /* JSDOMBindingSecurity.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C45C9D51E3FCBE400AAB558 /* JSDOMBindingCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C61E3E8ABA00AAB558 /* JSDOMBindingCaller.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                7C45C9D61E3FCBF800AAB558 /* JSDOMExceptionHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C71E3E8AFF00AAB558 /* JSDOMExceptionHandling.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 7C48A6D0191C9D6500026674 /* WebKitNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C48A6CE191C9D6500026674 /* WebKitNamespace.cpp */; };
</span><span class="cx">                 7C48A6D1191C9D6500026674 /* WebKitNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C48A6CF191C9D6500026674 /* WebKitNamespace.h */; };
</span><span class="cx">                 7C4C96DC1AD4483500365A50 /* JSReadableStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96D81AD4483500365A50 /* JSReadableStream.cpp */; };
</span><span class="lines">@@ -4564,10 +4572,8 @@
</span><span class="cx">                 B10B6980140C174000BC1C26 /* WebVTTToken.h in Headers */ = {isa = PBXBuildFile; fileRef = B10B697D140C174000BC1C26 /* WebVTTToken.h */; };
</span><span class="cx">                 B10B6981140C174000BC1C26 /* WebVTTTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B10B697E140C174000BC1C26 /* WebVTTTokenizer.cpp */; };
</span><span class="cx">                 B10B6982140C174000BC1C26 /* WebVTTTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = B10B697F140C174000BC1C26 /* WebVTTTokenizer.h */; };
</span><del>-                B1827493134CA4C100B98C2D /* CallbackFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1827492134CA4C100B98C2D /* CallbackFunction.cpp */; };
</del><span class="cx">                 B1AD4E7313A12A4600846B27 /* TextTrackLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1AD4E7113A12A4600846B27 /* TextTrackLoader.cpp */; };
</span><span class="cx">                 B1AD4E7413A12A4600846B27 /* TextTrackLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B1AD4E7213A12A4600846B27 /* TextTrackLoader.h */; };
</span><del>-                B1D5ECB5134B58DA0087C78F /* CallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */; };
</del><span class="cx">                 B20111070AB7740500DB0E68 /* JSSVGAElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */; };
</span><span class="cx">                 B20111080AB7740500DB0E68 /* JSSVGAElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B20111060AB7740500DB0E68 /* JSSVGAElement.h */; };
</span><span class="cx">                 B22279640D00BF220071B782 /* GradientAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = B22277CD0D00BF1F0071B782 /* GradientAttributes.h */; };
</span><span class="lines">@@ -5140,7 +5146,6 @@
</span><span class="cx">                 B543B85717EB758F003BE93A /* SVGPropertyInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B543B85617EB758F003BE93A /* SVGPropertyInfo.cpp */; };
</span><span class="cx">                 B562DB6017D3CD630010AF96 /* HTMLElementTypeHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = B562DB5E17D3CD560010AF96 /* HTMLElementTypeHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 B562DB6117D3CD660010AF96 /* SVGElementTypeHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */; };
</span><del>-                B56576E817DA94E200A56BDC /* DOMConstructorWithDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = B56576E717DA94E200A56BDC /* DOMConstructorWithDocument.h */; };
</del><span class="cx">                 B56579B51824D12A00E79F23 /* RenderChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = B56579B41824D12A00E79F23 /* RenderChildIterator.h */; };
</span><span class="cx">                 B57CB52D182A3EED0079A647 /* InlineElementBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B57CB52C182A3EED0079A647 /* InlineElementBox.cpp */; };
</span><span class="cx">                 B57CB52E182A3EFC0079A647 /* InlineElementBox.h in Headers */ = {isa = PBXBuildFile; fileRef = B57CB52B182A37F60079A647 /* InlineElementBox.h */; };
</span><span class="lines">@@ -10364,6 +10369,14 @@
</span><span class="cx">                 7C3F01C01C8E5AB100ADD962 /* UserContentProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserContentProvider.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C4189AB1B07C170000FA757 /* GlobalEventHandlers.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GlobalEventHandlers.idl; sourceTree = "<group>"; };
</span><span class="cx">                 7C4189AC1B07CBF2000FA757 /* WindowEventHandlers.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WindowEventHandlers.idl; sourceTree = "<group>"; };
</span><ins>+                7C45C9C61E3E8ABA00AAB558 /* JSDOMBindingCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMBindingCaller.h; sourceTree = "<group>"; };
+                7C45C9C71E3E8AFF00AAB558 /* JSDOMExceptionHandling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMExceptionHandling.h; sourceTree = "<group>"; };
+                7C45C9C81E3E8B5100AAB558 /* JSDOMWrapperCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWrapperCache.h; sourceTree = "<group>"; };
+                7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMBindingSecurity.h; sourceTree = "<group>"; };
+                7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMBindingSecurity.cpp; sourceTree = "<group>"; };
+                7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWrapperCache.cpp; sourceTree = "<group>"; };
+                7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMExceptionHandling.cpp; sourceTree = "<group>"; };
+                7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConstructor.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 7C48A6CE191C9D6500026674 /* WebKitNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitNamespace.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C48A6CF191C9D6500026674 /* WebKitNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNamespace.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C48A6D2191C9D8E00026674 /* WebKitNamespace.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebKitNamespace.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -12336,12 +12349,10 @@
</span><span class="cx">                 B10B697D140C174000BC1C26 /* WebVTTToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTToken.h; sourceTree = "<group>"; };
</span><span class="cx">                 B10B697E140C174000BC1C26 /* WebVTTTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTTokenizer.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B10B697F140C174000BC1C26 /* WebVTTTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTTokenizer.h; sourceTree = "<group>"; };
</span><del>-                B1827492134CA4C100B98C2D /* CallbackFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallbackFunction.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceRegistry.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B1A942E215B5CE2200D525D1 /* MediaSourceRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceRegistry.h; sourceTree = "<group>"; };
</span><span class="cx">                 B1AD4E7113A12A4600846B27 /* TextTrackLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextTrackLoader.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B1AD4E7213A12A4600846B27 /* TextTrackLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackLoader.h; sourceTree = "<group>"; };
</span><del>-                B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallbackFunction.h; sourceTree = "<group>"; };
</del><span class="cx">                 B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGAElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 B20111060AB7740500DB0E68 /* JSSVGAElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGAElement.h; sourceTree = "<group>"; };
</span><span class="cx">                 B22277CD0D00BF1F0071B782 /* GradientAttributes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GradientAttributes.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -13055,7 +13066,6 @@
</span><span class="cx">                 B562DB5E17D3CD560010AF96 /* HTMLElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLElementTypeHelpers.h; sourceTree = "<group>"; };
</span><span class="cx">                 B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGElementTypeHelpers.h; sourceTree = "<group>"; };
</span><span class="cx">                 B56576E417DA599F00A56BDC /* JSMainThreadExecStateInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMainThreadExecStateInstrumentation.h; sourceTree = "<group>"; };
</span><del>-                B56576E717DA94E200A56BDC /* DOMConstructorWithDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMConstructorWithDocument.h; sourceTree = "<group>"; };
</del><span class="cx">                 B56579B41824D12A00E79F23 /* RenderChildIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderChildIterator.h; sourceTree = "<group>"; };
</span><span class="cx">                 B57CB52B182A37F60079A647 /* InlineElementBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineElementBox.h; sourceTree = "<group>"; };
</span><span class="cx">                 B57CB52C182A3EED0079A647 /* InlineElementBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineElementBox.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -22142,7 +22152,6 @@
</span><span class="cx">                                 BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */,
</span><span class="cx">                                 0F60F3291DFBB10400416D6C /* CommonVM.cpp */,
</span><span class="cx">                                 0F60F32A1DFBB10400416D6C /* CommonVM.h */,
</span><del>-                                B56576E717DA94E200A56BDC /* DOMConstructorWithDocument.h */,
</del><span class="cx">                                 BC53DA471143134D000D817E /* DOMWrapperWorld.cpp */,
</span><span class="cx">                                 BC53DA2D1143121E000D817E /* DOMWrapperWorld.h */,
</span><span class="cx">                                 1432E8480C51493F00B1500F /* GCController.cpp */,
</span><span class="lines">@@ -22161,8 +22170,14 @@
</span><span class="cx">                                 9BD4E9151C462872005065BC /* JSCustomElementInterface.h */,
</span><span class="cx">                                 93B70D4709EB0C7C009D8468 /* JSDOMBinding.cpp */,
</span><span class="cx">                                 93B70D4809EB0C7C009D8468 /* JSDOMBinding.h */,
</span><ins>+                                7C45C9C61E3E8ABA00AAB558 /* JSDOMBindingCaller.h */,
+                                7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */,
+                                7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */,
+                                7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */,
</ins><span class="cx">                                 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
</span><span class="cx">                                 930841331CDDB15500B0958C /* JSDOMConvert.h */,
</span><ins>+                                7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */,
+                                7C45C9C71E3E8AFF00AAB558 /* JSDOMExceptionHandling.h */,
</ins><span class="cx">                                 E1C36CBC0EB08062007410BC /* JSDOMGlobalObject.cpp */,
</span><span class="cx">                                 E1C36C020EB076D6007410BC /* JSDOMGlobalObject.h */,
</span><span class="cx">                                 7C2BDD3B17C7F98B0038FF15 /* JSDOMGlobalObjectTask.cpp */,
</span><span class="lines">@@ -22179,6 +22194,8 @@
</span><span class="cx">                                 BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */,
</span><span class="cx">                                 4170A2E91D8C0CC000318452 /* JSDOMWrapper.cpp */,
</span><span class="cx">                                 65E0E9431133C89F00B4CB10 /* JSDOMWrapper.h */,
</span><ins>+                                7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */,
+                                7C45C9C81E3E8B5100AAB558 /* JSDOMWrapperCache.h */,
</ins><span class="cx">                                 E3A5872E1DC3F52600F607A6 /* JSDynamicDowncast.h */,
</span><span class="cx">                                 BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */,
</span><span class="cx">                                 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */,
</span><span class="lines">@@ -22575,8 +22592,6 @@
</span><span class="cx">                 BCCE58A71061E82F008FB35A /* Callback Objects */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                B1827492134CA4C100B98C2D /* CallbackFunction.cpp */,
-                                B1D5ECB4134B58DA0087C78F /* CallbackFunction.h */,
</del><span class="cx">                                 1449E286107D4DB400B5793F /* JSCallbackData.cpp */,
</span><span class="cx">                                 1449E24A107D4A8400B5793F /* JSCallbackData.h */,
</span><span class="cx">                                 E10B93C20B73C291003ED890 /* JSCustomXPathNSResolver.cpp */,
</span><span class="lines">@@ -25191,7 +25206,6 @@
</span><span class="cx">                                 93F1995008245E59001E9ABC /* CachePolicy.h in Headers */,
</span><span class="cx">                                 E43AF8E71AC5B7EC00CA717E /* CacheValidation.h in Headers */,
</span><span class="cx">                                 49AE2D97134EE5F90072920A /* CalculationValue.h in Headers */,
</span><del>-                                B1D5ECB5134B58DA0087C78F /* CallbackFunction.h in Headers */,
</del><span class="cx">                                 49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */,
</span><span class="cx">                                 4671E0661D67A59600C6B497 /* CanvasPath.h in Headers */,
</span><span class="cx">                                 49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */,
</span><span class="lines">@@ -25368,6 +25382,7 @@
</span><span class="cx">                                 E125F8361822F18A00D84CD9 /* CryptoKeyHMAC.h in Headers */,
</span><span class="cx">                                 E1F80B8818317252007885C3 /* CryptoKeyPair.h in Headers */,
</span><span class="cx">                                 E164FAA318315BF400DB4E61 /* CryptoKeyRSA.h in Headers */,
</span><ins>+                                7C45C9D51E3FCBE400AAB558 /* JSDOMBindingCaller.h in Headers */,
</ins><span class="cx">                                 E125F856182C0F8300D84CD9 /* CryptoKeySerialization.h in Headers */,
</span><span class="cx">                                 E125F85A182C1AA600D84CD9 /* CryptoKeySerializationRaw.h in Headers */,
</span><span class="cx">                                 E19727161820549E00592D51 /* CryptoKeyType.h in Headers */,
</span><span class="lines">@@ -25591,7 +25606,6 @@
</span><span class="cx">                                 A8185F3909765766005826D9 /* DocumentType.h in Headers */,
</span><span class="cx">                                 973889A1116EA9DC00ADF313 /* DocumentWriter.h in Headers */,
</span><span class="cx">                                 1A8F6BC30DB55CDC001DB794 /* DOMApplicationCache.h in Headers */,
</span><del>-                                B56576E817DA94E200A56BDC /* DOMConstructorWithDocument.h in Headers */,
</del><span class="cx">                                 BC60D6E90D28D83400B9918F /* DOMCoreException.h in Headers */,
</span><span class="cx">                                 FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */,
</span><span class="cx">                                 9B3A8872145632F9003AE8F5 /* DOMDOMSettableTokenList.h in Headers */,
</span><span class="lines">@@ -26702,6 +26716,7 @@
</span><span class="cx">                                 4496E3A0139813A5003EE32A /* JSSVGMPathElement.h in Headers */,
</span><span class="cx">                                 8542A7970AE5C94300DF58DF /* JSSVGNumber.h in Headers */,
</span><span class="cx">                                 B2FA3DB10AB75A6F000E5AC4 /* JSSVGNumberList.h in Headers */,
</span><ins>+                                7C45C9D31E3FCBD700AAB558 /* JSDOMWrapperCache.h in Headers */,
</ins><span class="cx">                                 B2FA3DB50AB75A6F000E5AC4 /* JSSVGPathElement.h in Headers */,
</span><span class="cx">                                 B2FA3DB70AB75A6F000E5AC4 /* JSSVGPathSeg.h in Headers */,
</span><span class="cx">                                 B2FA3DB90AB75A6F000E5AC4 /* JSSVGPathSegArcAbs.h in Headers */,
</span><span class="lines">@@ -27803,6 +27818,7 @@
</span><span class="cx">                                 97BC6A521505F081001B74AC /* SQLTransactionCallback.h in Headers */,
</span><span class="cx">                                 97BC6A571505F081001B74AC /* SQLTransactionCoordinator.h in Headers */,
</span><span class="cx">                                 97BC6A581505F081001B74AC /* SQLTransactionErrorCallback.h in Headers */,
</span><ins>+                                7C45C9D41E3FCBDF00AAB558 /* JSDOMBindingSecurity.h in Headers */,
</ins><span class="cx">                                 FE36FD1816C7826500F887C1 /* SQLTransactionState.h in Headers */,
</span><span class="cx">                                 FE36FD1716C7826500F887C1 /* SQLTransactionStateMachine.h in Headers */,
</span><span class="cx">                                 1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */,
</span><span class="lines">@@ -27852,6 +27868,7 @@
</span><span class="cx">                                 0FF50272102BA96A0066F39A /* StyleMedia.h in Headers */,
</span><span class="cx">                                 BC5EB74E0E81E06700B25965 /* StyleMultiColData.h in Headers */,
</span><span class="cx">                                 E4DACE6A1D12E10B0075980F /* StylePendingResources.h in Headers */,
</span><ins>+                                7C45C9D61E3FCBF800AAB558 /* JSDOMExceptionHandling.h in Headers */,
</ins><span class="cx">                                 A80E6DFC0A199067007FB8C5 /* StyleProperties.h in Headers */,
</span><span class="cx">                                 E1B25107152A0BB00069B779 /* StylePropertyShorthand.h in Headers */,
</span><span class="cx">                                 83C05A5B1A686212007E5DEA /* StylePropertyShorthandFunctions.h in Headers */,
</span><span class="lines">@@ -29092,7 +29109,6 @@
</span><span class="cx">                                 BCB16C270979C3BD00467741 /* CachedXSLStyleSheet.cpp in Sources */,
</span><span class="cx">                                 E43AF8E61AC5B7E800CA717E /* CacheValidation.cpp in Sources */,
</span><span class="cx">                                 49AE2D96134EE5F90072920A /* CalculationValue.cpp in Sources */,
</span><del>-                                B1827493134CA4C100B98C2D /* CallbackFunction.cpp in Sources */,
</del><span class="cx">                                 49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */,
</span><span class="cx">                                 4671E0651D67A59600C6B497 /* CanvasPath.cpp in Sources */,
</span><span class="cx">                                 49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */,
</span><span class="lines">@@ -29253,6 +29269,7 @@
</span><span class="cx">                                 FBB0C5B717BBD626003D3677 /* CSSFilterImageValue.cpp in Sources */,
</span><span class="cx">                                 BC64B4D50CB4298A005F2B62 /* CSSFontFace.cpp in Sources */,
</span><span class="cx">                                 409EBDB216B7EE7400CBA3FC /* CSSFontFaceLoadEvent.cpp in Sources */,
</span><ins>+                                7C45C9D11E3EFE0500AAB558 /* JSDOMConstructor.cpp in Sources */,
</ins><span class="cx">                                 A80E6CE70A1989CA007FB8C5 /* CSSFontFaceRule.cpp in Sources */,
</span><span class="cx">                                 C26017A31C72DC9900F74A16 /* CSSFontFaceSet.cpp in Sources */,
</span><span class="cx">                                 BC64B4D70CB4298A005F2B62 /* CSSFontFaceSource.cpp in Sources */,
</span><span class="lines">@@ -29586,6 +29603,7 @@
</span><span class="cx">                                 B2AFFC7C0D00A5C10030074D /* FontCacheMac.mm in Sources */,
</span><span class="cx">                                 B2C3DA600D006CD600EF6F26 /* FontCascade.cpp in Sources */,
</span><span class="cx">                                 B2AFFC800D00A5C10030074D /* FontCascadeCocoa.mm in Sources */,
</span><ins>+                                7C45C9D01E3EFDFB00AAB558 /* JSDOMWrapperCache.cpp in Sources */,
</ins><span class="cx">                                 B2C3DA670D006CD600EF6F26 /* FontCascadeFonts.cpp in Sources */,
</span><span class="cx">                                 7C4EDD741A7B607800198C4D /* FontCocoa.mm in Sources */,
</span><span class="cx">                                 B2AFFC7D0D00A5C10030074D /* FontCustomPlatformData.cpp in Sources */,
</span><span class="lines">@@ -31554,6 +31572,7 @@
</span><span class="cx">                                 B22279A40D00BF220071B782 /* SVGComponentTransferFunctionElement.cpp in Sources */,
</span><span class="cx">                                 B2227B050D00BFF10071B782 /* SVGCSSComputedStyleDeclaration.cpp in Sources */,
</span><span class="cx">                                 B22279A70D00BF220071B782 /* SVGCursorElement.cpp in Sources */,
</span><ins>+                                7C45C9D21E3EFE0800AAB558 /* JSDOMExceptionHandling.cpp in Sources */,
</ins><span class="cx">                                 B22279AD0D00BF220071B782 /* SVGDefsElement.cpp in Sources */,
</span><span class="cx">                                 B22279B00D00BF220071B782 /* SVGDescElement.cpp in Sources */,
</span><span class="cx">                                 B22279B30D00BF220071B782 /* SVGDocument.cpp in Sources */,
</span><span class="lines">@@ -31568,6 +31587,7 @@
</span><span class="cx">                                 B22279CD0D00BF220071B782 /* SVGFEComponentTransferElement.cpp in Sources */,
</span><span class="cx">                                 B22279D00D00BF220071B782 /* SVGFECompositeElement.cpp in Sources */,
</span><span class="cx">                                 1921327411C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp in Sources */,
</span><ins>+                                7C45C9CF1E3EFDF700AAB558 /* JSDOMBindingSecurity.cpp in Sources */,
</ins><span class="cx">                                 B22279D30D00BF220071B782 /* SVGFEDiffuseLightingElement.cpp in Sources */,
</span><span class="cx">                                 B22279D60D00BF220071B782 /* SVGFEDisplacementMapElement.cpp in Sources */,
</span><span class="cx">                                 B22279D90D00BF220071B782 /* SVGFEDistantLightElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCallbackFunctioncpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/CallbackFunction.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CallbackFunction.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/CallbackFunction.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 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. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "CallbackFunction.h"
-
-#include "ExceptionCode.h"
-#include "JSDOMBinding.h"
-#include <runtime/CallData.h>
-
-namespace WebCore {
-
-bool checkFunctionOnlyCallback(JSC::ExecState* state, JSC::JSValue value, CallbackAllowedValueFlags acceptedValues)
-{
- if (value.isUndefined() && (acceptedValues & CallbackAllowUndefined))
- return false;
-
- if (value.isNull() && (acceptedValues & CallbackAllowNull))
- return false;
-
- JSC::CallData callData;
- if (getCallData(value, callData) == JSC::CallType::None) {
- auto scope = DECLARE_THROW_SCOPE(state->vm());
- throwTypeMismatchError(*state, scope);
- return false;
- }
-
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCallbackFunctionh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/CallbackFunction.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CallbackFunction.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/CallbackFunction.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 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. 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.
- */
-
-#pragma once
-
-#include <runtime/JSObject.h>
-
-namespace JSC {
-class ExecState;
-}
-
-namespace WebCore {
-
-class JSDOMGlobalObject;
-
-enum CallbackAllowedValueFlag {
- CallbackAllowUndefined = 1,
- CallbackAllowNull = 1 << 1
-};
-
-typedef unsigned CallbackAllowedValueFlags;
-
-bool checkFunctionOnlyCallback(JSC::ExecState*, JSC::JSValue, CallbackAllowedValueFlags);
-
-// Creates callback objects for callbacks marked as FunctionOnly in WebIDL.
-template <typename JSCallbackType>
-RefPtr<JSCallbackType> createFunctionOnlyCallback(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSC::JSValue value, CallbackAllowedValueFlags acceptedValues = 0)
-{
- if (checkFunctionOnlyCallback(exec, value, acceptedValues))
- return JSCallbackType::create(asObject(value), globalObject);
- return nullptr;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsDOMConstructorWithDocumenth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/DOMConstructorWithDocument.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/DOMConstructorWithDocument.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/DOMConstructorWithDocument.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Google, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-#include "Document.h"
-#include "JSDOMBinding.h"
-
-namespace WebCore {
-
-// Constructors using this base class depend on being in a Document and
-// can never be used from a WorkerGlobalScope.
-class DOMConstructorWithDocument : public DOMConstructorObject {
- typedef DOMConstructorObject Base;
-public:
- Document* document() const
- {
- return downcast<Document>(scriptExecutionContext());
- }
-
-protected:
- DOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
- : DOMConstructorObject(structure, globalObject)
- {
- }
-
- void finishCreation(JSDOMGlobalObject& globalObject)
- {
- Base::finishCreation(globalObject.vm());
- ASSERT(globalObject.scriptExecutionContext()->isDocument());
- }
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> // This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build.
</span><span class="cx">
</span><span class="cx"> #include "CachedModuleScriptLoader.cpp"
</span><del>-#include "CallbackFunction.cpp"
</del><span class="cx"> #include "DOMWrapperWorld.cpp"
</span><span class="cx"> #include "GCController.cpp"
</span><span class="cx"> #include "JSAnimationTimelineCustom.cpp"
</span><span class="lines">@@ -46,6 +45,9 @@
</span><span class="cx"> #include "JSSQLStatementErrorCallbackCustom.cpp"
</span><span class="cx"> #include "JSCustomXPathNSResolver.cpp"
</span><span class="cx"> #include "JSDOMBinding.cpp"
</span><ins>+#include "JSDOMBindingSecurity.cpp"
+#include "JSDOMConstructor.cpp"
+#include "JSDOMExceptionHandling.cpp"
</ins><span class="cx"> #include "JSDOMGlobalObject.cpp"
</span><span class="cx"> #include "JSDOMGlobalObjectTask.cpp"
</span><span class="cx"> #include "JSDOMPromise.cpp"
</span><span class="lines">@@ -55,6 +57,7 @@
</span><span class="cx"> #include "JSDOMWindowProperties.cpp"
</span><span class="cx"> #include "JSDOMWindowShell.cpp"
</span><span class="cx"> #include "JSDOMWrapper.cpp"
</span><ins>+#include "JSDOMWrapperCache.cpp"
</ins><span class="cx"> #include "JSDocumentCustom.cpp"
</span><span class="cx"> #include "JSDocumentFragmentCustom.cpp"
</span><span class="cx"> #include "JSElementCustom.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSCryptoCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "JSCrypto.h"
</span><span class="cx">
</span><del>-#include "ExceptionCode.h"
</del><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include <runtime/ArrayBufferView.h>
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/JSArrayBufferView.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomXPathNSResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #include "CommonVM.h"
</span><span class="cx"> #include "Document.h"
</span><del>-#include "ExceptionCode.h"
</del><span class="cx"> #include "Frame.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span><span class="cx"> #include "Page.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -24,42 +24,19 @@
</span><span class="cx">
</span><span class="cx"> #include "CachedScript.h"
</span><span class="cx"> #include "CommonVM.h"
</span><del>-#include "DOMConstructorWithDocument.h"
-#include "ExceptionCode.h"
-#include "ExceptionCodeDescription.h"
-#include "ExceptionHeaders.h"
-#include "ExceptionInterfaces.h"
</del><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><del>-#include "IDBDatabaseException.h"
</del><span class="cx"> #include "JSDOMConvert.h"
</span><del>-#include "JSDOMPromise.h"
-#include "JSDOMWindowCustom.h"
-#include "JSExceptionBase.h"
-#include "SecurityOrigin.h"
-#include <bytecode/CodeBlock.h>
-#include <inspector/ScriptCallStack.h>
-#include <inspector/ScriptCallStackFactory.h>
</del><span class="cx"> #include <runtime/DateInstance.h>
</span><del>-#include <runtime/Error.h>
-#include <runtime/ErrorHandlingScope.h>
-#include <runtime/ErrorInstance.h>
-#include <runtime/Exception.h>
-#include <runtime/ExceptionHelpers.h>
-#include <runtime/JSFunction.h>
</del><span class="cx"> #include <stdarg.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><ins>+#include <wtf/text/StringBuilder.h>
</ins><span class="cx"> #include <wtf/unicode/CharacterNames.h>
</span><del>-#include <wtf/text/StringBuilder.h>
</del><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><del>-using namespace Inspector;
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorObject);
-STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorWithDocument);
-
</del><span class="cx"> void addImpureProperty(const AtomicString& propertyName)
</span><span class="cx"> {
</span><span class="cx"> commonVM().addImpureProperty(propertyName);
</span><span class="lines">@@ -184,170 +161,6 @@
</span><span class="cx"> return static_cast<DateInstance*>(value.toObject(exec))->internalNumber();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void reportException(ExecState* exec, JSValue exceptionValue, CachedScript* cachedScript)
-{
- VM& vm = exec->vm();
- RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock());
- auto* exception = jsDynamicDowncast<JSC::Exception*>(vm, exceptionValue);
- if (!exception) {
- exception = vm.lastException();
- if (!exception)
- exception = JSC::Exception::create(exec->vm(), exceptionValue, JSC::Exception::DoNotCaptureStack);
- }
-
- reportException(exec, exception, cachedScript);
-}
-
-String retrieveErrorMessage(ExecState& state, VM& vm, JSValue exception, CatchScope& catchScope)
-{
- if (auto* exceptionBase = toExceptionBase(vm, exception))
- return exceptionBase->toString();
-
- // FIXME: <http://webkit.org/b/115087> Web Inspector: WebCore::reportException should not evaluate JavaScript handling exceptions
- // If this is a custom exception object, call toString on it to try and get a nice string representation for the exception.
- String errorMessage;
- if (auto* error = jsDynamicDowncast<ErrorInstance*>(vm, exception))
- errorMessage = error->sanitizedToString(&state);
- else
- errorMessage = exception.toWTFString(&state);
-
- // We need to clear any new exception that may be thrown in the toString() call above.
- // reportException() is not supposed to be making new exceptions.
- catchScope.clearException();
- vm.clearLastException();
- return errorMessage;
-}
-
-void reportException(ExecState* exec, JSC::Exception* exception, CachedScript* cachedScript, ExceptionDetails* exceptionDetails)
-{
- VM& vm = exec->vm();
- auto scope = DECLARE_CATCH_SCOPE(vm);
-
- RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock());
- if (isTerminatedExecutionException(vm, exception))
- return;
-
- ErrorHandlingScope errorScope(exec->vm());
-
- RefPtr<ScriptCallStack> callStack(createScriptCallStackFromException(exec, exception, ScriptCallStack::maxCallStackSizeToCapture));
- scope.clearException();
- vm.clearLastException();
-
- JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
- if (JSDOMWindow* window = jsDynamicDowncast<JSDOMWindow*>(vm, globalObject)) {
- if (!window->wrapped().isCurrentlyDisplayedInFrame())
- return;
- }
-
- int lineNumber = 0;
- int columnNumber = 0;
- String exceptionSourceURL;
- if (const ScriptCallFrame* callFrame = callStack->firstNonNativeCallFrame()) {
- lineNumber = callFrame->lineNumber();
- columnNumber = callFrame->columnNumber();
- exceptionSourceURL = callFrame->sourceURL();
- }
-
- String errorMessage = retrieveErrorMessage(*exec, vm, exception->value(), scope);
- ScriptExecutionContext* scriptExecutionContext = globalObject->scriptExecutionContext();
- scriptExecutionContext->reportException(errorMessage, lineNumber, columnNumber, exceptionSourceURL, exception, callStack->size() ? callStack : nullptr, cachedScript);
-
- if (exceptionDetails) {
- exceptionDetails->message = errorMessage;
- exceptionDetails->lineNumber = lineNumber;
- exceptionDetails->columnNumber = columnNumber;
- exceptionDetails->sourceURL = exceptionSourceURL;
- }
-}
-
-void reportCurrentException(ExecState* exec)
-{
- VM& vm = exec->vm();
- auto scope = DECLARE_CATCH_SCOPE(vm);
- auto* exception = scope.exception();
- scope.clearException();
- reportException(exec, exception);
-}
-
-static JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String* message = nullptr)
-{
- if (!ec || ec == ExistingExceptionError)
- return jsUndefined();
-
- // FIXME: Handle other WebIDL exception types.
- if (ec == TypeError) {
- if (!message || message->isEmpty())
- return createTypeError(exec);
- return createTypeError(exec, *message);
- }
-
- if (ec == RangeError) {
- if (!message || message->isEmpty())
- return createRangeError(exec, ASCIILiteral("Bad value"));
- return createRangeError(exec, *message);
- }
-
- if (ec == StackOverflowError)
- return createStackOverflowError(exec);
-
- // FIXME: All callers to createDOMException need to pass in the correct global object.
- // For now, we're going to assume the lexicalGlobalObject. Which is wrong in cases like this:
- // frames[0].document.createElement(null, null); // throws an exception which should have the subframe's prototypes.
- JSDOMGlobalObject* globalObject = deprecatedGlobalObjectForPrototype(exec);
-
- ExceptionCodeDescription description(ec);
-
- CString messageCString;
- if (message)
- messageCString = message->utf8();
- if (message && !message->isEmpty()) {
- // It is safe to do this because the char* contents of the CString are copied into a new WTF::String before the CString is destroyed.
- description.description = messageCString.data();
- }
-
- JSValue errorObject;
- switch (description.type) {
- case DOMCoreExceptionType:
-#if ENABLE(INDEXED_DATABASE)
- case IDBDatabaseExceptionType:
-#endif
- errorObject = toJS(exec, globalObject, DOMCoreException::create(description));
- break;
- case FileExceptionType:
- errorObject = toJS(exec, globalObject, FileException::create(description));
- break;
- case SQLExceptionType:
- errorObject = toJS(exec, globalObject, SQLException::create(description));
- break;
- case SVGExceptionType:
- errorObject = toJS(exec, globalObject, SVGException::create(description));
- break;
- case XPathExceptionType:
- errorObject = toJS(exec, globalObject, XPathException::create(description));
- break;
- }
-
- ASSERT(errorObject);
- addErrorInfo(exec, asObject(errorObject), true);
- return errorObject;
-}
-
-JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String& message)
-{
- return createDOMException(exec, ec, &message);
-}
-
-JSValue createDOMException(ExecState& state, Exception&& exception)
-{
- return createDOMException(&state, exception.code(), exception.releaseMessage());
-}
-
-void propagateExceptionSlowPath(JSC::ExecState& state, JSC::ThrowScope& throwScope, Exception&& exception)
-{
- ASSERT(!throwScope.exception());
- throwException(&state, throwScope, createDOMException(state, WTFMove(exception)));
-}
-
</del><span class="cx"> bool hasIteratorMethod(JSC::ExecState& state, JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx"> auto& vm = state.vm();
</span><span class="lines">@@ -365,43 +178,6 @@
</span><span class="cx"> return !applyMethod.isUndefined();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool BindingSecurity::shouldAllowAccessToFrame(ExecState& state, Frame& frame, String& message)
-{
- if (BindingSecurity::shouldAllowAccessToFrame(&state, &frame, DoNotReportSecurityError))
- return true;
- message = frame.document()->domWindow()->crossDomainAccessErrorMessage(activeDOMWindow(&state));
- return false;
-}
-
-bool BindingSecurity::shouldAllowAccessToDOMWindow(ExecState& state, DOMWindow& globalObject, String& message)
-{
- if (BindingSecurity::shouldAllowAccessToDOMWindow(&state, globalObject, DoNotReportSecurityError))
- return true;
- message = globalObject.crossDomainAccessErrorMessage(activeDOMWindow(&state));
- return false;
-}
-
-void printErrorMessageForFrame(Frame* frame, const String& message)
-{
- if (!frame)
- return;
- frame->document()->domWindow()->printErrorMessage(message);
-}
-
-Structure* getCachedDOMStructure(JSDOMGlobalObject& globalObject, const ClassInfo* classInfo)
-{
- JSDOMStructureMap& structures = globalObject.structures(NoLockingNecessary);
- return structures.get(classInfo).get();
-}
-
-Structure* cacheDOMStructure(JSDOMGlobalObject& globalObject, Structure* structure, const ClassInfo* classInfo)
-{
- auto locker = lockDuringMarking(globalObject.vm().heap, globalObject.gcLock());
- JSDOMStructureMap& structures = globalObject.structures(locker);
- ASSERT(!structures.contains(classInfo));
- return structures.set(classInfo, WriteBarrier<Structure>(globalObject.vm(), &globalObject, structure)).iterator->value.get();
-}
-
</del><span class="cx"> static const int32_t kMaxInt32 = 0x7fffffff;
</span><span class="cx"> static const int32_t kMinInt32 = -kMaxInt32 - 1;
</span><span class="cx"> static const uint32_t kMaxUInt32 = 0xffffffffU;
</span><span class="lines">@@ -715,320 +491,4 @@
</span><span class="cx"> return n;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-class GetCallerGlobalObjectFunctor {
-public:
- GetCallerGlobalObjectFunctor() = default;
-
- StackVisitor::Status operator()(StackVisitor& visitor) const
- {
- if (!m_hasSkippedFirstFrame) {
- m_hasSkippedFirstFrame = true;
- return StackVisitor::Continue;
- }
-
- if (auto* codeBlock = visitor->codeBlock())
- m_globalObject = codeBlock->globalObject();
- else {
- ASSERT(visitor->callee());
- // FIXME: Callee is not an object if the caller is Web Assembly.
- // Figure out what to do here. We can probably get the global object
- // from the top-most Wasm Instance. https://bugs.webkit.org/show_bug.cgi?id=165721
- if (visitor->callee()->isObject())
- m_globalObject = jsCast<JSObject*>(visitor->callee())->globalObject();
- }
- return StackVisitor::Done;
- }
-
- JSGlobalObject* globalObject() const { return m_globalObject; }
-
-private:
- mutable bool m_hasSkippedFirstFrame { false };
- mutable JSGlobalObject* m_globalObject { nullptr };
-};
-
-DOMWindow& callerDOMWindow(ExecState* exec)
-{
- GetCallerGlobalObjectFunctor iter;
- exec->iterate(iter);
- return iter.globalObject() ? asJSDOMWindow(iter.globalObject())->wrapped() : firstDOMWindow(exec);
-}
-
-DOMWindow& activeDOMWindow(ExecState* exec)
-{
- return asJSDOMWindow(exec->lexicalGlobalObject())->wrapped();
-}
-
-DOMWindow& firstDOMWindow(ExecState* exec)
-{
- return asJSDOMWindow(exec->vmEntryGlobalObject())->wrapped();
-}
-
-static inline bool canAccessDocument(JSC::ExecState* state, Document* targetDocument, SecurityReportingOption reportingOption)
-{
- VM& vm = state->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- if (!targetDocument)
- return false;
-
- DOMWindow& active = activeDOMWindow(state);
-
- if (active.document()->securityOrigin().canAccess(targetDocument->securityOrigin()))
- return true;
-
- switch (reportingOption) {
- case ThrowSecurityError:
- throwSecurityError(*state, scope, targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
- break;
- case LogSecurityError:
- printErrorMessageForFrame(targetDocument->frame(), targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
- break;
- case DoNotReportSecurityError:
- break;
- }
-
- return false;
-}
-
-bool BindingSecurity::shouldAllowAccessToDOMWindow(JSC::ExecState* state, DOMWindow& target, SecurityReportingOption reportingOption)
-{
- return canAccessDocument(state, target.document(), reportingOption);
-}
-
-bool BindingSecurity::shouldAllowAccessToFrame(JSC::ExecState* state, Frame* target, SecurityReportingOption reportingOption)
-{
- return target && canAccessDocument(state, target->document(), reportingOption);
-}
-
-bool BindingSecurity::shouldAllowAccessToNode(JSC::ExecState& state, Node* target)
-{
- return !target || canAccessDocument(&state, &target->document(), LogSecurityError);
-}
-
-static EncodedJSValue throwTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const String& errorMessage)
-{
- return throwVMTypeError(&state, scope, errorMessage);
-}
-
-static void appendArgumentMustBe(StringBuilder& builder, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
-{
- builder.appendLiteral("Argument ");
- builder.appendNumber(argumentIndex + 1);
- builder.appendLiteral(" ('");
- builder.append(argumentName);
- builder.appendLiteral("') to ");
- if (!functionName) {
- builder.appendLiteral("the ");
- builder.append(interfaceName);
- builder.appendLiteral(" constructor");
- } else {
- builder.append(interfaceName);
- builder.append('.');
- builder.append(functionName);
- }
- builder.appendLiteral(" must be ");
-}
-
-JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
-{
- auto& context = *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->scriptExecutionContext();
- context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Deprecated attempt to access property '", attributeName, "' on a non-", interfaceName, " object."));
- return JSValue::encode(jsUndefined());
-}
-
-void reportDeprecatedSetterError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
-{
- auto& context = *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->scriptExecutionContext();
- context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Deprecated attempt to set property '", attributeName, "' on a non-", interfaceName, " object."));
-}
-
-void throwNotSupportedError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, NOT_SUPPORTED_ERR));
-}
-
-void throwNotSupportedError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* message)
-{
- ASSERT(!scope.exception());
- String messageString(message);
- throwException(&state, scope, createDOMException(&state, NOT_SUPPORTED_ERR, &messageString));
-}
-
-void throwInvalidStateError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* message)
-{
- ASSERT(!scope.exception());
- String messageString(message);
- throwException(&state, scope, createDOMException(&state, INVALID_STATE_ERR, &messageString));
-}
-
-void throwSecurityError(JSC::ExecState& state, JSC::ThrowScope& scope, const String& message)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, SECURITY_ERR, message));
-}
-
-JSC::EncodedJSValue throwArgumentMustBeEnumError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedValues)
-{
- StringBuilder builder;
- appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
- builder.appendLiteral("one of: ");
- builder.append(expectedValues);
- return throwVMTypeError(&state, scope, builder.toString());
-}
-
-JSC::EncodedJSValue throwArgumentMustBeFunctionError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
-{
- StringBuilder builder;
- appendArgumentMustBe(builder, argumentIndex, argumentName, interfaceName, functionName);
- builder.appendLiteral("a function");
- return throwVMTypeError(&state, scope, builder.toString());
-}
-
-JSC::EncodedJSValue throwArgumentTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedType)
-{
- StringBuilder builder;
- appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
- builder.appendLiteral("an instance of ");
- builder.append(expectedType);
- return throwVMTypeError(&state, scope, builder.toString());
-}
-
-void throwArrayElementTypeError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- throwTypeError(state, scope, ASCIILiteral("Invalid Array element type"));
-}
-
-void throwAttributeTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName, const char* expectedType)
-{
- throwTypeError(state, scope, makeString("The ", interfaceName, '.', attributeName, " attribute must be an instance of ", expectedType));
-}
-
-JSC::EncodedJSValue throwRequiredMemberTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* memberName, const char* dictionaryName, const char* expectedType)
-{
- StringBuilder builder;
- builder.appendLiteral("Member ");
- builder.append(dictionaryName);
- builder.append('.');
- builder.append(memberName);
- builder.appendLiteral(" is required and must be an instance of ");
- builder.append(expectedType);
- return throwVMTypeError(&state, scope, builder.toString());
-}
-
-JSC::EncodedJSValue throwConstructorScriptExecutionContextUnavailableError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName)
-{
- return throwVMError(&state, scope, createReferenceError(&state, makeString(interfaceName, " constructor associated execution context is unavailable")));
-}
-
-void throwSequenceTypeError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- throwTypeError(state, scope, ASCIILiteral("Value is not a sequence"));
-}
-
-void throwNonFiniteTypeError(ExecState& state, JSC::ThrowScope& scope)
-{
- throwTypeError(&state, scope, ASCIILiteral("The provided value is non-finite"));
-}
-
-String makeGetterTypeErrorMessage(const char* interfaceName, const char* attributeName)
-{
- return makeString("The ", interfaceName, '.', attributeName, " getter can only be used on instances of ", interfaceName);
-}
-
-JSC::EncodedJSValue throwGetterTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName)
-{
- return throwVMTypeError(&state, scope, makeGetterTypeErrorMessage(interfaceName, attributeName));
-}
-
-JSC::EncodedJSValue rejectPromiseWithGetterTypeError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
-{
- return createRejectedPromiseWithTypeError(state, makeGetterTypeErrorMessage(interfaceName, attributeName));
-}
-
-bool throwSetterTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName)
-{
- throwTypeError(state, scope, makeString("The ", interfaceName, '.', attributeName, " setter can only be used on instances of ", interfaceName));
- return false;
-}
-
-String makeThisTypeErrorMessage(const char* interfaceName, const char* functionName)
-{
- return makeString("Can only call ", interfaceName, '.', functionName, " on instances of ", interfaceName);
-}
-
-EncodedJSValue throwThisTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* functionName)
-{
- return throwTypeError(state, scope, makeThisTypeErrorMessage(interfaceName, functionName));
-}
-
-JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise& promise, const char* interfaceName, const char* methodName)
-{
- promise.reject(TypeError, makeThisTypeErrorMessage(interfaceName, methodName));
- return JSValue::encode(jsUndefined());
-}
-
-JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState& state, const char* interfaceName, const char* methodName)
-{
- return createRejectedPromiseWithTypeError(state, makeThisTypeErrorMessage(interfaceName, methodName));
-}
-
-void callFunctionWithCurrentArguments(JSC::ExecState& state, JSC::JSObject& thisObject, JSC::JSFunction& function)
-{
- JSC::CallData callData;
- JSC::CallType callType = JSC::getCallData(&function, callData);
- ASSERT(callType != CallType::None);
-
- JSC::MarkedArgumentBuffer arguments;
- for (unsigned i = 0; i < state.argumentCount(); ++i)
- arguments.append(state.uncheckedArgument(i));
- JSC::call(&state, &function, callType, callData, &thisObject, arguments);
-}
-
-void DOMConstructorJSBuiltinObject::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
-{
- auto* thisObject = jsCast<DOMConstructorJSBuiltinObject*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- Base::visitChildren(thisObject, visitor);
- visitor.append(thisObject->m_initializeFunction);
-}
-
-static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec)
-{
- VM& vm = exec->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- throwTypeError(exec, scope, ASCIILiteral("Constructor requires 'new' operator"));
- return JSValue::encode(jsNull());
-}
-
-CallType DOMConstructorObject::getCallData(JSCell*, CallData& callData)
-{
- callData.native.function = callThrowTypeError;
- return CallType::Host;
-}
-
-void throwDOMSyntaxError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, SYNTAX_ERR));
-}
-
-void throwDataCloneError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, DATA_CLONE_ERR));
-}
-
-void throwIndexSizeError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, INDEX_SIZE_ERR));
-}
-
-void throwTypeMismatchError(JSC::ExecState& state, JSC::ThrowScope& scope)
-{
- ASSERT(!scope.exception());
- throwException(&state, scope, createDOMException(&state, TYPE_MISMATCH_ERR));
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -23,25 +23,14 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "DOMWrapperWorld.h"
-#include "ExceptionCode.h"
</del><span class="cx"> #include "ExceptionOr.h"
</span><del>-#include "JSDOMGlobalObject.h"
-#include "JSDOMWrapper.h"
-#include "JSDynamicDowncast.h"
-#include "ScriptWrappable.h"
-#include "ScriptWrappableInlines.h"
-#include "WebCoreTypedArrayController.h"
</del><ins>+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <cstddef>
</span><span class="cx"> #include <heap/HeapInlines.h>
</span><span class="cx"> #include <heap/SlotVisitorInlines.h>
</span><del>-#include <heap/Weak.h>
-#include <heap/WeakInlines.h>
</del><span class="cx"> #include <runtime/AuxiliaryBarrierInlines.h>
</span><del>-#include <runtime/Error.h>
</del><span class="cx"> #include <runtime/IteratorOperations.h>
</span><span class="cx"> #include <runtime/JSArray.h>
</span><del>-#include <runtime/JSArrayBuffer.h>
</del><span class="cx"> #include <runtime/JSCJSValueInlines.h>
</span><span class="cx"> #include <runtime/JSCellInlines.h>
</span><span class="cx"> #include <runtime/JSObjectInlines.h>
</span><span class="lines">@@ -49,8 +38,6 @@
</span><span class="cx"> #include <runtime/Lookup.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span><span class="cx"> #include <runtime/StructureInlines.h>
</span><del>-#include <runtime/TypedArrayInlines.h>
-#include <runtime/TypedArrays.h>
</del><span class="cx"> #include <runtime/WriteBarrier.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="lines">@@ -66,140 +53,10 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class CachedScript;
-class DeferredPromise;
-class DOMWindow;
-class Frame;
</del><span class="cx"> class URL;
</span><del>-class Node;
</del><span class="cx">
</span><del>-struct ExceptionDetails {
- String message;
- int lineNumber { 0 };
- int columnNumber { 0 };
- String sourceURL;
-};
-
-// Base class for all constructor objects in the JSC bindings.
-class DOMConstructorObject : public JSDOMObject {
-public:
- typedef JSDOMObject Base;
- static const unsigned StructureFlags = Base::StructureFlags | JSC::ImplementsHasInstance | JSC::ImplementsDefaultHasInstance | JSC::TypeOfShouldCallGetCallData;
- static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject*, JSC::JSValue);
-
-protected:
- DOMConstructorObject(JSC::Structure*, JSDOMGlobalObject&);
-
- static String className(const JSObject*);
- static JSC::CallType getCallData(JSCell*, JSC::CallData&);
-};
-
-class DOMConstructorJSBuiltinObject : public DOMConstructorObject {
-public:
- typedef DOMConstructorObject Base;
-
-protected:
- DOMConstructorJSBuiltinObject(JSC::Structure*, JSDOMGlobalObject&);
- static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
-
- JSC::JSFunction* initializeFunction();
- void setInitializeFunction(JSC::VM&, JSC::JSFunction&);
-
-private:
- JSC::WriteBarrier<JSC::JSFunction> m_initializeFunction;
-};
-
-DOMWindow& callerDOMWindow(JSC::ExecState*);
-DOMWindow& activeDOMWindow(JSC::ExecState*);
-DOMWindow& firstDOMWindow(JSC::ExecState*);
-
-WEBCORE_EXPORT JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
-WEBCORE_EXPORT void reportDeprecatedSetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
-
-void throwAttributeTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName, const char* expectedType);
-WEBCORE_EXPORT bool throwSetterTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName);
-
-void throwArrayElementTypeError(JSC::ExecState&, JSC::ThrowScope&);
-void throwDataCloneError(JSC::ExecState&, JSC::ThrowScope&);
-void throwDOMSyntaxError(JSC::ExecState&, JSC::ThrowScope&); // Not the same as a JavaScript syntax error.
-void throwIndexSizeError(JSC::ExecState&, JSC::ThrowScope&);
-void throwInvalidStateError(JSC::ExecState&, JSC::ThrowScope&, const char* message);
-WEBCORE_EXPORT void throwNonFiniteTypeError(JSC::ExecState&, JSC::ThrowScope&);
-void throwNotSupportedError(JSC::ExecState&, JSC::ThrowScope&);
-void throwNotSupportedError(JSC::ExecState&, JSC::ThrowScope&, const char* message);
-void throwSecurityError(JSC::ExecState&, JSC::ThrowScope&, const String& message);
-WEBCORE_EXPORT void throwSequenceTypeError(JSC::ExecState&, JSC::ThrowScope&);
-void throwTypeMismatchError(JSC::ExecState&, JSC::ThrowScope&);
-
-WEBCORE_EXPORT JSC::EncodedJSValue throwArgumentMustBeEnumError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedValues);
-JSC::EncodedJSValue throwArgumentMustBeFunctionError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName);
-WEBCORE_EXPORT JSC::EncodedJSValue throwArgumentTypeError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedType);
-WEBCORE_EXPORT JSC::EncodedJSValue throwRequiredMemberTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* memberName, const char* dictionaryName, const char* expectedType);
-JSC::EncodedJSValue throwConstructorScriptExecutionContextUnavailableError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName);
-
-String makeGetterTypeErrorMessage(const char* interfaceName, const char* attributeName);
-String makeThisTypeErrorMessage(const char* interfaceName, const char* attributeName);
-
-WEBCORE_EXPORT JSC::EncodedJSValue throwGetterTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName);
-WEBCORE_EXPORT JSC::EncodedJSValue throwThisTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* functionName);
-
-WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithGetterTypeError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
-WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise&, const char* interfaceName, const char* operationName);
-WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState&, const char* interfaceName, const char* operationName);
-
-WEBCORE_EXPORT JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject&, const JSC::ClassInfo*);
-WEBCORE_EXPORT JSC::Structure* cacheDOMStructure(JSDOMGlobalObject&, JSC::Structure*, const JSC::ClassInfo*);
-
-template<typename WrapperClass> JSC::Structure* getDOMStructure(JSC::VM&, JSDOMGlobalObject&);
-template<typename WrapperClass> JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState*);
-template<typename WrapperClass> JSC::JSObject* getDOMPrototype(JSC::VM&, JSC::JSGlobalObject*);
-
-void callFunctionWithCurrentArguments(JSC::ExecState&, JSC::JSObject& thisObject, JSC::JSFunction&);
-
-template<typename JSClass> JSC::EncodedJSValue createJSBuiltin(JSC::ExecState&, JSC::JSFunction& initializeFunction, JSDOMGlobalObject&);
-
-JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, JSC::ArrayBuffer*);
-void* wrapperKey(JSC::ArrayBuffer*);
-
-JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, void*);
-JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*);
-JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*);
-
-bool setInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*, JSC::WeakHandleOwner*);
-bool setInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*, JSDOMObject* wrapper, JSC::WeakHandleOwner* wrapperOwner);
-bool setInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner);
-
-bool clearInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*);
-bool clearInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*, JSDOMObject* wrapper);
-bool clearInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*, JSC::JSArrayBuffer* wrapper);
-
-template<typename DOMClass> JSC::JSObject* getCachedWrapper(DOMWrapperWorld&, DOMClass&);
-template<typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld& world, Ref<DOMClass>& object) { return getCachedWrapper(world, object.get()); }
-template<typename DOMClass, typename WrapperClass> void cacheWrapper(DOMWrapperWorld&, DOMClass*, WrapperClass*);
-template<typename DOMClass, typename WrapperClass> void uncacheWrapper(DOMWrapperWorld&, DOMClass*, WrapperClass*);
-template<typename DOMClass, typename T> auto createWrapper(JSDOMGlobalObject*, Ref<T>&&) -> typename std::enable_if<std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type;
-template<typename DOMClass, typename T> auto createWrapper(JSDOMGlobalObject*, Ref<T>&&) -> typename std::enable_if<!std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type;
-
-template<typename DOMClass> JSC::JSValue wrap(JSC::ExecState*, JSDOMGlobalObject*, DOMClass&);
-
-template<typename JSClass> JSClass& castThisValue(JSC::ExecState&);
-
</del><span class="cx"> void addImpureProperty(const AtomicString&);
</span><span class="cx">
</span><del>-const JSC::HashTable& getHashTableForGlobalData(JSC::VM&, const JSC::HashTable& staticTable);
-
-String retrieveErrorMessage(JSC::ExecState&, JSC::VM&, JSC::JSValue exception, JSC::CatchScope&);
-WEBCORE_EXPORT void reportException(JSC::ExecState*, JSC::JSValue exception, CachedScript* = nullptr);
-WEBCORE_EXPORT void reportException(JSC::ExecState*, JSC::Exception*, CachedScript* = nullptr, ExceptionDetails* = nullptr);
-void reportCurrentException(JSC::ExecState*);
-
-JSC::JSValue createDOMException(JSC::ExecState&, Exception&&);
-JSC::JSValue createDOMException(JSC::ExecState*, ExceptionCode, const String&);
-
-// Convert a DOM implementation exception into a JavaScript exception in the execution state.
-void propagateException(JSC::ExecState&, JSC::ThrowScope&, Exception&&);
-WEBCORE_EXPORT void propagateExceptionSlowPath(JSC::ExecState&, JSC::ThrowScope&, Exception&&);
-
</del><span class="cx"> JSC::JSValue jsString(JSC::ExecState*, const URL&); // empty if the URL is null
</span><span class="cx">
</span><span class="cx"> JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const String&); // undefined if the string is null
</span><span class="lines">@@ -210,7 +67,6 @@
</span><span class="cx"> JSC::JSValue jsOwnedStringOrNull(JSC::ExecState*, const String&);
</span><span class="cx">
</span><span class="cx"> String propertyNameToString(JSC::PropertyName);
</span><del>-
</del><span class="cx"> AtomicString propertyNameToAtomicString(JSC::PropertyName);
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT String identifierToByteString(JSC::ExecState&, const JSC::Identifier&);
</span><span class="lines">@@ -254,9 +110,6 @@
</span><span class="cx"> // NaN if the value can't be converted to a date.
</span><span class="cx"> double valueToDate(JSC::ExecState*, JSC::JSValue);
</span><span class="cx">
</span><del>-// Validates that the passed object is a sequence type per section 4.1.13 of the WebIDL spec.
-JSC::JSObject* toJSSequence(JSC::ExecState&, JSC::JSValue, unsigned& length);
-
</del><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBuffer&);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, JSC::ArrayBufferView&);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBuffer*);
</span><span class="lines">@@ -267,10 +120,6 @@
</span><span class="cx"> template<typename T> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Vector<RefPtr<T>>&);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const JSC::PrivateName&);
</span><span class="cx">
</span><del>-JSC::JSValue toJSIterator(JSC::ExecState&, JSDOMGlobalObject&, JSC::JSValue);
-template<typename T> JSC::JSValue toJSIterator(JSC::ExecState&, JSDOMGlobalObject&, const T&);
-JSC::JSValue toJSIteratorEnd(JSC::ExecState&);
-
</del><span class="cx"> RefPtr<JSC::ArrayBufferView> toPossiblySharedArrayBufferView(JSC::VM&, JSC::JSValue);
</span><span class="cx"> RefPtr<JSC::Int8Array> toPossiblySharedInt8Array(JSC::VM&, JSC::JSValue);
</span><span class="cx"> RefPtr<JSC::Int16Array> toPossiblySharedInt16Array(JSC::VM&, JSC::JSValue);
</span><span class="lines">@@ -293,285 +142,16 @@
</span><span class="cx"> RefPtr<JSC::Float32Array> toUnsharedFloat32Array(JSC::VM&, JSC::JSValue);
</span><span class="cx"> RefPtr<JSC::Float64Array> toUnsharedFloat64Array(JSC::VM&, JSC::JSValue);
</span><span class="cx">
</span><del>-template<typename T, typename JSType> Vector<Ref<T>> toRefNativeArray(JSC::ExecState&, JSC::JSValue);
-WEBCORE_EXPORT bool hasIteratorMethod(JSC::ExecState&, JSC::JSValue);
-
-enum SecurityReportingOption { DoNotReportSecurityError, LogSecurityError, ThrowSecurityError };
-namespace BindingSecurity {
- template<typename T> T* checkSecurityForNode(JSC::ExecState&, T&);
- template<typename T> T* checkSecurityForNode(JSC::ExecState&, T*);
- template<typename T> ExceptionOr<T*> checkSecurityForNode(JSC::ExecState&, ExceptionOr<T*>&&);
- template<typename T> ExceptionOr<T*> checkSecurityForNode(JSC::ExecState&, ExceptionOr<T&>&&);
- bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = LogSecurityError);
- bool shouldAllowAccessToDOMWindow(JSC::ExecState&, DOMWindow&, String& message);
- bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = LogSecurityError);
- bool shouldAllowAccessToFrame(JSC::ExecState&, Frame&, String& message);
- bool shouldAllowAccessToNode(JSC::ExecState&, Node*);
-};
-
-void printErrorMessageForFrame(Frame*, const String& message);
-
</del><span class="cx"> String propertyNameToString(JSC::PropertyName);
</span><span class="cx"> AtomicString propertyNameToAtomicString(JSC::PropertyName);
</span><span class="cx">
</span><ins>+WEBCORE_EXPORT bool hasIteratorMethod(JSC::ExecState&, JSC::JSValue);
+
</ins><span class="cx"> template<JSC::NativeFunction, int length> JSC::EncodedJSValue nonCachingStaticFunctionGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx">
</span><span class="cx">
</span><del>-enum class CastedThisErrorBehavior { Throw, ReturnEarly, RejectPromise, Assert };
-
-template<typename JSClass>
-struct BindingCaller {
- using AttributeSetterFunction = bool(JSC::ExecState&, JSClass&, JSC::JSValue, JSC::ThrowScope&);
- using AttributeGetterFunction = JSC::JSValue(JSC::ExecState&, JSClass&, JSC::ThrowScope&);
- using OperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, JSC::ThrowScope&);
- using PromiseOperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, Ref<DeferredPromise>&&, JSC::ThrowScope&);
-
- static JSClass* castForAttribute(JSC::ExecState&, JSC::EncodedJSValue);
- static JSClass* castForOperation(JSC::ExecState&);
-
- template<PromiseOperationCallerFunction operationCaller, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::RejectPromise>
- static JSC::EncodedJSValue callPromiseOperation(JSC::ExecState* state, Ref<DeferredPromise>&& promise, const char* operationName)
- {
- ASSERT(state);
- auto throwScope = DECLARE_THROW_SCOPE(state->vm());
- auto* thisObject = castForOperation(*state);
- if (shouldThrow != CastedThisErrorBehavior::Assert && UNLIKELY(!thisObject))
- return rejectPromiseWithThisTypeError(promise.get(), JSClass::info()->className, operationName);
- ASSERT(thisObject);
- ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info());
- // FIXME: We should refactor the binding generated code to use references for state and thisObject.
- return operationCaller(state, thisObject, WTFMove(promise), throwScope);
- }
-
- template<OperationCallerFunction operationCaller, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
- static JSC::EncodedJSValue callOperation(JSC::ExecState* state, const char* operationName)
- {
- ASSERT(state);
- auto throwScope = DECLARE_THROW_SCOPE(state->vm());
- auto* thisObject = castForOperation(*state);
- if (shouldThrow != CastedThisErrorBehavior::Assert && UNLIKELY(!thisObject)) {
- if (shouldThrow == CastedThisErrorBehavior::Throw)
- return throwThisTypeError(*state, throwScope, JSClass::info()->className, operationName);
- // For custom promise-returning operations
- return rejectPromiseWithThisTypeError(*state, JSClass::info()->className, operationName);
- }
- ASSERT(thisObject);
- ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info());
- // FIXME: We should refactor the binding generated code to use references for state and thisObject.
- return operationCaller(state, thisObject, throwScope);
- }
-
- template<AttributeSetterFunction setter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
- static bool setAttribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, JSC::EncodedJSValue encodedValue, const char* attributeName)
- {
- ASSERT(state);
- auto throwScope = DECLARE_THROW_SCOPE(state->vm());
- auto* thisObject = castForAttribute(*state, thisValue);
- if (UNLIKELY(!thisObject))
- return (shouldThrow == CastedThisErrorBehavior::Throw) ? throwSetterTypeError(*state, throwScope, JSClass::info()->className, attributeName) : false;
- return setter(*state, *thisObject, JSC::JSValue::decode(encodedValue), throwScope);
- }
-
- template<AttributeGetterFunction getter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
- static JSC::EncodedJSValue attribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, const char* attributeName)
- {
- ASSERT(state);
- auto throwScope = DECLARE_THROW_SCOPE(state->vm());
- auto* thisObject = castForAttribute(*state, thisValue);
- if (UNLIKELY(!thisObject)) {
- if (shouldThrow == CastedThisErrorBehavior::Throw)
- return throwGetterTypeError(*state, throwScope, JSClass::info()->className, attributeName);
- if (shouldThrow == CastedThisErrorBehavior::RejectPromise)
- return rejectPromiseWithGetterTypeError(*state, JSClass::info()->className, attributeName);
- return JSC::JSValue::encode(JSC::jsUndefined());
- }
- return JSC::JSValue::encode(getter(*state, *thisObject, throwScope));
- }
-};
-
-// ExceptionOr handling.
-void propagateException(JSC::ExecState&, JSC::ThrowScope&, ExceptionOr<void>&&);
-template<typename T> JSC::JSValue toJS(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, ExceptionOr<T>&&);
-template<typename T> JSC::JSValue toJSNewlyCreated(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, ExceptionOr<T>&& value);
-
</del><span class="cx"> // Inline functions and template definitions.
</span><span class="cx">
</span><del>-inline JSC::Structure* DOMConstructorObject::createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
-{
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
-}
-
-inline DOMConstructorObject::DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
- : JSDOMObject(structure, globalObject)
-{
-}
-
-inline String DOMConstructorObject::className(const JSObject*)
-{
- return ASCIILiteral("Function");
-}
-
-inline DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
- : DOMConstructorObject(structure, globalObject)
-{
-}
-
-inline JSC::JSFunction* DOMConstructorJSBuiltinObject::initializeFunction()
-{
- return m_initializeFunction.get();
-}
-
-inline void DOMConstructorJSBuiltinObject::setInitializeFunction(JSC::VM& vm, JSC::JSFunction& function)
-{
- m_initializeFunction.set(vm, this, &function);
-}
-
-inline JSDOMGlobalObject* deprecatedGlobalObjectForPrototype(JSC::ExecState* exec)
-{
- // FIXME: Callers to this function should be using the global object
- // from which the object is being created, instead of assuming the lexical one.
- // e.g. subframe.document.body should use the subframe's global object, not the lexical one.
- return JSC::jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
-}
-
-template<typename WrapperClass> inline JSC::Structure* getDOMStructure(JSC::VM& vm, JSDOMGlobalObject& globalObject)
-{
- if (JSC::Structure* structure = getCachedDOMStructure(globalObject, WrapperClass::info()))
- return structure;
- return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, &globalObject, WrapperClass::createPrototype(vm, &globalObject)), WrapperClass::info());
-}
-
-template<typename WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec)
-{
- // FIXME: This function is wrong. It uses the wrong global object for creating the prototype structure.
- return getDOMStructure<WrapperClass>(exec->vm(), *deprecatedGlobalObjectForPrototype(exec));
-}
-
-template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
-{
- return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, *JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));
-}
-
-template<typename JSClass> inline JSC::EncodedJSValue createJSBuiltin(JSC::ExecState& state, JSC::JSFunction& initializeFunction, JSDOMGlobalObject& globalObject)
-{
- JSC::JSObject* object = JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject);
- callFunctionWithCurrentArguments(state, *object, initializeFunction);
- return JSC::JSValue::encode(object);
-}
-
-inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld& world, JSC::ArrayBuffer*)
-{
- return static_cast<WebCoreTypedArrayController*>(world.vm().m_typedArrayController.get())->wrapperOwner();
-}
-
-inline void* wrapperKey(JSC::ArrayBuffer* domObject)
-{
- return domObject;
-}
-
-inline JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, void*) { return nullptr; }
-inline bool setInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*, JSC::WeakHandleOwner*) { return false; }
-inline bool clearInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*) { return false; }
-
-inline JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject)
-{
- if (!world.isNormal())
- return nullptr;
- return domObject->wrapper();
-}
-
-inline JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* buffer)
-{
- if (!world.isNormal())
- return nullptr;
- return buffer->m_wrapper.get();
-}
-
-inline bool setInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMObject* wrapper, JSC::WeakHandleOwner* wrapperOwner)
-{
- if (!world.isNormal())
- return false;
- domObject->setWrapper(wrapper, wrapperOwner, &world);
- return true;
-}
-
-inline bool setInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner)
-{
- if (!world.isNormal())
- return false;
- domObject->m_wrapper = JSC::Weak<JSC::JSArrayBuffer>(wrapper, wrapperOwner, &world);
- return true;
-}
-
-inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMObject* wrapper)
-{
- if (!world.isNormal())
- return false;
- domObject->clearWrapper(wrapper);
- return true;
-}
-
-inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper)
-{
- if (!world.isNormal())
- return false;
- weakClear(domObject->m_wrapper, wrapper);
- return true;
-}
-
-template<typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld& world, DOMClass& domObject)
-{
- if (auto* wrapper = getInlineCachedWrapper(world, &domObject))
- return wrapper;
- return world.m_wrappers.get(wrapperKey(&domObject));
-}
-
-template<typename DOMClass, typename WrapperClass> inline void cacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
-{
- JSC::WeakHandleOwner* owner = wrapperOwner(world, domObject);
- if (setInlineCachedWrapper(world, domObject, wrapper, owner))
- return;
- weakAdd(world.m_wrappers, wrapperKey(domObject), JSC::Weak<JSC::JSObject>(wrapper, owner, &world));
-}
-
-template<typename DOMClass, typename WrapperClass> inline void uncacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
-{
- if (clearInlineCachedWrapper(world, domObject, wrapper))
- return;
- weakRemove(world.m_wrappers, wrapperKey(domObject), wrapper);
-}
-
-template<typename DOMClass, typename T> inline auto createWrapper(JSDOMGlobalObject* globalObject, Ref<T>&& domObject) -> typename std::enable_if<std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type
-{
- using WrapperClass = typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass;
-
- ASSERT(!getCachedWrapper(globalObject->world(), domObject));
- auto* domObjectPtr = domObject.ptr();
- auto* wrapper = WrapperClass::create(getDOMStructure<WrapperClass>(globalObject->vm(), *globalObject), globalObject, WTFMove(domObject));
- cacheWrapper(globalObject->world(), domObjectPtr, wrapper);
- return wrapper;
-}
-
-template<typename DOMClass, typename T> inline auto createWrapper(JSDOMGlobalObject* globalObject, Ref<T>&& domObject) -> typename std::enable_if<!std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type
-{
- return createWrapper<DOMClass>(globalObject, static_reference_cast<DOMClass>(WTFMove(domObject)));
-}
-
-template<typename DOMClass> inline JSC::JSValue wrap(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMClass& domObject)
-{
- if (auto* wrapper = getCachedWrapper(globalObject->world(), domObject))
- return wrapper;
- return toJSNewlyCreated(state, globalObject, Ref<DOMClass>(domObject));
-}
-
-template<typename JSClass> inline JSClass& castThisValue(JSC::ExecState& state)
-{
- auto thisValue = state.thisValue();
- auto castedThis = jsDynamicDowncast<JSClass*>(state.vm(), thisValue);
- ASSERT(castedThis);
- return *castedThis;
-}
-
</del><span class="cx"> inline int32_t finiteInt32Value(JSC::JSValue value, JSC::ExecState* exec, bool& okay)
</span><span class="cx"> {
</span><span class="cx"> double number = value.toNumber(exec);
</span><span class="lines">@@ -579,32 +159,6 @@
</span><span class="cx"> return JSC::toInt32(number);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// Validates that the passed object is a sequence type per section 4.1.13 of the WebIDL spec.
-inline JSC::JSObject* toJSSequence(JSC::ExecState& exec, JSC::JSValue value, unsigned& length)
-{
- JSC::VM& vm = exec.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- JSC::JSObject* object = value.getObject();
- if (!object) {
- throwSequenceTypeError(exec, scope);
- return nullptr;
- }
-
- JSC::JSValue lengthValue = object->get(&exec, exec.propertyNames().length);
- RETURN_IF_EXCEPTION(scope, nullptr);
-
- if (lengthValue.isUndefinedOrNull()) {
- throwSequenceTypeError(exec, scope);
- return nullptr;
- }
-
- length = lengthValue.toUInt32(&exec);
- RETURN_IF_EXCEPTION(scope, nullptr);
-
- return object;
-}
-
</del><span class="cx"> inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, JSC::ArrayBuffer& buffer)
</span><span class="cx"> {
</span><span class="cx"> if (auto result = getCachedWrapper(globalObject->world(), buffer))
</span><span class="lines">@@ -676,21 +230,6 @@
</span><span class="cx"> return JSC::Symbol::create(exec->vm(), privateName.uid());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline JSC::JSValue toJSIterator(JSC::ExecState& state, JSDOMGlobalObject&, JSC::JSValue value)
-{
- return createIteratorResultObject(&state, value, false);
-}
-
-template<typename T> inline JSC::JSValue toJSIterator(JSC::ExecState& state, JSDOMGlobalObject& globalObject, const T& value)
-{
- return createIteratorResultObject(&state, toJS(&state, &globalObject, value), false);
-}
-
-inline JSC::JSValue toJSIteratorEnd(JSC::ExecState& state)
-{
- return createIteratorResultObject(&state, JSC::jsUndefined(), true);
-}
-
</del><span class="cx"> inline RefPtr<JSC::ArrayBufferView> toPossiblySharedArrayBufferView(JSC::VM& vm, JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx"> auto* wrapper = jsDynamicDowncast<JSC::JSArrayBufferView*>(vm, value);
</span><span class="lines">@@ -727,30 +266,6 @@
</span><span class="cx"> inline RefPtr<JSC::Float32Array> toUnsharedFloat32Array(JSC::VM& vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView<JSC::Float32Adaptor>(vm, value); }
</span><span class="cx"> inline RefPtr<JSC::Float64Array> toUnsharedFloat64Array(JSC::VM& vm, JSC::JSValue value) { return JSC::toUnsharedNativeTypedView<JSC::Float64Adaptor>(vm, value); }
</span><span class="cx">
</span><del>-template<typename T, typename JST> inline Vector<Ref<T>> toRefNativeArray(JSC::ExecState& state, JSC::JSValue value)
-{
- JSC::VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- if (!value.isObject()) {
- throwSequenceTypeError(state, scope);
- return { };
- }
-
- Vector<Ref<T>> result;
- forEachInIterable(&state, value, [&result](JSC::VM& vm, JSC::ExecState* state, JSC::JSValue jsValue) {
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- if (jsValue.inherits(vm, JST::info())) {
- auto* object = JST::toWrapped(vm, jsValue);
- ASSERT(object);
- result.append(*object);
- } else
- throwArrayElementTypeError(*state, scope);
- });
- return result;
-}
-
</del><span class="cx"> inline String propertyNameToString(JSC::PropertyName propertyName)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!propertyName.isSymbol());
</span><span class="lines">@@ -767,59 +282,4 @@
</span><span class="cx"> return JSC::JSValue::encode(JSC::JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE void propagateException(JSC::ExecState& state, JSC::ThrowScope& throwScope, Exception&& exception)
-{
- if (throwScope.exception())
- return;
- propagateExceptionSlowPath(state, throwScope, WTFMove(exception));
-}
-
-inline void propagateException(JSC::ExecState& state, JSC::ThrowScope& throwScope, ExceptionOr<void>&& value)
-{
- if (UNLIKELY(value.hasException()))
- propagateException(state, throwScope, value.releaseException());
-}
-
-template<typename T> inline JSC::JSValue toJS(JSC::ExecState& state, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, ExceptionOr<T>&& value)
-{
- if (UNLIKELY(value.hasException())) {
- propagateException(state, throwScope, value.releaseException());
- return { };
- }
- return toJS(&state, &globalObject, value.releaseReturnValue());
-}
-
-template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState& state, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, ExceptionOr<T>&& value)
-{
- if (UNLIKELY(value.hasException())) {
- propagateException(state, throwScope, value.releaseException());
- return { };
- }
- return toJSNewlyCreated(&state, &globalObject, value.releaseReturnValue());
-}
-
-template<typename T> inline T* BindingSecurity::checkSecurityForNode(JSC::ExecState& state, T& node)
-{
- return shouldAllowAccessToNode(state, &node) ? &node : nullptr;
-}
-
-template<typename T> inline T* BindingSecurity::checkSecurityForNode(JSC::ExecState& state, T* node)
-{
- return shouldAllowAccessToNode(state, node) ? node : nullptr;
-}
-
-template<typename T> inline ExceptionOr<T*> BindingSecurity::checkSecurityForNode(JSC::ExecState& state, ExceptionOr<T*>&& value)
-{
- if (value.hasException())
- return value.releaseException();
- return checkSecurityForNode(state, value.releaseReturnValue());
-}
-
-template<typename T> inline ExceptionOr<T*> BindingSecurity::checkSecurityForNode(JSC::ExecState& state, ExceptionOr<T&>&& value)
-{
- if (value.hasException())
- return value.releaseException();
- return checkSecurityForNode(state, value.releaseReturnValue());
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingCallerhfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMBindingCaller.h (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.h) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBindingCaller.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBindingCaller.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2003-2006, 2008-2009, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2009 Google, Inc. All rights reserved.
+ * Copyright (C) 2012 Ericsson AB. All rights reserved.
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#pragma once
+
+#include "JSDOMExceptionHandling.h"
+
+namespace WebCore {
+
+enum class CastedThisErrorBehavior { Throw, ReturnEarly, RejectPromise, Assert };
+
+template<typename JSClass>
+struct BindingCaller {
+ using AttributeSetterFunction = bool(JSC::ExecState&, JSClass&, JSC::JSValue, JSC::ThrowScope&);
+ using AttributeGetterFunction = JSC::JSValue(JSC::ExecState&, JSClass&, JSC::ThrowScope&);
+ using OperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, JSC::ThrowScope&);
+ using PromiseOperationCallerFunction = JSC::EncodedJSValue(JSC::ExecState*, JSClass*, Ref<DeferredPromise>&&, JSC::ThrowScope&);
+
+ static JSClass* castForAttribute(JSC::ExecState&, JSC::EncodedJSValue);
+ static JSClass* castForOperation(JSC::ExecState&);
+
+ template<PromiseOperationCallerFunction operationCaller, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::RejectPromise>
+ static JSC::EncodedJSValue callPromiseOperation(JSC::ExecState* state, Ref<DeferredPromise>&& promise, const char* operationName)
+ {
+ ASSERT(state);
+ auto throwScope = DECLARE_THROW_SCOPE(state->vm());
+ auto* thisObject = castForOperation(*state);
+ if (shouldThrow != CastedThisErrorBehavior::Assert && UNLIKELY(!thisObject))
+ return rejectPromiseWithThisTypeError(promise.get(), JSClass::info()->className, operationName);
+ ASSERT(thisObject);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info());
+ // FIXME: We should refactor the binding generated code to use references for state and thisObject.
+ return operationCaller(state, thisObject, WTFMove(promise), throwScope);
+ }
+
+ template<OperationCallerFunction operationCaller, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
+ static JSC::EncodedJSValue callOperation(JSC::ExecState* state, const char* operationName)
+ {
+ ASSERT(state);
+ auto throwScope = DECLARE_THROW_SCOPE(state->vm());
+ auto* thisObject = castForOperation(*state);
+ if (shouldThrow != CastedThisErrorBehavior::Assert && UNLIKELY(!thisObject)) {
+ if (shouldThrow == CastedThisErrorBehavior::Throw)
+ return throwThisTypeError(*state, throwScope, JSClass::info()->className, operationName);
+ // For custom promise-returning operations
+ return rejectPromiseWithThisTypeError(*state, JSClass::info()->className, operationName);
+ }
+ ASSERT(thisObject);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, JSClass::info());
+ // FIXME: We should refactor the binding generated code to use references for state and thisObject.
+ return operationCaller(state, thisObject, throwScope);
+ }
+
+ template<AttributeSetterFunction setter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
+ static bool setAttribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, JSC::EncodedJSValue encodedValue, const char* attributeName)
+ {
+ ASSERT(state);
+ auto throwScope = DECLARE_THROW_SCOPE(state->vm());
+ auto* thisObject = castForAttribute(*state, thisValue);
+ if (UNLIKELY(!thisObject))
+ return (shouldThrow == CastedThisErrorBehavior::Throw) ? throwSetterTypeError(*state, throwScope, JSClass::info()->className, attributeName) : false;
+ return setter(*state, *thisObject, JSC::JSValue::decode(encodedValue), throwScope);
+ }
+
+ template<AttributeGetterFunction getter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
+ static JSC::EncodedJSValue attribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, const char* attributeName)
+ {
+ ASSERT(state);
+ auto throwScope = DECLARE_THROW_SCOPE(state->vm());
+ auto* thisObject = castForAttribute(*state, thisValue);
+ if (UNLIKELY(!thisObject)) {
+ if (shouldThrow == CastedThisErrorBehavior::Throw)
+ return throwGetterTypeError(*state, throwScope, JSClass::info()->className, attributeName);
+ if (shouldThrow == CastedThisErrorBehavior::RejectPromise)
+ return rejectPromiseWithGetterTypeError(*state, JSClass::info()->className, attributeName);
+ return JSC::JSValue::encode(JSC::jsUndefined());
+ }
+ return JSC::JSValue::encode(getter(*state, *thisObject, throwScope));
+ }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingSecuritycppfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "JSDOMBindingSecurity.h"
+
+#include "DOMWindow.h"
+#include "Document.h"
+#include "Frame.h"
+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWindowBase.h"
+#include "SecurityOrigin.h"
+#include <wtf/text/WTFString.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+void printErrorMessageForFrame(Frame* frame, const String& message)
+{
+ if (!frame)
+ return;
+ frame->document()->domWindow()->printErrorMessage(message);
+}
+
+static inline bool canAccessDocument(JSC::ExecState* state, Document* targetDocument, SecurityReportingOption reportingOption)
+{
+ VM& vm = state->vm();
+ auto scope = DECLARE_THROW_SCOPE(vm);
+
+ if (!targetDocument)
+ return false;
+
+ DOMWindow& active = activeDOMWindow(state);
+
+ if (active.document()->securityOrigin().canAccess(targetDocument->securityOrigin()))
+ return true;
+
+ switch (reportingOption) {
+ case ThrowSecurityError:
+ throwSecurityError(*state, scope, targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
+ break;
+ case LogSecurityError:
+ printErrorMessageForFrame(targetDocument->frame(), targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
+ break;
+ case DoNotReportSecurityError:
+ break;
+ }
+
+ return false;
+}
+
+bool BindingSecurity::shouldAllowAccessToFrame(ExecState& state, Frame& frame, String& message)
+{
+ if (BindingSecurity::shouldAllowAccessToFrame(&state, &frame, DoNotReportSecurityError))
+ return true;
+ message = frame.document()->domWindow()->crossDomainAccessErrorMessage(activeDOMWindow(&state));
+ return false;
+}
+
+bool BindingSecurity::shouldAllowAccessToDOMWindow(ExecState& state, DOMWindow& globalObject, String& message)
+{
+ if (BindingSecurity::shouldAllowAccessToDOMWindow(&state, globalObject, DoNotReportSecurityError))
+ return true;
+ message = globalObject.crossDomainAccessErrorMessage(activeDOMWindow(&state));
+ return false;
+}
+
+bool BindingSecurity::shouldAllowAccessToDOMWindow(JSC::ExecState* state, DOMWindow& target, SecurityReportingOption reportingOption)
+{
+ return canAccessDocument(state, target.document(), reportingOption);
+}
+
+bool BindingSecurity::shouldAllowAccessToFrame(JSC::ExecState* state, Frame* target, SecurityReportingOption reportingOption)
+{
+ return target && canAccessDocument(state, target->document(), reportingOption);
+}
+
+bool BindingSecurity::shouldAllowAccessToNode(JSC::ExecState& state, Node* target)
+{
+ return !target || canAccessDocument(&state, &target->document(), LogSecurityError);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingSecurityhfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.h (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.h) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBindingSecurity.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2003-2006, 2008-2009, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2009 Google, Inc. All rights reserved.
+ * Copyright (C) 2012 Ericsson AB. All rights reserved.
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#pragma once
+
+#include "ExceptionOr.h"
+#include <wtf/Forward.h>
+
+namespace JSC {
+class ExecState;
+}
+
+namespace WebCore {
+
+class DOMWindow;
+class Frame;
+class Node;
+
+void printErrorMessageForFrame(Frame*, const String& message);
+
+enum SecurityReportingOption { DoNotReportSecurityError, LogSecurityError, ThrowSecurityError };
+
+namespace BindingSecurity {
+
+template<typename T> T* checkSecurityForNode(JSC::ExecState&, T&);
+template<typename T> T* checkSecurityForNode(JSC::ExecState&, T*);
+template<typename T> ExceptionOr<T*> checkSecurityForNode(JSC::ExecState&, ExceptionOr<T*>&&);
+template<typename T> ExceptionOr<T*> checkSecurityForNode(JSC::ExecState&, ExceptionOr<T&>&&);
+
+bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = LogSecurityError);
+bool shouldAllowAccessToDOMWindow(JSC::ExecState&, DOMWindow&, String& message);
+bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = LogSecurityError);
+bool shouldAllowAccessToFrame(JSC::ExecState&, Frame&, String& message);
+bool shouldAllowAccessToNode(JSC::ExecState&, Node*);
+
+};
+
+template<typename T> inline T* BindingSecurity::checkSecurityForNode(JSC::ExecState& state, T& node)
+{
+ return shouldAllowAccessToNode(state, &node) ? &node : nullptr;
+}
+
+template<typename T> inline T* BindingSecurity::checkSecurityForNode(JSC::ExecState& state, T* node)
+{
+ return shouldAllowAccessToNode(state, node) ? node : nullptr;
+}
+
+template<typename T> inline ExceptionOr<T*> BindingSecurity::checkSecurityForNode(JSC::ExecState& state, ExceptionOr<T*>&& value)
+{
+ if (value.hasException())
+ return value.releaseException();
+ return checkSecurityForNode(state, value.releaseReturnValue());
+}
+
+template<typename T> inline ExceptionOr<T*> BindingSecurity::checkSecurityForNode(JSC::ExecState& state, ExceptionOr<T&>&& value)
+{
+ if (value.hasException())
+ return value.releaseException();
+ return checkSecurityForNode(state, value.releaseReturnValue());
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorcppfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "JSDOMConstructor.h"
+
+#include <runtime/JSCInlines.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorObject);
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorWithDocument);
+
+void callFunctionWithCurrentArguments(JSC::ExecState& state, JSC::JSObject& thisObject, JSC::JSFunction& function)
+{
+ JSC::CallData callData;
+ JSC::CallType callType = JSC::getCallData(&function, callData);
+ ASSERT(callType != CallType::None);
+
+ JSC::MarkedArgumentBuffer arguments;
+ for (unsigned i = 0; i < state.argumentCount(); ++i)
+ arguments.append(state.uncheckedArgument(i));
+ JSC::call(&state, &function, callType, callData, &thisObject, arguments);
+}
+
+void DOMConstructorJSBuiltinObject::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
+{
+ auto* thisObject = jsCast<DOMConstructorJSBuiltinObject*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Base::visitChildren(thisObject, visitor);
+ visitor.append(thisObject->m_initializeFunction);
+}
+
+static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec)
+{
+ VM& vm = exec->vm();
+ auto scope = DECLARE_THROW_SCOPE(vm);
+ throwTypeError(exec, scope, ASCIILiteral("Constructor requires 'new' operator"));
+ return JSValue::encode(jsNull());
+}
+
+CallType DOMConstructorObject::getCallData(JSCell*, CallData& callData)
+{
+ callData.native.function = callThrowTypeError;
+ return CallType::Host;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConstructor.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructor.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructor.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -19,11 +19,64 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "DOMConstructorWithDocument.h"
-#include "JSDOMBinding.h"
</del><ins>+#include "Document.h"
+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+// Base class for all constructor objects in the JSC bindings.
+class DOMConstructorObject : public JSDOMObject {
+public:
+ typedef JSDOMObject Base;
+ static const unsigned StructureFlags = Base::StructureFlags | JSC::ImplementsHasInstance | JSC::ImplementsDefaultHasInstance | JSC::TypeOfShouldCallGetCallData;
+ static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject*, JSC::JSValue);
+
+protected:
+ DOMConstructorObject(JSC::Structure*, JSDOMGlobalObject&);
+
+ static String className(const JSObject*);
+ static JSC::CallType getCallData(JSCell*, JSC::CallData&);
+};
+
+// Constructors using this base class depend on being in a Document and
+// can never be used from a WorkerGlobalScope.
+class DOMConstructorWithDocument : public DOMConstructorObject {
+ typedef DOMConstructorObject Base;
+public:
+ Document* document() const
+ {
+ return downcast<Document>(scriptExecutionContext());
+ }
+
+protected:
+ DOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : DOMConstructorObject(structure, globalObject)
+ {
+ }
+
+ void finishCreation(JSDOMGlobalObject& globalObject)
+ {
+ Base::finishCreation(globalObject.vm());
+ ASSERT(globalObject.scriptExecutionContext()->isDocument());
+ }
+};
+
+class DOMConstructorJSBuiltinObject : public DOMConstructorObject {
+public:
+ typedef DOMConstructorObject Base;
+
+protected:
+ DOMConstructorJSBuiltinObject(JSC::Structure*, JSDOMGlobalObject&);
+ static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
+
+ JSC::JSFunction* initializeFunction();
+ void setInitializeFunction(JSC::VM&, JSC::JSFunction&);
+
+private:
+ JSC::WriteBarrier<JSC::JSFunction> m_initializeFunction;
+};
+
</ins><span class="cx"> template<typename JSClass> class JSDOMConstructorNotConstructable : public DOMConstructorObject {
</span><span class="cx"> public:
</span><span class="cx"> typedef DOMConstructorObject Base;
</span><span class="lines">@@ -131,6 +184,37 @@
</span><span class="cx"> JSC::FunctionExecutable* initializeExecutable(JSC::VM&);
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+inline JSC::Structure* DOMConstructorObject::createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+{
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+}
+
+inline DOMConstructorObject::DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : JSDOMObject(structure, globalObject)
+{
+}
+
+inline String DOMConstructorObject::className(const JSObject*)
+{
+ return ASCIILiteral("Function");
+}
+
+inline DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : DOMConstructorObject(structure, globalObject)
+{
+}
+
+inline JSC::JSFunction* DOMConstructorJSBuiltinObject::initializeFunction()
+{
+ return m_initializeFunction.get();
+}
+
+inline void DOMConstructorJSBuiltinObject::setInitializeFunction(JSC::VM& vm, JSC::JSFunction& function)
+{
+ m_initializeFunction.set(vm, this, &function);
+}
+
+
</ins><span class="cx"> template<typename JSClass> inline JSDOMConstructorNotConstructable<JSClass>* JSDOMConstructorNotConstructable<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
</span><span class="cx"> {
</span><span class="cx"> JSDOMConstructorNotConstructable* constructor = new (NotNull, JSC::allocateCell<JSDOMConstructorNotConstructable>(vm.heap)) JSDOMConstructorNotConstructable(structure, globalObject);
</span><span class="lines">@@ -220,6 +304,8 @@
</span><span class="cx"> initializeProperties(vm, globalObject);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void callFunctionWithCurrentArguments(JSC::ExecState&, JSC::JSObject& thisObject, JSC::JSFunction&);
+
</ins><span class="cx"> template<typename JSClass> inline JSC::EncodedJSValue JSBuiltinConstructor<JSClass>::callConstructor(JSC::ExecState& state, JSC::JSObject& object)
</span><span class="cx"> {
</span><span class="cx"> callFunctionWithCurrentArguments(state, object, *initializeFunction());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConverth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvert.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvert.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "IDBBindingUtilities.h"
</span><span class="cx"> #include "IDLTypes.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include <runtime/JSGlobalObjectInlines.h>
</span><span class="cx"> #include <runtime/JSONObject.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMExceptionHandlingcppfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,404 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "JSDOMExceptionHandling.h"
+
+#include "CachedScript.h"
+#include "DOMWindow.h"
+#include "ExceptionCodeDescription.h"
+#include "ExceptionHeaders.h"
+#include "ExceptionInterfaces.h"
+#include "JSDOMPromise.h"
+#include "JSDOMWindow.h"
+#include "JSDynamicDowncast.h"
+#include "JSExceptionBase.h"
+#include <inspector/ScriptCallStack.h>
+#include <inspector/ScriptCallStackFactory.h>
+#include <runtime/ErrorHandlingScope.h>
+#include <runtime/Exception.h>
+#include <runtime/ExceptionHelpers.h>
+#include <wtf/text/StringBuilder.h>
+
+#if ENABLE(INDEXED_DATABASE)
+#include "IDBDatabaseException.h"
+#endif
+
+using namespace JSC;
+
+namespace WebCore {
+
+void reportException(ExecState* exec, JSValue exceptionValue, CachedScript* cachedScript)
+{
+ VM& vm = exec->vm();
+ RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock());
+ auto* exception = jsDynamicDowncast<JSC::Exception*>(vm, exceptionValue);
+ if (!exception) {
+ exception = vm.lastException();
+ if (!exception)
+ exception = JSC::Exception::create(exec->vm(), exceptionValue, JSC::Exception::DoNotCaptureStack);
+ }
+
+ reportException(exec, exception, cachedScript);
+}
+
+String retrieveErrorMessage(ExecState& state, VM& vm, JSValue exception, CatchScope& catchScope)
+{
+ if (auto* exceptionBase = toExceptionBase(vm, exception))
+ return exceptionBase->toString();
+
+ // FIXME: <http://webkit.org/b/115087> Web Inspector: WebCore::reportException should not evaluate JavaScript handling exceptions
+ // If this is a custom exception object, call toString on it to try and get a nice string representation for the exception.
+ String errorMessage;
+ if (auto* error = jsDynamicDowncast<ErrorInstance*>(vm, exception))
+ errorMessage = error->sanitizedToString(&state);
+ else
+ errorMessage = exception.toWTFString(&state);
+
+ // We need to clear any new exception that may be thrown in the toString() call above.
+ // reportException() is not supposed to be making new exceptions.
+ catchScope.clearException();
+ vm.clearLastException();
+ return errorMessage;
+}
+
+void reportException(ExecState* exec, JSC::Exception* exception, CachedScript* cachedScript, ExceptionDetails* exceptionDetails)
+{
+ VM& vm = exec->vm();
+ auto scope = DECLARE_CATCH_SCOPE(vm);
+
+ RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock());
+ if (isTerminatedExecutionException(vm, exception))
+ return;
+
+ ErrorHandlingScope errorScope(exec->vm());
+
+ auto callStack = Inspector::createScriptCallStackFromException(exec, exception, Inspector::ScriptCallStack::maxCallStackSizeToCapture);
+ scope.clearException();
+ vm.clearLastException();
+
+ auto* globalObject = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
+ if (auto* window = jsDynamicDowncast<JSDOMWindow*>(vm, globalObject)) {
+ if (!window->wrapped().isCurrentlyDisplayedInFrame())
+ return;
+ }
+
+ int lineNumber = 0;
+ int columnNumber = 0;
+ String exceptionSourceURL;
+ if (auto* callFrame = callStack->firstNonNativeCallFrame()) {
+ lineNumber = callFrame->lineNumber();
+ columnNumber = callFrame->columnNumber();
+ exceptionSourceURL = callFrame->sourceURL();
+ }
+
+ auto errorMessage = retrieveErrorMessage(*exec, vm, exception->value(), scope);
+ globalObject->scriptExecutionContext()->reportException(errorMessage, lineNumber, columnNumber, exceptionSourceURL, exception, callStack->size() ? callStack.ptr() : nullptr, cachedScript);
+
+ if (exceptionDetails) {
+ exceptionDetails->message = errorMessage;
+ exceptionDetails->lineNumber = lineNumber;
+ exceptionDetails->columnNumber = columnNumber;
+ exceptionDetails->sourceURL = exceptionSourceURL;
+ }
+}
+
+void reportCurrentException(ExecState* exec)
+{
+ VM& vm = exec->vm();
+ auto scope = DECLARE_CATCH_SCOPE(vm);
+ auto* exception = scope.exception();
+ scope.clearException();
+ reportException(exec, exception);
+}
+
+static JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String* message = nullptr)
+{
+ if (!ec || ec == ExistingExceptionError)
+ return jsUndefined();
+
+ // FIXME: Handle other WebIDL exception types.
+ if (ec == TypeError) {
+ if (!message || message->isEmpty())
+ return createTypeError(exec);
+ return createTypeError(exec, *message);
+ }
+
+ if (ec == RangeError) {
+ if (!message || message->isEmpty())
+ return createRangeError(exec, ASCIILiteral("Bad value"));
+ return createRangeError(exec, *message);
+ }
+
+ if (ec == StackOverflowError)
+ return createStackOverflowError(exec);
+
+ // FIXME: All callers to createDOMException need to pass in the correct global object.
+ // For now, we're going to assume the lexicalGlobalObject. Which is wrong in cases like this:
+ // frames[0].document.createElement(null, null); // throws an exception which should have the subframe's prototypes.
+ JSDOMGlobalObject* globalObject = deprecatedGlobalObjectForPrototype(exec);
+
+ ExceptionCodeDescription description(ec);
+
+ CString messageCString;
+ if (message)
+ messageCString = message->utf8();
+ if (message && !message->isEmpty()) {
+ // It is safe to do this because the char* contents of the CString are copied into a new WTF::String before the CString is destroyed.
+ description.description = messageCString.data();
+ }
+
+ JSValue errorObject;
+ switch (description.type) {
+ case DOMCoreExceptionType:
+#if ENABLE(INDEXED_DATABASE)
+ case IDBDatabaseExceptionType:
+#endif
+ errorObject = toJS(exec, globalObject, DOMCoreException::create(description));
+ break;
+ case FileExceptionType:
+ errorObject = toJS(exec, globalObject, FileException::create(description));
+ break;
+ case SQLExceptionType:
+ errorObject = toJS(exec, globalObject, SQLException::create(description));
+ break;
+ case SVGExceptionType:
+ errorObject = toJS(exec, globalObject, SVGException::create(description));
+ break;
+ case XPathExceptionType:
+ errorObject = toJS(exec, globalObject, XPathException::create(description));
+ break;
+ }
+
+ ASSERT(errorObject);
+ addErrorInfo(exec, asObject(errorObject), true);
+ return errorObject;
+}
+
+JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String& message)
+{
+ return createDOMException(exec, ec, &message);
+}
+
+JSValue createDOMException(ExecState& state, Exception&& exception)
+{
+ return createDOMException(&state, exception.code(), exception.releaseMessage());
+}
+
+void propagateExceptionSlowPath(JSC::ExecState& state, JSC::ThrowScope& throwScope, Exception&& exception)
+{
+ ASSERT(!throwScope.exception());
+ throwException(&state, throwScope, createDOMException(state, WTFMove(exception)));
+}
+
+static EncodedJSValue throwTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const String& errorMessage)
+{
+ return throwVMTypeError(&state, scope, errorMessage);
+}
+
+static void appendArgumentMustBe(StringBuilder& builder, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
+{
+ builder.appendLiteral("Argument ");
+ builder.appendNumber(argumentIndex + 1);
+ builder.appendLiteral(" ('");
+ builder.append(argumentName);
+ builder.appendLiteral("') to ");
+ if (!functionName) {
+ builder.appendLiteral("the ");
+ builder.append(interfaceName);
+ builder.appendLiteral(" constructor");
+ } else {
+ builder.append(interfaceName);
+ builder.append('.');
+ builder.append(functionName);
+ }
+ builder.appendLiteral(" must be ");
+}
+
+JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
+{
+ auto& context = *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->scriptExecutionContext();
+ context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Deprecated attempt to access property '", attributeName, "' on a non-", interfaceName, " object."));
+ return JSValue::encode(jsUndefined());
+}
+
+void reportDeprecatedSetterError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
+{
+ auto& context = *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->scriptExecutionContext();
+ context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Deprecated attempt to set property '", attributeName, "' on a non-", interfaceName, " object."));
+}
+
+void throwNotSupportedError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, NOT_SUPPORTED_ERR));
+}
+
+void throwNotSupportedError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* message)
+{
+ ASSERT(!scope.exception());
+ String messageString(message);
+ throwException(&state, scope, createDOMException(&state, NOT_SUPPORTED_ERR, &messageString));
+}
+
+void throwInvalidStateError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* message)
+{
+ ASSERT(!scope.exception());
+ String messageString(message);
+ throwException(&state, scope, createDOMException(&state, INVALID_STATE_ERR, &messageString));
+}
+
+void throwSecurityError(JSC::ExecState& state, JSC::ThrowScope& scope, const String& message)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, SECURITY_ERR, message));
+}
+
+JSC::EncodedJSValue throwArgumentMustBeEnumError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedValues)
+{
+ StringBuilder builder;
+ appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
+ builder.appendLiteral("one of: ");
+ builder.append(expectedValues);
+ return throwVMTypeError(&state, scope, builder.toString());
+}
+
+JSC::EncodedJSValue throwArgumentMustBeFunctionError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
+{
+ StringBuilder builder;
+ appendArgumentMustBe(builder, argumentIndex, argumentName, interfaceName, functionName);
+ builder.appendLiteral("a function");
+ return throwVMTypeError(&state, scope, builder.toString());
+}
+
+JSC::EncodedJSValue throwArgumentTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedType)
+{
+ StringBuilder builder;
+ appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
+ builder.appendLiteral("an instance of ");
+ builder.append(expectedType);
+ return throwVMTypeError(&state, scope, builder.toString());
+}
+
+void throwArrayElementTypeError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ throwTypeError(state, scope, ASCIILiteral("Invalid Array element type"));
+}
+
+void throwAttributeTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName, const char* expectedType)
+{
+ throwTypeError(state, scope, makeString("The ", interfaceName, '.', attributeName, " attribute must be an instance of ", expectedType));
+}
+
+JSC::EncodedJSValue throwRequiredMemberTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* memberName, const char* dictionaryName, const char* expectedType)
+{
+ StringBuilder builder;
+ builder.appendLiteral("Member ");
+ builder.append(dictionaryName);
+ builder.append('.');
+ builder.append(memberName);
+ builder.appendLiteral(" is required and must be an instance of ");
+ builder.append(expectedType);
+ return throwVMTypeError(&state, scope, builder.toString());
+}
+
+JSC::EncodedJSValue throwConstructorScriptExecutionContextUnavailableError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName)
+{
+ return throwVMError(&state, scope, createReferenceError(&state, makeString(interfaceName, " constructor associated execution context is unavailable")));
+}
+
+void throwSequenceTypeError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ throwTypeError(state, scope, ASCIILiteral("Value is not a sequence"));
+}
+
+void throwNonFiniteTypeError(ExecState& state, JSC::ThrowScope& scope)
+{
+ throwTypeError(&state, scope, ASCIILiteral("The provided value is non-finite"));
+}
+
+String makeGetterTypeErrorMessage(const char* interfaceName, const char* attributeName)
+{
+ return makeString("The ", interfaceName, '.', attributeName, " getter can only be used on instances of ", interfaceName);
+}
+
+JSC::EncodedJSValue throwGetterTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName)
+{
+ return throwVMTypeError(&state, scope, makeGetterTypeErrorMessage(interfaceName, attributeName));
+}
+
+JSC::EncodedJSValue rejectPromiseWithGetterTypeError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
+{
+ return createRejectedPromiseWithTypeError(state, makeGetterTypeErrorMessage(interfaceName, attributeName));
+}
+
+bool throwSetterTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* attributeName)
+{
+ throwTypeError(state, scope, makeString("The ", interfaceName, '.', attributeName, " setter can only be used on instances of ", interfaceName));
+ return false;
+}
+
+String makeThisTypeErrorMessage(const char* interfaceName, const char* functionName)
+{
+ return makeString("Can only call ", interfaceName, '.', functionName, " on instances of ", interfaceName);
+}
+
+EncodedJSValue throwThisTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const char* interfaceName, const char* functionName)
+{
+ return throwTypeError(state, scope, makeThisTypeErrorMessage(interfaceName, functionName));
+}
+
+JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise& promise, const char* interfaceName, const char* methodName)
+{
+ promise.reject(TypeError, makeThisTypeErrorMessage(interfaceName, methodName));
+ return JSValue::encode(jsUndefined());
+}
+
+JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState& state, const char* interfaceName, const char* methodName)
+{
+ return createRejectedPromiseWithTypeError(state, makeThisTypeErrorMessage(interfaceName, methodName));
+}
+
+void throwDOMSyntaxError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, SYNTAX_ERR));
+}
+
+void throwDataCloneError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, DATA_CLONE_ERR));
+}
+
+void throwIndexSizeError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, INDEX_SIZE_ERR));
+}
+
+void throwTypeMismatchError(JSC::ExecState& state, JSC::ThrowScope& scope)
+{
+ ASSERT(!scope.exception());
+ throwException(&state, scope, createDOMException(&state, TYPE_MISMATCH_ERR));
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMExceptionHandlinghfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.h) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,130 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2003-2006, 2008-2009, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2009 Google, Inc. All rights reserved.
+ * Copyright (C) 2012 Ericsson AB. All rights reserved.
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#pragma once
+
+#include "ExceptionCode.h"
+#include "ExceptionOr.h"
+#include <runtime/Error.h>
+
+namespace JSC {
+class CatchScope;
+}
+
+namespace WebCore {
+
+class CachedScript;
+class DeferredPromise;
+class JSDOMGlobalObject;
+
+struct ExceptionDetails {
+ String message;
+ int lineNumber { 0 };
+ int columnNumber { 0 };
+ String sourceURL;
+};
+
+WEBCORE_EXPORT JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
+WEBCORE_EXPORT void reportDeprecatedSetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
+
+void throwAttributeTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName, const char* expectedType);
+WEBCORE_EXPORT bool throwSetterTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName);
+
+void throwArrayElementTypeError(JSC::ExecState&, JSC::ThrowScope&);
+void throwDataCloneError(JSC::ExecState&, JSC::ThrowScope&);
+void throwDOMSyntaxError(JSC::ExecState&, JSC::ThrowScope&); // Not the same as a JavaScript syntax error.
+void throwIndexSizeError(JSC::ExecState&, JSC::ThrowScope&);
+void throwInvalidStateError(JSC::ExecState&, JSC::ThrowScope&, const char* message);
+WEBCORE_EXPORT void throwNonFiniteTypeError(JSC::ExecState&, JSC::ThrowScope&);
+void throwNotSupportedError(JSC::ExecState&, JSC::ThrowScope&);
+void throwNotSupportedError(JSC::ExecState&, JSC::ThrowScope&, const char* message);
+void throwSecurityError(JSC::ExecState&, JSC::ThrowScope&, const String& message);
+WEBCORE_EXPORT void throwSequenceTypeError(JSC::ExecState&, JSC::ThrowScope&);
+void throwTypeMismatchError(JSC::ExecState&, JSC::ThrowScope&);
+
+WEBCORE_EXPORT JSC::EncodedJSValue throwArgumentMustBeEnumError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedValues);
+JSC::EncodedJSValue throwArgumentMustBeFunctionError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName);
+WEBCORE_EXPORT JSC::EncodedJSValue throwArgumentTypeError(JSC::ExecState&, JSC::ThrowScope&, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedType);
+WEBCORE_EXPORT JSC::EncodedJSValue throwRequiredMemberTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* memberName, const char* dictionaryName, const char* expectedType);
+JSC::EncodedJSValue throwConstructorScriptExecutionContextUnavailableError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName);
+
+String makeGetterTypeErrorMessage(const char* interfaceName, const char* attributeName);
+String makeThisTypeErrorMessage(const char* interfaceName, const char* attributeName);
+
+WEBCORE_EXPORT JSC::EncodedJSValue throwGetterTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* attributeName);
+WEBCORE_EXPORT JSC::EncodedJSValue throwThisTypeError(JSC::ExecState&, JSC::ThrowScope&, const char* interfaceName, const char* functionName);
+
+WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithGetterTypeError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
+WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(DeferredPromise&, const char* interfaceName, const char* operationName);
+WEBCORE_EXPORT JSC::EncodedJSValue rejectPromiseWithThisTypeError(JSC::ExecState&, const char* interfaceName, const char* operationName);
+
+String retrieveErrorMessage(JSC::ExecState&, JSC::VM&, JSC::JSValue exception, JSC::CatchScope&);
+WEBCORE_EXPORT void reportException(JSC::ExecState*, JSC::JSValue exception, CachedScript* = nullptr);
+WEBCORE_EXPORT void reportException(JSC::ExecState*, JSC::Exception*, CachedScript* = nullptr, ExceptionDetails* = nullptr);
+void reportCurrentException(JSC::ExecState*);
+
+JSC::JSValue createDOMException(JSC::ExecState&, Exception&&);
+JSC::JSValue createDOMException(JSC::ExecState*, ExceptionCode, const String&);
+
+// Convert a DOM implementation exception into a JavaScript exception in the execution state.
+void propagateException(JSC::ExecState&, JSC::ThrowScope&, Exception&&);
+WEBCORE_EXPORT void propagateExceptionSlowPath(JSC::ExecState&, JSC::ThrowScope&, Exception&&);
+
+// ExceptionOr handling.
+void propagateException(JSC::ExecState&, JSC::ThrowScope&, ExceptionOr<void>&&);
+template<typename T> JSC::JSValue toJS(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, ExceptionOr<T>&&);
+template<typename T> JSC::JSValue toJSNewlyCreated(JSC::ExecState&, JSDOMGlobalObject&, JSC::ThrowScope&, ExceptionOr<T>&& value);
+
+
+ALWAYS_INLINE void propagateException(JSC::ExecState& state, JSC::ThrowScope& throwScope, Exception&& exception)
+{
+ if (throwScope.exception())
+ return;
+ propagateExceptionSlowPath(state, throwScope, WTFMove(exception));
+}
+
+inline void propagateException(JSC::ExecState& state, JSC::ThrowScope& throwScope, ExceptionOr<void>&& value)
+{
+ if (UNLIKELY(value.hasException()))
+ propagateException(state, throwScope, value.releaseException());
+}
+
+template<typename T> inline JSC::JSValue toJS(JSC::ExecState& state, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, ExceptionOr<T>&& value)
+{
+ if (UNLIKELY(value.hasException())) {
+ propagateException(state, throwScope, value.releaseException());
+ return { };
+ }
+ return toJS(&state, &globalObject, value.releaseReturnValue());
+}
+
+template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState& state, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, ExceptionOr<T>&& value)
+{
+ if (UNLIKELY(value.hasException())) {
+ propagateException(state, throwScope, value.releaseException());
+ return { };
+ }
+ return toJSNewlyCreated(&state, &globalObject, value.releaseReturnValue());
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "InspectorController.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSDOMGlobalObjectTask.h"
</span><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span><span class="lines">@@ -286,6 +287,54 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+DOMWindow& callerDOMWindow(ExecState* exec)
+{
+ class GetCallerGlobalObjectFunctor {
+ public:
+ GetCallerGlobalObjectFunctor() = default;
+
+ StackVisitor::Status operator()(StackVisitor& visitor) const
+ {
+ if (!m_hasSkippedFirstFrame) {
+ m_hasSkippedFirstFrame = true;
+ return StackVisitor::Continue;
+ }
+
+ if (auto* codeBlock = visitor->codeBlock())
+ m_globalObject = codeBlock->globalObject();
+ else {
+ ASSERT(visitor->callee());
+ // FIXME: Callee is not an object if the caller is Web Assembly.
+ // Figure out what to do here. We can probably get the global object
+ // from the top-most Wasm Instance. https://bugs.webkit.org/show_bug.cgi?id=165721
+ if (visitor->callee()->isObject())
+ m_globalObject = jsCast<JSObject*>(visitor->callee())->globalObject();
+ }
+ return StackVisitor::Done;
+ }
+
+ JSGlobalObject* globalObject() const { return m_globalObject; }
+
+ private:
+ mutable bool m_hasSkippedFirstFrame { false };
+ mutable JSGlobalObject* m_globalObject { nullptr };
+ };
+
+ GetCallerGlobalObjectFunctor iter;
+ exec->iterate(iter);
+ return iter.globalObject() ? asJSDOMWindow(iter.globalObject())->wrapped() : firstDOMWindow(exec);
+}
+
+DOMWindow& activeDOMWindow(ExecState* exec)
+{
+ return asJSDOMWindow(exec->lexicalGlobalObject())->wrapped();
+}
+
+DOMWindow& firstDOMWindow(ExecState* exec)
+{
+ return asJSDOMWindow(exec->vmEntryGlobalObject())->wrapped();
+}
+
</ins><span class="cx"> void JSDOMWindowBase::fireFrameClearedWatchpointsForWindow(DOMWindow* window)
</span><span class="cx"> {
</span><span class="cx"> JSC::VM& vm = commonVM();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -97,4 +97,8 @@
</span><span class="cx"> JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld&);
</span><span class="cx"> WEBCORE_EXPORT JSDOMWindow* toJSDOMWindow(JSC::VM&, JSC::JSValue);
</span><span class="cx">
</span><ins>+ DOMWindow& callerDOMWindow(JSC::ExecState*);
+ DOMWindow& activeDOMWindow(JSC::ExecState*);
+ DOMWindow& firstDOMWindow(JSC::ExecState*);
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLCollection.h"
</span><span class="cx"> #include "HTMLDocument.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSEvent.h"
</span><span class="cx"> #include "JSEventListener.h"
</span><span class="cx"> #include "JSHTMLAudioElement.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowPropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLDocument.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSDOMWindowBase.h"
</span><span class="cx"> #include "JSElement.h"
</span><span class="cx"> #include "JSHTMLCollection.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWrapperCachecppfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.cpp (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2004-2011, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "JSDOMWrapperCache.h"
+
+#include <runtime/JSCInlines.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+Structure* getCachedDOMStructure(JSDOMGlobalObject& globalObject, const ClassInfo* classInfo)
+{
+ JSDOMStructureMap& structures = globalObject.structures(NoLockingNecessary);
+ return structures.get(classInfo).get();
+}
+
+Structure* cacheDOMStructure(JSDOMGlobalObject& globalObject, Structure* structure, const ClassInfo* classInfo)
+{
+ auto locker = lockDuringMarking(globalObject.vm().heap, globalObject.gcLock());
+ JSDOMStructureMap& structures = globalObject.structures(locker);
+ ASSERT(!structures.contains(classInfo));
+ return structures.set(classInfo, WriteBarrier<Structure>(globalObject.vm(), &globalObject, structure)).iterator->value.get();
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWrapperCachehfromrev211353trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h (from rev 211353, trunk/Source/WebCore/bindings/js/JSDOMBinding.h) (0 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -0,0 +1,206 @@
</span><ins>+/*
+ * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
+ * Copyright (C) 2003-2006, 2008-2009, 2013, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
+ * Copyright (C) 2009 Google, Inc. All rights reserved.
+ * Copyright (C) 2012 Ericsson AB. All rights reserved.
+ * Copyright (C) 2013 Michael Pruett <michael@68k.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#pragma once
+
+#include "DOMWrapperWorld.h"
+#include "JSDOMGlobalObject.h"
+#include "JSDOMWrapper.h"
+#include "JSDynamicDowncast.h"
+#include "ScriptWrappable.h"
+#include "ScriptWrappableInlines.h"
+#include "WebCoreTypedArrayController.h"
+#include <heap/Weak.h>
+#include <heap/WeakInlines.h>
+#include <runtime/JSArrayBuffer.h>
+#include <runtime/TypedArrayInlines.h>
+#include <runtime/TypedArrays.h>
+
+namespace WebCore {
+
+WEBCORE_EXPORT JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject&, const JSC::ClassInfo*);
+WEBCORE_EXPORT JSC::Structure* cacheDOMStructure(JSDOMGlobalObject&, JSC::Structure*, const JSC::ClassInfo*);
+
+template<typename WrapperClass> JSC::Structure* getDOMStructure(JSC::VM&, JSDOMGlobalObject&);
+template<typename WrapperClass> JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState*);
+template<typename WrapperClass> JSC::JSObject* getDOMPrototype(JSC::VM&, JSC::JSGlobalObject*);
+
+JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, JSC::ArrayBuffer*);
+void* wrapperKey(JSC::ArrayBuffer*);
+
+JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, void*);
+JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*);
+JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*);
+
+bool setInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*, JSC::WeakHandleOwner*);
+bool setInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*, JSDOMObject* wrapper, JSC::WeakHandleOwner* wrapperOwner);
+bool setInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner);
+
+bool clearInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*);
+bool clearInlineCachedWrapper(DOMWrapperWorld&, ScriptWrappable*, JSDOMObject* wrapper);
+bool clearInlineCachedWrapper(DOMWrapperWorld&, JSC::ArrayBuffer*, JSC::JSArrayBuffer* wrapper);
+
+template<typename DOMClass> JSC::JSObject* getCachedWrapper(DOMWrapperWorld&, DOMClass&);
+template<typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld& world, Ref<DOMClass>& object) { return getCachedWrapper(world, object.get()); }
+template<typename DOMClass, typename WrapperClass> void cacheWrapper(DOMWrapperWorld&, DOMClass*, WrapperClass*);
+template<typename DOMClass, typename WrapperClass> void uncacheWrapper(DOMWrapperWorld&, DOMClass*, WrapperClass*);
+template<typename DOMClass, typename T> auto createWrapper(JSDOMGlobalObject*, Ref<T>&&) -> typename std::enable_if<std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type;
+template<typename DOMClass, typename T> auto createWrapper(JSDOMGlobalObject*, Ref<T>&&) -> typename std::enable_if<!std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type;
+
+template<typename DOMClass> JSC::JSValue wrap(JSC::ExecState*, JSDOMGlobalObject*, DOMClass&);
+
+
+// Inline functions and template definitions.
+
+inline JSDOMGlobalObject* deprecatedGlobalObjectForPrototype(JSC::ExecState* exec)
+{
+ // FIXME: Callers to this function should be using the global object
+ // from which the object is being created, instead of assuming the lexical one.
+ // e.g. subframe.document.body should use the subframe's global object, not the lexical one.
+ return JSC::jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
+}
+
+template<typename WrapperClass> inline JSC::Structure* getDOMStructure(JSC::VM& vm, JSDOMGlobalObject& globalObject)
+{
+ if (JSC::Structure* structure = getCachedDOMStructure(globalObject, WrapperClass::info()))
+ return structure;
+ return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, &globalObject, WrapperClass::createPrototype(vm, &globalObject)), WrapperClass::info());
+}
+
+template<typename WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec)
+{
+ // FIXME: This function is wrong. It uses the wrong global object for creating the prototype structure.
+ return getDOMStructure<WrapperClass>(exec->vm(), *deprecatedGlobalObjectForPrototype(exec));
+}
+
+template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
+{
+ return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, *JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));
+}
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld& world, JSC::ArrayBuffer*)
+{
+ return static_cast<WebCoreTypedArrayController*>(world.vm().m_typedArrayController.get())->wrapperOwner();
+}
+
+inline void* wrapperKey(JSC::ArrayBuffer* domObject)
+{
+ return domObject;
+}
+
+inline JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld&, void*) { return nullptr; }
+inline bool setInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*, JSC::WeakHandleOwner*) { return false; }
+inline bool clearInlineCachedWrapper(DOMWrapperWorld&, void*, JSDOMObject*) { return false; }
+
+inline JSDOMObject* getInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject)
+{
+ if (!world.isNormal())
+ return nullptr;
+ return domObject->wrapper();
+}
+
+inline JSC::JSArrayBuffer* getInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* buffer)
+{
+ if (!world.isNormal())
+ return nullptr;
+ return buffer->m_wrapper.get();
+}
+
+inline bool setInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMObject* wrapper, JSC::WeakHandleOwner* wrapperOwner)
+{
+ if (!world.isNormal())
+ return false;
+ domObject->setWrapper(wrapper, wrapperOwner, &world);
+ return true;
+}
+
+inline bool setInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper, JSC::WeakHandleOwner* wrapperOwner)
+{
+ if (!world.isNormal())
+ return false;
+ domObject->m_wrapper = JSC::Weak<JSC::JSArrayBuffer>(wrapper, wrapperOwner, &world);
+ return true;
+}
+
+inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, ScriptWrappable* domObject, JSDOMObject* wrapper)
+{
+ if (!world.isNormal())
+ return false;
+ domObject->clearWrapper(wrapper);
+ return true;
+}
+
+inline bool clearInlineCachedWrapper(DOMWrapperWorld& world, JSC::ArrayBuffer* domObject, JSC::JSArrayBuffer* wrapper)
+{
+ if (!world.isNormal())
+ return false;
+ weakClear(domObject->m_wrapper, wrapper);
+ return true;
+}
+
+template<typename DOMClass> inline JSC::JSObject* getCachedWrapper(DOMWrapperWorld& world, DOMClass& domObject)
+{
+ if (auto* wrapper = getInlineCachedWrapper(world, &domObject))
+ return wrapper;
+ return world.m_wrappers.get(wrapperKey(&domObject));
+}
+
+template<typename DOMClass, typename WrapperClass> inline void cacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
+{
+ JSC::WeakHandleOwner* owner = wrapperOwner(world, domObject);
+ if (setInlineCachedWrapper(world, domObject, wrapper, owner))
+ return;
+ weakAdd(world.m_wrappers, wrapperKey(domObject), JSC::Weak<JSC::JSObject>(wrapper, owner, &world));
+}
+
+template<typename DOMClass, typename WrapperClass> inline void uncacheWrapper(DOMWrapperWorld& world, DOMClass* domObject, WrapperClass* wrapper)
+{
+ if (clearInlineCachedWrapper(world, domObject, wrapper))
+ return;
+ weakRemove(world.m_wrappers, wrapperKey(domObject), wrapper);
+}
+
+template<typename DOMClass, typename T> inline auto createWrapper(JSDOMGlobalObject* globalObject, Ref<T>&& domObject) -> typename std::enable_if<std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type
+{
+ using WrapperClass = typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass;
+
+ ASSERT(!getCachedWrapper(globalObject->world(), domObject));
+ auto* domObjectPtr = domObject.ptr();
+ auto* wrapper = WrapperClass::create(getDOMStructure<WrapperClass>(globalObject->vm(), *globalObject), globalObject, WTFMove(domObject));
+ cacheWrapper(globalObject->world(), domObjectPtr, wrapper);
+ return wrapper;
+}
+
+template<typename DOMClass, typename T> inline auto createWrapper(JSDOMGlobalObject* globalObject, Ref<T>&& domObject) -> typename std::enable_if<!std::is_same<DOMClass, T>::value, typename JSDOMWrapperConverterTraits<DOMClass>::WrapperClass*>::type
+{
+ return createWrapper<DOMClass>(globalObject, static_reference_cast<DOMClass>(WTFMove(domObject)));
+}
+
+template<typename DOMClass> inline JSC::JSValue wrap(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMClass& domObject)
+{
+ if (auto* wrapper = getCachedWrapper(globalObject->world(), domObject))
+ return wrapper;
+ return toJSNewlyCreated(state, globalObject, Ref<DOMClass>(domObject));
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventTargetCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventTargetCustom.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventTargetCustom.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSEventTargetCustom.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -27,6 +27,8 @@
</span><span class="cx">
</span><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
+#include "JSDOMBindingSecurity.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "HTMLFormElement.h"
</span><span class="cx"> #include "JSCustomElementInterface.h"
</span><ins>+#include "JSDOMConstructor.h"
</ins><span class="cx"> #include "JSNodeCustom.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include <runtime/InternalFunction.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSLocationCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -24,6 +24,8 @@
</span><span class="cx"> #include "JSLocation.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "RuntimeApplicationChecks.h"
</span><span class="cx"> #include <runtime/JSFunction.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "JSMutationObserver.h"
</span><span class="cx">
</span><span class="cx"> #include "ExceptionCode.h"
</span><ins>+#include "JSDOMConstructor.h"
</ins><span class="cx"> #include "JSMutationCallback.h"
</span><span class="cx"> #include "JSNodeCustom.h"
</span><span class="cx"> #include "MutationObserver.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSQLStatementErrorCallbackCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSQLStatementErrorCallbackCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSQLStatementErrorCallbackCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSSQLStatementErrorCallbackCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "JSSQLStatementErrorCallback.h"
</span><span class="cx">
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSSQLError.h"
</span><span class="cx"> #include "JSSQLTransaction.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStorageCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include "JSStorage.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include <runtime/IdentifierInlines.h>
</span><span class="cx"> #include <runtime/PropertyNameArray.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -28,7 +28,8 @@
</span><span class="cx"> #include "JSWorker.h"
</span><span class="cx">
</span><span class="cx"> #include "Document.h"
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMConstructor.h"
+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMGlobalObject.h"
</span><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "Worker.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSXPathNSResolverCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/JSXPathNSResolverCustom.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #include "JSXPathNSResolver.h"
</span><span class="cx">
</span><span class="cx"> #include "JSCustomXPathNSResolver.h"
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScheduledActioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScheduledAction.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScheduledAction.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/ScheduledAction.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameLoader.h"
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMWindow.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span><span class="cx"> #include "JSMainThreadExecStateInstrumentation.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx"> #include "GCController.h"
</span><span class="cx"> #include "HTMLPlugInElement.h"
</span><span class="cx"> #include "InspectorInstrumentation.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMWindow.h"
</span><span class="cx"> #include "JSDocument.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.h (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.h        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/ScriptController.h        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -56,11 +56,12 @@
</span><span class="cx"> class HTMLDocument;
</span><span class="cx"> class HTMLPlugInElement;
</span><span class="cx"> class LoadableModuleScript;
</span><ins>+class ScriptSourceCode;
</ins><span class="cx"> class SecurityOrigin;
</span><del>-class ScriptSourceCode;
</del><span class="cx"> class Widget;
</span><ins>+struct ExceptionDetails;
</ins><span class="cx">
</span><del>-typedef HashMap<void*, RefPtr<JSC::Bindings::RootObject>> RootObjectMap;
</del><ins>+using RootObjectMap = HashMap<void*, RefPtr<JSC::Bindings::RootObject>>;
</ins><span class="cx">
</span><span class="cx"> enum ReasonForCallingCanExecuteScripts {
</span><span class="cx"> AboutToExecuteScript,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -31,7 +31,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ScriptGlobalObject.h"
</span><span class="cx">
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMConvert.h"
+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSInspectorFrontendHost.h"
</span><span class="cx"> #include <runtime/IdentifierInlines.h>
</span><span class="cx">
</span><span class="lines">@@ -45,7 +46,7 @@
</span><span class="cx"> JSLockHolder lock(vm);
</span><span class="cx"> auto scope = DECLARE_CATCH_SCOPE(vm);
</span><span class="cx"> auto& globalObject = *jsCast<JSDOMGlobalObject*>(scriptState.lexicalGlobalObject());
</span><del>- globalObject.putDirect(vm, Identifier::fromString(&vm, name), toJS(&scriptState, &globalObject, value));
</del><ins>+ globalObject.putDirect(vm, Identifier::fromString(&vm, name), toJS<IDLInterface<InspectorFrontendHost>>(scriptState, globalObject, value));
</ins><span class="cx"> if (UNLIKELY(scope.exception())) {
</span><span class="cx"> reportException(&scriptState, scope.exception());
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsStructuredClonecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/StructuredClone.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/StructuredClone.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/js/StructuredClone.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "StructuredClone.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include <runtime/JSTypedArrays.h>
</span><span class="cx">
</span><span class="cx"> using namespace JSC;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -3013,6 +3013,9 @@
</span><span class="cx"> push(@implContentHeader, GenerateImplementationContentHeader($interface));
</span><span class="cx">
</span><span class="cx"> $implIncludes{"JSDOMBinding.h"} = 1;
</span><ins>+ $implIncludes{"JSDOMBindingCaller.h"} = 1;
+ $implIncludes{"JSDOMExceptionHandling.h"} = 1;
+ $implIncludes{"JSDOMWrapperCache.h"} = 1;
</ins><span class="cx"> $implIncludes{"<wtf/GetPtr.h>"} = 1;
</span><span class="cx"> $implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $indexedGetterFunction;
</span><span class="cx">
</span><span class="lines">@@ -3633,6 +3636,7 @@
</span><span class="cx"> if ($interface->extendedAttributes->{CheckSecurity} &&
</span><span class="cx"> !$attribute->extendedAttributes->{DoNotCheckSecurity} &&
</span><span class="cx"> !$attribute->extendedAttributes->{DoNotCheckSecurityOnGetter}) {
</span><ins>+ AddToImplIncludes("JSDOMBindingSecurity.h");
</ins><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><span class="cx"> push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(&state, thisObject.wrapped(), ThrowSecurityError))\n");
</span><span class="cx"> } else {
</span><span class="lines">@@ -3803,6 +3807,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($interface->extendedAttributes->{CheckSecurity} && !$attribute->extendedAttributes->{DoNotCheckSecurity} && !$attribute->extendedAttributes->{DoNotCheckSecurityOnSetter}) {
</span><ins>+ AddToImplIncludes("JSDOMBindingSecurity.h");
</ins><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><span class="cx"> push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(&state, thisObject.wrapped(), ThrowSecurityError))\n");
</span><span class="cx"> } else {
</span><span class="lines">@@ -4051,6 +4056,7 @@
</span><span class="cx"> push(@implContent, " UNUSED_PARAM(throwScope);\n");
</span><span class="cx">
</span><span class="cx"> if ($interface->extendedAttributes->{CheckSecurity} and !$function->extendedAttributes->{DoNotCheckSecurity}) {
</span><ins>+ AddToImplIncludes("JSDOMBindingSecurity.h");
</ins><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><span class="cx"> push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
</span><span class="cx"> } else {
</span><span class="lines">@@ -4477,6 +4483,7 @@
</span><span class="cx"> }
</span><span class="cx"> if ($codeGenerator->ExtendedAttributeContains($callWith, "CallerDocument")) {
</span><span class="cx"> $implIncludes{"Document.h"} = 1;
</span><ins>+ $implIncludes{"JSDOMWindowBase.h"} = 1;
</ins><span class="cx"> push(@$outputArray, " auto* document = callerDOMWindow($statePointer).document();\n");
</span><span class="cx"> push(@$outputArray, " if (!document)\n");
</span><span class="cx"> push(@$outputArray, " return" . ($returnValue ? " " . $returnValue : "") . ";\n");
</span><span class="lines">@@ -4488,9 +4495,21 @@
</span><span class="cx"> $implIncludes{"<inspector/ScriptCallStackFactory.h>"} = 1;
</span><span class="cx"> push(@callWithArgs, "WTFMove(scriptArguments)");
</span><span class="cx"> }
</span><del>- push(@callWithArgs, "activeDOMWindow($statePointer)") if $codeGenerator->ExtendedAttributeContains($callWith, "ActiveWindow");
- push(@callWithArgs, "firstDOMWindow($statePointer)") if $codeGenerator->ExtendedAttributeContains($callWith, "FirstWindow");
- push(@callWithArgs, "callerDOMWindow($statePointer)") if $codeGenerator->ExtendedAttributeContains($callWith, "CallerWindow");
</del><ins>+ if ($codeGenerator->ExtendedAttributeContains($callWith, "ActiveWindow")) {
+ $implIncludes{"JSDOMWindowBase.h"} = 1;
+ push(@callWithArgs, "activeDOMWindow($statePointer)");
+
+ }
+ if ($codeGenerator->ExtendedAttributeContains($callWith, "FirstWindow")) {
+ $implIncludes{"JSDOMWindowBase.h"} = 1;
+ push(@callWithArgs, "firstDOMWindow($statePointer)");
+
+ }
+ if ($codeGenerator->ExtendedAttributeContains($callWith, "CallerWindow")) {
+ $implIncludes{"JSDOMWindowBase.h"} = 1;
+ push(@callWithArgs, "callerDOMWindow($statePointer)");
+
+ }
</ins><span class="cx">
</span><span class="cx"> return @callWithArgs;
</span><span class="cx"> }
</span><span class="lines">@@ -4599,8 +4618,6 @@
</span><span class="cx"> $quotedFunctionName = "nullptr";
</span><span class="cx"> }
</span><span class="cx">
</span><del>- AddToImplIncludes("JSDOMBinding.h", $conditional);
-
</del><span class="cx"> my $argumentIndex = 0;
</span><span class="cx"> foreach my $argument (@{$function->arguments}) {
</span><span class="cx"> my $type = $argument->type;
</span><span class="lines">@@ -5064,6 +5081,7 @@
</span><span class="cx">
</span><span class="cx"> # FIXME: We currently just report the exception. We should probably add an extended attribute to indicate when
</span><span class="cx"> # we want the exception to be rethrown instead.
</span><ins>+ $includesRef->{"JSDOMExceptionHandling.h"} = 1;
</ins><span class="cx"> push(@$contentRef, " if (returnedException)\n");
</span><span class="cx"> push(@$contentRef, " reportException(state, returnedException);\n");
</span><span class="cx"> push(@$contentRef, " return !returnedException;\n");
</span><span class="lines">@@ -5612,7 +5630,10 @@
</span><span class="cx"> AddToImplIncludesForIDLType($type, $conditional);
</span><span class="cx"> AddToImplIncludes("JSDOMConvert.h", $conditional);
</span><span class="cx">
</span><del>- $value = "BindingSecurity::checkSecurityForNode($stateReference, $value)" if $context->extendedAttributes->{CheckSecurityForNode};
</del><ins>+ if ($context->extendedAttributes->{CheckSecurityForNode}) {
+ AddToImplIncludes("JSDOMBindingSecurity.h", $conditional);
+ $value = "BindingSecurity::checkSecurityForNode($stateReference, $value)";
+ }
</ins><span class="cx">
</span><span class="cx"> my $IDLType = GetIDLType($interface, $type, $context);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSInterfaceNamecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSInterfaceName.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,12 @@
</span><span class="cx"> #include "JSTestActiveDOMObject.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSNode.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -24,8 +24,11 @@
</span><span class="cx"> #include "CustomElementReactionQueue.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSTestCEReactionsStringifier.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsStringifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -23,8 +23,11 @@
</span><span class="cx">
</span><span class="cx"> #include "CustomElementReactionQueue.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include "JSTestCallbackFunction.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSTestNode.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include "SerializedScriptValue.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionWithTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> #include "JSTestCallbackFunctionWithTypedefs.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include <runtime/JSArray.h>
</span><span class="cx"> #include <runtime/JSLock.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMStringList.h"
</span><span class="cx"> #include "JSTestNode.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSTestClassWithJSBuiltinConstructor.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "TestClassWithJSBuiltinConstructorBuiltins.h"
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSTestCustomConstructorWithNoInterfaceObject.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestCustomNamedGetter.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestDOMJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -27,8 +27,11 @@
</span><span class="cx"> #include "DOMJITIDLType.h"
</span><span class="cx"> #include "DOMJITIDLTypeFilter.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSElement.h"
</span><span class="cx"> #include "JSNodeList.h"
</span><span class="cx"> #include <interpreter/FrameTracers.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSTestEventConstructor.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestEventTarget.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSNode.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/PropertyNameArray.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestException.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSTestGenerateIsReachable.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestGlobalObject.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "WebCoreJSClientData.h"
</span><span class="cx"> #include <runtime/Error.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -25,8 +25,11 @@
</span><span class="cx"> #include "JSTestInterface.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSTestObj.h"
</span><span class="cx"> #include "TestSupplemental.h"
</span><span class="cx"> #include <runtime/Error.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceLeadingUnderscorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestInterfaceLeadingUnderscore.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestIterablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestIterable.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMIterator.h"
</span><ins>+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,7 +22,10 @@
</span><span class="cx"> #include "JSTestJSBuiltinConstructor.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "TestJSBuiltinConstructorBuiltins.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestMediaQueryListListener.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSMediaQueryListListener.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestNamedConstructor.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,10 +22,13 @@
</span><span class="cx"> #include "JSTestNode.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMIterator.h"
</span><span class="cx"> #include "JSDOMPromise.h"
</span><ins>+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -27,12 +27,17 @@
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "JSBlob.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMIterator.h"
</span><span class="cx"> #include "JSDOMPromise.h"
</span><span class="cx"> #include "JSDOMStringList.h"
</span><span class="cx"> #include "JSDOMWindow.h"
</span><ins>+#include "JSDOMWindowBase.h"
</ins><span class="cx"> #include "JSDOMWindowShell.h"
</span><ins>+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSDocument.h"
</span><span class="cx"> #include "JSElement.h"
</span><span class="cx"> #include "JSEventListener.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -23,8 +23,11 @@
</span><span class="cx">
</span><span class="cx"> #include "JSBlob.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <wtf/GetPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestOverloadedConstructorsWithSequence.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <runtime/JSArray.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestOverrideBuiltins.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSNode.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestSerialization.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSTestNode.h"
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -25,8 +25,11 @@
</span><span class="cx"> #include "JSTestSerializedScriptValueInterface.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSMessagePort.h"
</span><span class="cx"> #include "SerializedScriptValue.h"
</span><span class="cx"> #include <runtime/Error.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -22,8 +22,11 @@
</span><span class="cx"> #include "JSTestTypedefs.h"
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><ins>+#include "JSDOMBindingCaller.h"
</ins><span class="cx"> #include "JSDOMConstructor.h"
</span><span class="cx"> #include "JSDOMConvert.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
</ins><span class="cx"> #include "JSSVGPoint.h"
</span><span class="cx"> #include "JSTestCallbackFunction.h"
</span><span class="cx"> #include "JSTestCallbackInterface.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeobjcWebScriptObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/objc/WebScriptObject.mm (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/objc/WebScriptObject.mm        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/bridge/objc/WebScriptObject.mm        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #import "BridgeJSC.h"
</span><span class="cx"> #import "Frame.h"
</span><ins>+#import "JSDOMBindingSecurity.h"
</ins><span class="cx"> #import "JSDOMWindow.h"
</span><span class="cx"> #import "JSDOMWindowCustom.h"
</span><span class="cx"> #import "JSHTMLElement.h"
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameElementBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "ScriptController.h"
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "ChromeClient.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "EventNames.h"
</span><ins>+#include "ExceptionCode.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "HTMLImageLoader.h"
</span><span class="cx"> #include "HTMLNames.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #include "InspectorTimelineAgent.h"
</span><span class="cx"> #include "InspectorWorkerAgent.h"
</span><span class="cx"> #include "InstrumentingAgents.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSDOMWindow.h"
</span><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> #include "InspectorPageAgent.h"
</span><span class="cx"> #include "InstrumentingAgents.h"
</span><span class="cx"> #include "IntRect.h"
</span><ins>+#include "JSDOMBindingSecurity.h"
</ins><span class="cx"> #include "JSEventListener.h"
</span><span class="cx"> #include "JSNode.h"
</span><span class="cx"> #include "MainFrame.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "InspectorController.h"
</span><span class="cx"> #include "InspectorFrontendClient.h"
</span><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx"> #include "Page.h"
</span><span class="lines">@@ -45,7 +46,6 @@
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-#include "JSDOMWindowBase.h"
</del><span class="cx"> #include "WebCoreThreadInternal.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerScriptDebugServer.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerScriptDebugServer.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebCore/inspector/WorkerScriptDebugServer.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WorkerScriptDebugServer.h"
</span><span class="cx">
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMExceptionHandling.h"
</ins><span class="cx"> #include "Timer.h"
</span><span class="cx"> #include "WorkerGlobalScope.h"
</span><span class="cx"> #include "WorkerRunLoop.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-01-30 Sam Weinig <sam@webkit.org>
+
+ JSDOMBinding is too big. Split it up!
+ https://bugs.webkit.org/show_bug.cgi?id=167601
+
+ Reviewed by Darin Adler.
+
+ * Shared/WebCoreArgumentCoders.cpp:
+ Replace include of JSDOMBinding with JSDOMExceptionHandling.
+
</ins><span class="cx"> 2017-01-30 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [QuickLook] FrameLoaderClient should return the new QuickLookHandleClient it creates
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkitmessagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit/messages.py (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit/messages.py        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/Scripts/webkit/messages.py        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx"> special_cases = {
</span><span class="cx"> 'String': ['<wtf/text/WTFString.h>'],
</span><span class="cx"> 'WebCore::CompositionUnderline': ['<WebCore/Editor.h>'],
</span><del>- 'WebCore::ExceptionDetails': ['<WebCore/JSDOMBinding.h>'],
</del><ins>+ 'WebCore::ExceptionDetails': ['<WebCore/JSDOMExceptionHandling.h>'],
</ins><span class="cx"> 'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
</span><span class="cx"> 'WebCore::GrammarDetail': ['<WebCore/TextCheckerClient.h>'],
</span><span class="cx"> 'WebCore::HasInsecureContent': ['<WebCore/FrameLoaderTypes.h>'],
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> #include <WebCore/GraphicsLayer.h>
</span><span class="cx"> #include <WebCore/IDBGetResult.h>
</span><span class="cx"> #include <WebCore/Image.h>
</span><del>-#include <WebCore/JSDOMBinding.h>
</del><ins>+#include <WebCore/JSDOMExceptionHandling.h>
</ins><span class="cx"> #include <WebCore/Length.h>
</span><span class="cx"> #include <WebCore/Path.h>
</span><span class="cx"> #include <WebCore/PluginData.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -118,6 +118,7 @@
</span><span class="cx"> #include <WebCore/FloatRect.h>
</span><span class="cx"> #include <WebCore/FocusDirection.h>
</span><span class="cx"> #include <WebCore/JSDOMBinding.h>
</span><ins>+#include <WebCore/JSDOMExceptionHandling.h>
</ins><span class="cx"> #include <WebCore/MIMETypeRegistry.h>
</span><span class="cx"> #include <WebCore/RenderEmbeddedObject.h>
</span><span class="cx"> #include <WebCore/SerializedCryptoKeyWrap.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #include <WebCore/GeolocationClient.h>
</span><span class="cx"> #include <WebCore/GeolocationController.h>
</span><span class="cx"> #include <WebCore/GeolocationPosition.h>
</span><ins>+#include <WebCore/JSDOMExceptionHandling.h>
</ins><span class="cx"> #include <WebCore/JSDOMWindow.h>
</span><span class="cx"> #include <WebCore/JSNotification.h>
</span><span class="cx"> #include <WebCore/MainFrame.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (211402 => 211403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-01-31 03:06:05 UTC (rev 211402)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-01-31 03:37:34 UTC (rev 211403)
</span><span class="lines">@@ -145,6 +145,7 @@
</span><span class="cx"> #include <WebCore/HistoryItem.h>
</span><span class="cx"> #include <WebCore/HitTestResult.h>
</span><span class="cx"> #include <WebCore/InspectorController.h>
</span><ins>+#include <WebCore/JSDOMExceptionHandling.h>
</ins><span class="cx"> #include <WebCore/JSDOMWindow.h>
</span><span class="cx"> #include <WebCore/KeyboardEvent.h>
</span><span class="cx"> #include <WebCore/LibWebRTCProvider.h>
</span></span></pre>
</div>
</div>
</body>
</html>