<!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>[211892] trunk/Source/WebCore</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/211892">211892</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-02-08 12:24:37 -0800 (Wed, 08 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Split JSDOMConstructor.h/cpp up by class
https://bugs.webkit.org/show_bug.cgi?id=167958
Patch by Sam Weinig <sam@webkit.org> on 2017-02-08
Reviewed by Tim Horton.
Splits JSDOMConstructor up by class.
- Renames DOMConstructorObject to JSDOMConstructorBase.
- Renames DOMConstructorWithDocument to JSDOMConstructorWithDocument.
- Renames DOMConstructorJSBuiltinObject to JSDOMBuiltinConstructorBase.
- Renames JSBuiltinConstructor to JSDOMBuiltinConstructor.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Add new files.
* bindings/js/JSDOMBinding.h:
(WebCore::propertyNameToString): Deleted.
(WebCore::propertyNameToAtomicString): Deleted.
* bindings/js/JSDOMBuiltinConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMBuiltinConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
* bindings/js/JSDOMBuiltinConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMConstructor.cpp: Removed.
* bindings/js/JSDOMConstructor.h: Remove all classes other than JSDOMConstructor.
* bindings/js/JSDOMConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
* bindings/js/JSDOMConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMConstructorNotConstructable.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMConstructorWithDocument.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
* bindings/js/JSDOMConstructorWithDocument.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMNamedConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
* bindings/js/JSDOMConvertStrings.h:
(WebCore::propertyNameToString):
(WebCore::propertyNameToAtomicString):
Move these here from JSDOMBinding.
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver):
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
(WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::constructJSWorker):
* bindings/scripts/CodeGeneratorJS.pm:
(GetConstructorTemplateClassName):
(GenerateConstructorDeclaration):
Update includes/names.
* dom/StaticRange.cpp:
(WebCore::StaticRange::~StaticRange):
* dom/StaticRange.h:
Add out-of-line destructor, so Node.h does not have to be included.</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="#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="#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="#trunkSourceWebCorebindingsjsJSDOMConvertStringsh">trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp">trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp">trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSStorageCustomcpp">trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSUserMessageHandlersNamespaceCustomcpp">trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerCustomcpp">trunk/Source/WebCore/bindings/js/JSWorkerCustom.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="#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="#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="#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="#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="#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="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializationInheritcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializationInheritFinalcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCoredomStaticRangecpp">trunk/Source/WebCore/dom/StaticRange.cpp</a></li>
<li><a href="#trunkSourceWebCoredomStaticRangeh">trunk/Source/WebCore/dom/StaticRange.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorh">trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorBasecpp">trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorBaseh">trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorBasecpp">trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorBaseh">trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorNotConstructableh">trunk/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorWithDocumentcpp">trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorWithDocumenth">trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMNamedConstructorh">trunk/Source/WebCore/bindings/js/JSDOMNamedConstructor.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConstructorcpp">trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -1107,7 +1107,9 @@
</span><span class="cx"> bindings/js/JSCustomXPathNSResolver.cpp
</span><span class="cx"> bindings/js/JSDOMBinding.cpp
</span><span class="cx"> bindings/js/JSDOMBindingSecurity.cpp
</span><del>- bindings/js/JSDOMConstructor.cpp
</del><ins>+ bindings/js/JSDOMBuiltinConstructorBase.cpp
+ bindings/js/JSDOMConstructorBase.cpp
+ bindings/js/JSDOMConstructorWithDocument.cpp
</ins><span class="cx"> bindings/js/JSDOMExceptionHandling.cpp
</span><span class="cx"> bindings/js/JSDOMGlobalObject.cpp
</span><span class="cx"> bindings/js/JSDOMGlobalObjectTask.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/ChangeLog        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2017-02-08 Sam Weinig <sam@webkit.org>
+
+ Split JSDOMConstructor.h/cpp up by class
+ https://bugs.webkit.org/show_bug.cgi?id=167958
+
+ Reviewed by Tim Horton.
+
+ Splits JSDOMConstructor up by class.
+ - Renames DOMConstructorObject to JSDOMConstructorBase.
+ - Renames DOMConstructorWithDocument to JSDOMConstructorWithDocument.
+ - Renames DOMConstructorJSBuiltinObject to JSDOMBuiltinConstructorBase.
+ - Renames JSBuiltinConstructor to JSDOMBuiltinConstructor.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ Add new files.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::propertyNameToString): Deleted.
+ (WebCore::propertyNameToAtomicString): Deleted.
+ * bindings/js/JSDOMBuiltinConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+ * bindings/js/JSDOMBuiltinConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
+ * bindings/js/JSDOMBuiltinConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+ * bindings/js/JSDOMConstructor.cpp: Removed.
+ * bindings/js/JSDOMConstructor.h: Remove all classes other than JSDOMConstructor.
+ * bindings/js/JSDOMConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
+ * bindings/js/JSDOMConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+ * bindings/js/JSDOMConstructorNotConstructable.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+ * bindings/js/JSDOMConstructorWithDocument.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
+ * bindings/js/JSDOMConstructorWithDocument.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+ * bindings/js/JSDOMNamedConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
+
+ * bindings/js/JSDOMConvertStrings.h:
+ (WebCore::propertyNameToString):
+ (WebCore::propertyNameToAtomicString):
+ Move these here from JSDOMBinding.
+
+ * bindings/js/JSHTMLElementCustom.cpp:
+ (WebCore::constructJSHTMLElement):
+ * bindings/js/JSMutationObserverCustom.cpp:
+ (WebCore::constructJSMutationObserver):
+ * bindings/js/JSReadableStreamPrivateConstructors.cpp:
+ * bindings/js/JSStorageCustom.cpp:
+ * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
+ (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
+ * bindings/js/JSWorkerCustom.cpp:
+ (WebCore::constructJSWorker):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GetConstructorTemplateClassName):
+ (GenerateConstructorDeclaration):
+ Update includes/names.
+
+ * dom/StaticRange.cpp:
+ (WebCore::StaticRange::~StaticRange):
+ * dom/StaticRange.h:
+ Add out-of-line destructor, so Node.h does not have to be included.
+
</ins><span class="cx"> 2017-02-08 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Initialize the main RunLoop in iOS WebKitLegacy
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -2856,7 +2856,6 @@
</span><span class="cx">                 7C3F01C21C8E5AC200ADD962 /* UserContentProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F01BF1C8E5AB100ADD962 /* UserContentProvider.cpp */; };
</span><span class="cx">                 7C45C9CF1E3EFDF700AAB558 /* JSDOMBindingSecurity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */; };
</span><span class="cx">                 7C45C9D01E3EFDFB00AAB558 /* JSDOMWrapperCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */; };
</span><del>-                7C45C9D11E3EFE0500AAB558 /* JSDOMConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */; };
</del><span class="cx">                 7C45C9D21E3EFE0800AAB558 /* JSDOMExceptionHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */; };
</span><span class="cx">                 7C45C9D31E3FCBD700AAB558 /* JSDOMWrapperCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C81E3E8B5100AAB558 /* JSDOMWrapperCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C45C9D41E3FCBDF00AAB558 /* JSDOMBindingSecurity.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2954,6 +2953,9 @@
</span><span class="cx">                 7C93F34E1AA6BF0700A98BAB /* ContentExtensionCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C93F34C1AA6BF0700A98BAB /* ContentExtensionCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C9DBFED1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9DBFEB1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp */; };
</span><span class="cx">                 7C9DBFEE1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9DBFEC1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h */; };
</span><ins>+                7CC01D0A1E4A7B0400E529CC /* JSDOMBuiltinConstructorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0CEF2E1E4A5832008DEB80 /* JSDOMBuiltinConstructorBase.cpp */; };
+                7CC01D0B1E4A7B0400E529CC /* JSDOMConstructorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0CEF2F1E4A58AD008DEB80 /* JSDOMConstructorBase.cpp */; };
+                7CC01D0C1E4A7B0400E529CC /* JSDOMConstructorWithDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0CEF301E4A58F1008DEB80 /* JSDOMConstructorWithDocument.cpp */; };
</ins><span class="cx">                 7CC289DF1AA0FE5D009A9CE3 /* URLRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEE393817974274001D7580 /* URLRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7CC564B818BABEA6001B9652 /* TelephoneNumberDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CC564B618BABEA6001B9652 /* TelephoneNumberDetector.h */; };
</span><span class="cx">                 7CC564BA18BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */; };
</span><span class="lines">@@ -10435,6 +10437,15 @@
</span><span class="cx">                 7AF9B20A18CFB5F300C64BEF /* JSVTTRegionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVTTRegionList.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVTTRegionList.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C0406121C66EE9C00AF0711 /* NSScrollerImpSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScrollerImpSPI.h; sourceTree = "<group>"; };
</span><ins>+                7C0CEF281E4A542C008DEB80 /* JSDOMConstructorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructorBase.h; sourceTree = "<group>"; };
+                7C0CEF291E4A54D3008DEB80 /* JSDOMConstructorWithDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructorWithDocument.h; sourceTree = "<group>"; };
+                7C0CEF2A1E4A556C008DEB80 /* JSDOMBuiltinConstructorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMBuiltinConstructorBase.h; sourceTree = "<group>"; };
+                7C0CEF2B1E4A55C3008DEB80 /* JSDOMConstructorNotConstructable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructorNotConstructable.h; sourceTree = "<group>"; };
+                7C0CEF2C1E4A564D008DEB80 /* JSDOMNamedConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMNamedConstructor.h; sourceTree = "<group>"; };
+                7C0CEF2D1E4A56C5008DEB80 /* JSDOMBuiltinConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMBuiltinConstructor.h; sourceTree = "<group>"; };
+                7C0CEF2E1E4A5832008DEB80 /* JSDOMBuiltinConstructorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMBuiltinConstructorBase.cpp; sourceTree = "<group>"; };
+                7C0CEF2F1E4A58AD008DEB80 /* JSDOMConstructorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConstructorBase.cpp; sourceTree = "<group>"; };
+                7C0CEF301E4A58F1008DEB80 /* JSDOMConstructorWithDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConstructorWithDocument.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 7C1843FB1C8B7283002EB973 /* Autofill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Autofill.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C1843FC1C8B7283002EB973 /* Autofill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Autofill.h; sourceTree = "<group>"; };
</span><span class="cx">                 7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutoFillButtonElement.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -10479,7 +10490,6 @@
</span><span class="cx">                 7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMBindingSecurity.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C45C9CB1E3E8E4900AAB558 /* JSDOMWrapperCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWrapperCache.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMExceptionHandling.cpp; sourceTree = "<group>"; };
</span><del>-                7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConstructor.cpp; sourceTree = "<group>"; };
</del><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">@@ -22407,8 +22417,6 @@
</span><span class="cx">                                 7C45C9C61E3E8ABA00AAB558 /* JSDOMBindingCaller.h */,
</span><span class="cx">                                 7C45C9CA1E3E8D2E00AAB558 /* JSDOMBindingSecurity.cpp */,
</span><span class="cx">                                 7C45C9C91E3E8CD700AAB558 /* JSDOMBindingSecurity.h */,
</span><del>-                                7C45C9CD1E3E900B00AAB558 /* JSDOMConstructor.cpp */,
-                                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
</del><span class="cx">                                 7C45C9CC1E3E8F0800AAB558 /* JSDOMExceptionHandling.cpp */,
</span><span class="cx">                                 7C45C9C71E3E8AFF00AAB558 /* JSDOMExceptionHandling.h */,
</span><span class="cx">                                 E1C36CBC0EB08062007410BC /* JSDOMGlobalObject.cpp */,
</span><span class="lines">@@ -22855,6 +22863,16 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 CE261694187E6469007955F3 /* ios */,
</span><ins>+                                7C0CEF2D1E4A56C5008DEB80 /* JSDOMBuiltinConstructor.h */,
+                                7C0CEF2E1E4A5832008DEB80 /* JSDOMBuiltinConstructorBase.cpp */,
+                                7C0CEF2A1E4A556C008DEB80 /* JSDOMBuiltinConstructorBase.h */,
+                                413C2C331BC29A7B0075204C /* JSDOMConstructor.h */,
+                                7C0CEF2F1E4A58AD008DEB80 /* JSDOMConstructorBase.cpp */,
+                                7C0CEF281E4A542C008DEB80 /* JSDOMConstructorBase.h */,
+                                7C0CEF2B1E4A55C3008DEB80 /* JSDOMConstructorNotConstructable.h */,
+                                7C0CEF301E4A58F1008DEB80 /* JSDOMConstructorWithDocument.cpp */,
+                                7C0CEF291E4A54D3008DEB80 /* JSDOMConstructorWithDocument.h */,
+                                7C0CEF2C1E4A564D008DEB80 /* JSDOMNamedConstructor.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = Constructors;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -29513,6 +29531,7 @@
</span><span class="cx">                                 975CA28A130365F800E99AD9 /* Crypto.cpp in Sources */,
</span><span class="cx">                                 E172AF6D180F24C600FBADB9 /* CryptoAlgorithm.cpp in Sources */,
</span><span class="cx">                                 E125F8411824253A00D84CD9 /* CryptoAlgorithmAES_CBC.cpp in Sources */,
</span><ins>+                                7CC01D0C1E4A7B0400E529CC /* JSDOMConstructorWithDocument.cpp in Sources */,
</ins><span class="cx">                                 E125F845182425C900D84CD9 /* CryptoAlgorithmAES_CBCMac.cpp in Sources */,
</span><span class="cx">                                 E1FE137A184D21BB00892F13 /* CryptoAlgorithmAES_KW.cpp in Sources */,
</span><span class="cx">                                 E1FE137E184D270200892F13 /* CryptoAlgorithmAES_KWMac.cpp in Sources */,
</span><span class="lines">@@ -29556,6 +29575,7 @@
</span><span class="cx">                                 9444CBE31D8861980073A074 /* CSSCustomIdentValue.cpp in Sources */,
</span><span class="cx">                                 94D4AC621DC24C8E0080F02D /* CSSCustomPropertyValue.cpp in Sources */,
</span><span class="cx">                                 4A9CC81716BB9AC600EC645A /* CSSDefaultStyleSheets.cpp in Sources */,
</span><ins>+                                7CC01D0A1E4A7B0400E529CC /* JSDOMBuiltinConstructorBase.cpp in Sources */,
</ins><span class="cx">                                 94476BDA1DFCAC0300690E23 /* CSSDeferredParser.cpp in Sources */,
</span><span class="cx">                                 FBB0C5B717BBD626003D3677 /* CSSFilterImageValue.cpp in Sources */,
</span><span class="cx">                                 BC64B4D50CB4298A005F2B62 /* CSSFontFace.cpp in Sources */,
</span><span class="lines">@@ -30372,7 +30392,6 @@
</span><span class="cx">                                 1AC2260C0DB69F190089B669 /* JSDOMApplicationCache.cpp in Sources */,
</span><span class="cx">                                 93B70D6309EB0C7C009D8468 /* JSDOMBinding.cpp in Sources */,
</span><span class="cx">                                 7C45C9CF1E3EFDF700AAB558 /* JSDOMBindingSecurity.cpp in Sources */,
</span><del>-                                7C45C9D11E3EFE0500AAB558 /* JSDOMConstructor.cpp in Sources */,
</del><span class="cx">                                 BC60D7C00D29A46300B9918F /* JSDOMCoreException.cpp in Sources */,
</span><span class="cx">                                 FD67773B195CB1E60072E0D3 /* JSDOMCSSNamespace.cpp in Sources */,
</span><span class="cx">                                 40ECAE8116B8B68A00C36103 /* JSDOMError.cpp in Sources */,
</span><span class="lines">@@ -31583,6 +31602,7 @@
</span><span class="cx">                                 FD3160AA12B026F700C1A359 /* ReverbConvolverStage.cpp in Sources */,
</span><span class="cx">                                 FD3160AC12B026F700C1A359 /* ReverbInputBuffer.cpp in Sources */,
</span><span class="cx">                                 BC74DA381013F3F7007987AD /* RGBColor.cpp in Sources */,
</span><ins>+                                7CC01D0B1E4A7B0400E529CC /* JSDOMConstructorBase.cpp in Sources */,
</ins><span class="cx">                                 A8CFF5E70A155A05000A4234 /* RootInlineBox.cpp in Sources */,
</span><span class="cx">                                 49E911C80EF86D47009D0CAF /* RotateTransformOperation.cpp in Sources */,
</span><span class="cx">                                 A73F95FE12C97BFE0031AAF9 /* RoundedRect.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -46,7 +46,9 @@
</span><span class="cx"> #include "JSCustomXPathNSResolver.cpp"
</span><span class="cx"> #include "JSDOMBinding.cpp"
</span><span class="cx"> #include "JSDOMBindingSecurity.cpp"
</span><del>-#include "JSDOMConstructor.cpp"
</del><ins>+#include "JSDOMBuiltinConstructorBase.cpp"
+#include "JSDOMConstructorBase.cpp"
+#include "JSDOMConstructorWithDocument.cpp"
</ins><span class="cx"> #include "JSDOMExceptionHandling.cpp"
</span><span class="cx"> #include "JSDOMGlobalObject.cpp"
</span><span class="cx"> #include "JSDOMGlobalObjectTask.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -57,17 +57,6 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool hasIteratorMethod(JSC::ExecState&, JSC::JSValue);
</span><span class="cx">
</span><del>-inline String propertyNameToString(JSC::PropertyName propertyName)
-{
- ASSERT(!propertyName.isSymbol());
- return propertyName.uid() ? propertyName.uid() : propertyName.publicName();
-}
-
-inline AtomicString propertyNameToAtomicString(JSC::PropertyName propertyName)
-{
- return AtomicString(propertyName.uid() ? propertyName.uid() : propertyName.publicName());
-}
-
</del><span class="cx"> template<JSC::NativeFunction nativeFunction, int length> JSC::EncodedJSValue nonCachingStaticFunctionGetter(JSC::ExecState* exec, JSC::EncodedJSValue, JSC::PropertyName propertyName)
</span><span class="cx"> {
</span><span class="cx"> return JSC::JSValue::encode(JSC::JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,131 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMBuiltinConstructorBase.h"
+#include "JSDOMExceptionHandling.h"
+#include "JSDOMWrapperCache.h"
+
+namespace WebCore {
+
+template<typename JSClass> class JSDOMBuiltinConstructor : public JSDOMBuiltinConstructorBase {
+public:
+ using Base = JSDOMBuiltinConstructorBase;
+
+ static JSDOMBuiltinConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
+ static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
+
+ DECLARE_INFO;
+
+ // Usually defined for each specialization class.
+ static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
+
+private:
+ JSDOMBuiltinConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : Base(structure, globalObject)
+ {
+ }
+
+ void finishCreation(JSC::VM&, JSDOMGlobalObject&);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+ static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
+
+ JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject&);
+ JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject*);
+
+ // Usually defined for each specialization class.
+ void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
+ // Must be defined for each specialization class.
+ JSC::FunctionExecutable* initializeExecutable(JSC::VM&);
+};
+
+template<typename JSClass> inline JSDOMBuiltinConstructor<JSClass>* JSDOMBuiltinConstructor<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+{
+ JSDOMBuiltinConstructor* constructor = new (NotNull, JSC::allocateCell<JSDOMBuiltinConstructor>(vm.heap)) JSDOMBuiltinConstructor(structure, globalObject);
+ constructor->finishCreation(vm, globalObject);
+ return constructor;
+}
+
+template<typename JSClass> inline JSC::Structure* JSDOMBuiltinConstructor<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
+{
+ return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+}
+
+template<typename JSClass> inline void JSDOMBuiltinConstructor<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
+{
+ Base::finishCreation(vm);
+ ASSERT(inherits(vm, info()));
+ setInitializeFunction(vm, *JSC::JSFunction::createBuiltinFunction(vm, initializeExecutable(vm), &globalObject));
+ initializeProperties(vm, globalObject);
+}
+
+template<typename JSClass> inline JSC::EncodedJSValue JSDOMBuiltinConstructor<JSClass>::callConstructor(JSC::ExecState& state, JSC::JSObject& object)
+{
+ Base::callFunctionWithCurrentArguments(state, object, *initializeFunction());
+ return JSC::JSValue::encode(&object);
+}
+
+template<typename JSClass> inline JSC::EncodedJSValue JSDOMBuiltinConstructor<JSClass>::callConstructor(JSC::ExecState& state, JSC::JSObject* object)
+{
+ JSC::VM& vm = state.vm();
+ auto scope = DECLARE_THROW_SCOPE(vm);
+ if (!object)
+ return throwConstructorScriptExecutionContextUnavailableError(state, scope, info()->className);
+ return callConstructor(state, *object);
+}
+
+template<typename JSClass> inline
+typename std::enable_if<JSDOMObjectInspector<JSClass>::isSimpleWrapper, JSC::JSObject&>::type createJSObject(JSDOMBuiltinConstructor<JSClass>& constructor)
+{
+ auto& globalObject = *constructor.globalObject();
+ return *JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject, JSClass::DOMWrapped::create());
+}
+
+template<typename JSClass> inline
+typename std::enable_if<JSDOMObjectInspector<JSClass>::isBuiltin, JSC::JSObject&>::type createJSObject(JSDOMBuiltinConstructor<JSClass>& constructor)
+{
+ auto& globalObject = *constructor.globalObject();
+ return *JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject);
+}
+
+template<typename JSClass> inline
+typename std::enable_if<JSDOMObjectInspector<JSClass>::isComplexWrapper, JSC::JSObject*>::type createJSObject(JSDOMBuiltinConstructor<JSClass>& constructor)
+{
+ ScriptExecutionContext* context = constructor.scriptExecutionContext();
+ if (!context)
+ return nullptr;
+ auto& globalObject = *constructor.globalObject();
+ return JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject, JSClass::DOMWrapped::create(*context));
+}
+
+template<typename JSClass> inline JSC::EncodedJSValue JSC_HOST_CALL JSDOMBuiltinConstructor<JSClass>::construct(JSC::ExecState* state)
+{
+ ASSERT(state);
+ auto* castedThis = JSC::jsCast<JSDOMBuiltinConstructor*>(state->jsCallee());
+ return castedThis->callConstructor(*state, createJSObject(*castedThis));
+}
+
+template<typename JSClass> inline JSC::ConstructType JSDOMBuiltinConstructor<JSClass>::getConstructData(JSC::JSCell*, JSC::ConstructData& constructData)
+{
+ constructData.native.function = construct;
+ return JSC::ConstructType::Host;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorBasecppfromrev211891trunkSourceWebCorebindingsjsJSDOMConstructorcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.cpp (from rev 211891, trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp) (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,51 @@
</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 "JSDOMBuiltinConstructorBase.h"
+
+#include <runtime/JSCInlines.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSDOMBuiltinConstructorBase::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 JSDOMBuiltinConstructorBase::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
+{
+ auto* thisObject = jsCast<JSDOMBuiltinConstructorBase*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+ Base::visitChildren(thisObject, visitor);
+ visitor.append(thisObject->m_initializeFunction);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBuiltinConstructorBaseh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMConstructorBase.h"
+
+namespace WebCore {
+
+class JSDOMBuiltinConstructorBase : public JSDOMConstructorBase {
+public:
+ using Base = JSDOMConstructorBase;
+
+protected:
+ JSDOMBuiltinConstructorBase(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : JSDOMConstructorBase(structure, globalObject)
+ {
+ }
+
+ static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
+
+ JSC::JSFunction* initializeFunction();
+ void setInitializeFunction(JSC::VM&, JSC::JSFunction&);
+
+ static void callFunctionWithCurrentArguments(JSC::ExecState&, JSC::JSObject& thisObject, JSC::JSFunction&);
+
+private:
+ JSC::WriteBarrier<JSC::JSFunction> m_initializeFunction;
+};
+
+inline JSC::JSFunction* JSDOMBuiltinConstructorBase::initializeFunction()
+{
+ return m_initializeFunction.get();
+}
+
+inline void JSDOMBuiltinConstructorBase::setInitializeFunction(JSC::VM& vm, JSC::JSFunction& function)
+{
+ m_initializeFunction.set(vm, this, &function);
+}
+
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * 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
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConstructor.h (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructor.h        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructor.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -19,69 +19,15 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "Document.h"
-#include "JSDOMExceptionHandling.h"
-#include "JSDOMWrapperCache.h"
</del><ins>+#include "JSDOMConstructorBase.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-// Base class for all constructor objects in the JSC bindings.
-class DOMConstructorObject : public JSDOMObject {
</del><ins>+template<typename JSClass> class JSDOMConstructor : public JSDOMConstructorBase {
</ins><span class="cx"> public:
</span><del>- 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);
</del><ins>+ using Base = JSDOMConstructorBase;
</ins><span class="cx">
</span><del>-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;
-};
-
-template<typename JSClass> class JSDOMConstructorNotConstructable : public DOMConstructorObject {
-public:
- typedef DOMConstructorObject Base;
-
- static JSDOMConstructorNotConstructable* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
</del><ins>+ static JSDOMConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
</ins><span class="cx"> static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
</span><span class="cx">
</span><span class="cx"> DECLARE_INFO;
</span><span class="lines">@@ -90,41 +36,11 @@
</span><span class="cx"> static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- JSDOMConstructorNotConstructable(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, globalObject) { }
- void finishCreation(JSC::VM&, JSDOMGlobalObject&);
-
- // Usually defined for each specialization class.
- void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
-
- static JSC::EncodedJSValue JSC_HOST_CALL callThrowTypeError(JSC::ExecState* exec)
</del><ins>+ JSDOMConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : Base(structure, globalObject)
</ins><span class="cx"> {
</span><del>- JSC::VM& vm = exec->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- JSC::throwTypeError(exec, scope, ASCIILiteral("Illegal constructor"));
- return JSC::JSValue::encode(JSC::jsNull());
</del><span class="cx"> }
</span><span class="cx">
</span><del>- static JSC::CallType getCallData(JSC::JSCell*, JSC::CallData& callData)
- {
- callData.native.function = callThrowTypeError;
- return JSC::CallType::Host;
- }
-};
-
-template<typename JSClass> class JSDOMConstructor : public DOMConstructorObject {
-public:
- typedef DOMConstructorObject Base;
-
- static JSDOMConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
- static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
-
- DECLARE_INFO;
-
- // Must be defined for each specialization class.
- static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
-
-private:
- JSDOMConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, globalObject) { }
</del><span class="cx"> void finishCreation(JSC::VM&, JSDOMGlobalObject&);
</span><span class="cx"> static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
</span><span class="cx">
</span><span class="lines">@@ -134,106 +50,6 @@
</span><span class="cx"> static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template<typename JSClass> class JSDOMNamedConstructor : public DOMConstructorWithDocument {
-public:
- typedef DOMConstructorWithDocument Base;
-
- static JSDOMNamedConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
- static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
-
- DECLARE_INFO;
-
- // Must be defined for each specialization class.
- static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
-
-private:
- JSDOMNamedConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, globalObject) { }
- void finishCreation(JSC::VM&, JSDOMGlobalObject&);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-
- // Usually defined for each specialization class.
- void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
- // Must be defined for each specialization class.
- static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
-};
-
-template<typename JSClass> class JSBuiltinConstructor : public DOMConstructorJSBuiltinObject {
-public:
- using Base = DOMConstructorJSBuiltinObject;
-
- static JSBuiltinConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
- static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
-
- DECLARE_INFO;
-
- // Usually defined for each specialization class.
- static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
-
-private:
- JSBuiltinConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, globalObject) { }
- void finishCreation(JSC::VM&, JSDOMGlobalObject&);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
- static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
-
- JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject&);
- JSC::EncodedJSValue callConstructor(JSC::ExecState&, JSC::JSObject*);
-
- // Usually defined for each specialization class.
- void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
- // Must be defined for each specialization class.
- JSC::FunctionExecutable* initializeExecutable(JSC::VM&);
-};
-
-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);
-}
-
-
-template<typename JSClass> inline JSDOMConstructorNotConstructable<JSClass>* JSDOMConstructorNotConstructable<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
-{
- JSDOMConstructorNotConstructable* constructor = new (NotNull, JSC::allocateCell<JSDOMConstructorNotConstructable>(vm.heap)) JSDOMConstructorNotConstructable(structure, globalObject);
- constructor->finishCreation(vm, globalObject);
- return constructor;
-}
-
-template<typename JSClass> inline JSC::Structure* JSDOMConstructorNotConstructable<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
-{
- return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
-}
-
-template<typename JSClass> inline void JSDOMConstructorNotConstructable<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
-{
- Base::finishCreation(vm);
- ASSERT(inherits(vm, info()));
- initializeProperties(vm, globalObject);
-}
-
</del><span class="cx"> template<typename JSClass> inline JSDOMConstructor<JSClass>* JSDOMConstructor<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
</span><span class="cx"> {
</span><span class="cx"> JSDOMConstructor* constructor = new (NotNull, JSC::allocateCell<JSDOMConstructor>(vm.heap)) JSDOMConstructor(structure, globalObject);
</span><span class="lines">@@ -259,103 +75,5 @@
</span><span class="cx"> return JSC::ConstructType::Host;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<typename JSClass> inline JSDOMNamedConstructor<JSClass>* JSDOMNamedConstructor<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
-{
- JSDOMNamedConstructor* constructor = new (NotNull, JSC::allocateCell<JSDOMNamedConstructor>(vm.heap)) JSDOMNamedConstructor(structure, globalObject);
- constructor->finishCreation(vm, globalObject);
- return constructor;
-}
</del><span class="cx">
</span><del>-template<typename JSClass> inline JSC::Structure* JSDOMNamedConstructor<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
-{
- return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
-}
-
-template<typename JSClass> inline void JSDOMNamedConstructor<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
-{
- Base::finishCreation(globalObject);
- ASSERT(inherits(vm, info()));
- initializeProperties(vm, globalObject);
-}
-
-template<typename JSClass> inline JSC::ConstructType JSDOMNamedConstructor<JSClass>::getConstructData(JSC::JSCell*, JSC::ConstructData& constructData)
-{
- constructData.native.function = construct;
- return JSC::ConstructType::Host;
-}
-
-template<typename JSClass> inline JSBuiltinConstructor<JSClass>* JSBuiltinConstructor<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
-{
- JSBuiltinConstructor* constructor = new (NotNull, JSC::allocateCell<JSBuiltinConstructor>(vm.heap)) JSBuiltinConstructor(structure, globalObject);
- constructor->finishCreation(vm, globalObject);
- return constructor;
-}
-
-template<typename JSClass> inline JSC::Structure* JSBuiltinConstructor<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
-{
- return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
-}
-
-template<typename JSClass> inline void JSBuiltinConstructor<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
-{
- Base::finishCreation(vm);
- ASSERT(inherits(vm, info()));
- setInitializeFunction(vm, *JSC::JSFunction::createBuiltinFunction(vm, initializeExecutable(vm), &globalObject));
- initializeProperties(vm, globalObject);
-}
-
-void callFunctionWithCurrentArguments(JSC::ExecState&, JSC::JSObject& thisObject, JSC::JSFunction&);
-
-template<typename JSClass> inline JSC::EncodedJSValue JSBuiltinConstructor<JSClass>::callConstructor(JSC::ExecState& state, JSC::JSObject& object)
-{
- callFunctionWithCurrentArguments(state, object, *initializeFunction());
- return JSC::JSValue::encode(&object);
-}
-
-template<typename JSClass> inline JSC::EncodedJSValue JSBuiltinConstructor<JSClass>::callConstructor(JSC::ExecState& state, JSC::JSObject* object)
-{
- JSC::VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- if (!object)
- return throwConstructorScriptExecutionContextUnavailableError(state, scope, info()->className);
- return callConstructor(state, *object);
-}
-
-template<typename JSClass> inline
-typename std::enable_if<JSDOMObjectInspector<JSClass>::isSimpleWrapper, JSC::JSObject&>::type createJSObject(JSBuiltinConstructor<JSClass>& constructor)
-{
- auto& globalObject = *constructor.globalObject();
- return *JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject, JSClass::DOMWrapped::create());
-}
-
-template<typename JSClass> inline
-typename std::enable_if<JSDOMObjectInspector<JSClass>::isBuiltin, JSC::JSObject&>::type createJSObject(JSBuiltinConstructor<JSClass>& constructor)
-{
- auto& globalObject = *constructor.globalObject();
- return *JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject);
-}
-
-template<typename JSClass> inline
-typename std::enable_if<JSDOMObjectInspector<JSClass>::isComplexWrapper, JSC::JSObject*>::type createJSObject(JSBuiltinConstructor<JSClass>& constructor)
-{
- ScriptExecutionContext* context = constructor.scriptExecutionContext();
- if (!context)
- return nullptr;
- auto& globalObject = *constructor.globalObject();
- return JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject, JSClass::DOMWrapped::create(*context));
-}
-
-template<typename JSClass> inline JSC::EncodedJSValue JSC_HOST_CALL JSBuiltinConstructor<JSClass>::construct(JSC::ExecState* state)
-{
- ASSERT(state);
- auto* castedThis = JSC::jsCast<JSBuiltinConstructor*>(state->jsCallee());
- return castedThis->callConstructor(*state, createJSObject(*castedThis));
-}
-
-template<typename JSClass> inline JSC::ConstructType JSBuiltinConstructor<JSClass>::getConstructData(JSC::JSCell*, JSC::ConstructData& constructData)
-{
- constructData.native.function = construct;
- return JSC::ConstructType::Host;
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorBasecppfromrev211891trunkSourceWebCorebindingsjsJSDOMConstructorcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp (from rev 211891, trunk/Source/WebCore/bindings/js/JSDOMConstructor.cpp) (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,47 @@
</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(JSDOMConstructorBase);
+
+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 JSDOMConstructorBase::getCallData(JSCell*, CallData& callData)
+{
+ callData.native.function = callThrowTypeError;
+ return CallType::Host;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorBaseh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructorBase.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMWrapper.h"
+
+namespace WebCore {
+
+// Base class for all constructor objects in the JSC bindings.
+class JSDOMConstructorBase : public JSDOMObject {
+public:
+ using Base = JSDOMObject;
+
+ static const unsigned StructureFlags = Base::StructureFlags | JSC::ImplementsHasInstance | JSC::ImplementsDefaultHasInstance | JSC::TypeOfShouldCallGetCallData;
+ static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject*, JSC::JSValue);
+
+protected:
+ JSDOMConstructorBase(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : JSDOMObject(structure, globalObject)
+ {
+ }
+
+ static String className(const JSObject*);
+ static JSC::CallType getCallData(JSCell*, JSC::CallData&);
+};
+
+inline JSC::Structure* JSDOMConstructorBase::createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+{
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+}
+
+inline String JSDOMConstructorBase::className(const JSObject*)
+{
+ return ASCIILiteral("Function");
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorNotConstructableh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMConstructorBase.h"
+#include "JSDOMExceptionHandling.h"
+
+namespace WebCore {
+
+template<typename JSClass> class JSDOMConstructorNotConstructable : public JSDOMConstructorBase {
+public:
+ using Base = JSDOMConstructorBase;
+
+ static JSDOMConstructorNotConstructable* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
+ static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
+
+ DECLARE_INFO;
+
+ // Must be defined for each specialization class.
+ static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
+
+private:
+ JSDOMConstructorNotConstructable(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : Base(structure, globalObject)
+ {
+ }
+
+ void finishCreation(JSC::VM&, JSDOMGlobalObject&);
+
+ // Usually defined for each specialization class.
+ void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
+
+ static JSC::EncodedJSValue JSC_HOST_CALL callThrowTypeError(JSC::ExecState* exec)
+ {
+ JSC::VM& vm = exec->vm();
+ auto scope = DECLARE_THROW_SCOPE(vm);
+ JSC::throwTypeError(exec, scope, ASCIILiteral("Illegal constructor"));
+ return JSC::JSValue::encode(JSC::jsNull());
+ }
+
+ static JSC::CallType getCallData(JSC::JSCell*, JSC::CallData& callData)
+ {
+ callData.native.function = callThrowTypeError;
+ return JSC::CallType::Host;
+ }
+};
+
+template<typename JSClass> inline JSDOMConstructorNotConstructable<JSClass>* JSDOMConstructorNotConstructable<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+{
+ JSDOMConstructorNotConstructable* constructor = new (NotNull, JSC::allocateCell<JSDOMConstructorNotConstructable>(vm.heap)) JSDOMConstructorNotConstructable(structure, globalObject);
+ constructor->finishCreation(vm, globalObject);
+ return constructor;
+}
+
+template<typename JSClass> inline JSC::Structure* JSDOMConstructorNotConstructable<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
+{
+ return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+}
+
+template<typename JSClass> inline void JSDOMConstructorNotConstructable<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
+{
+ Base::finishCreation(vm);
+ ASSERT(inherits(vm, info()));
+ initializeProperties(vm, globalObject);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorWithDocumentcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.cpp (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.cpp         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,31 @@
</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 "JSDOMConstructorWithDocument.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSDOMConstructorWithDocument);
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConstructorWithDocumenth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMConstructorWithDocument.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMConstructorBase.h"
+
+namespace WebCore {
+
+// Constructors using this base class depend on being in a Document and
+// can never be used from a WorkerGlobalScope.
+class JSDOMConstructorWithDocument : public JSDOMConstructorBase {
+public:
+ using Base = JSDOMConstructorBase;
+
+ Document* document() const
+ {
+ return downcast<Document>(scriptExecutionContext());
+ }
+
+protected:
+ JSDOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : JSDOMConstructorBase(structure, globalObject)
+ {
+ }
+
+ void finishCreation(JSDOMGlobalObject& globalObject)
+ {
+ Base::finishCreation(globalObject.vm());
+ ASSERT(globalObject.scriptExecutionContext()->isDocument());
+ }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertStrings.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -45,6 +45,17 @@
</span><span class="cx"> WEBCORE_EXPORT String identifierToUSVString(JSC::ExecState&, const JSC::Identifier&);
</span><span class="cx"> WEBCORE_EXPORT String valueToUSVString(JSC::ExecState&, JSC::JSValue);
</span><span class="cx">
</span><ins>+inline String propertyNameToString(JSC::PropertyName propertyName)
+{
+ ASSERT(!propertyName.isSymbol());
+ return propertyName.uid() ? propertyName.uid() : propertyName.publicName();
+}
+
+inline AtomicString propertyNameToAtomicString(JSC::PropertyName propertyName)
+{
+ return AtomicString(propertyName.uid() ? propertyName.uid() : propertyName.publicName());
+}
+
</ins><span class="cx"> // MARK: -
</span><span class="cx"> // MARK: String types
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMNamedConstructorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSDOMNamedConstructor.h (0 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMNamedConstructor.h         (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSDOMNamedConstructor.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2015, 2016 Canon Inc. All rights reserved.
+ * Copyright (C) 2016 Apple 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 "JSDOMConstructorWithDocument.h"
+
+namespace WebCore {
+
+// FIMXE: Why can't named constructors be used with workers?
+template<typename JSClass> class JSDOMNamedConstructor : public JSDOMConstructorWithDocument {
+public:
+ using Base = JSDOMConstructorWithDocument;
+
+ static JSDOMNamedConstructor* create(JSC::VM&, JSC::Structure*, JSDOMGlobalObject&);
+ static JSC::Structure* createStructure(JSC::VM&, JSC::JSGlobalObject&, JSC::JSValue prototype);
+
+ DECLARE_INFO;
+
+ // Must be defined for each specialization class.
+ static JSC::JSValue prototypeForStructure(JSC::VM&, const JSDOMGlobalObject&);
+
+private:
+ JSDOMNamedConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+ : Base(structure, globalObject)
+ {
+ }
+
+ void finishCreation(JSC::VM&, JSDOMGlobalObject&);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+
+ // Usually defined for each specialization class.
+ void initializeProperties(JSC::VM&, JSDOMGlobalObject&) { }
+ // Must be defined for each specialization class.
+ static JSC::EncodedJSValue JSC_HOST_CALL construct(JSC::ExecState*);
+};
+
+template<typename JSClass> inline JSDOMNamedConstructor<JSClass>* JSDOMNamedConstructor<JSClass>::create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)
+{
+ JSDOMNamedConstructor* constructor = new (NotNull, JSC::allocateCell<JSDOMNamedConstructor>(vm.heap)) JSDOMNamedConstructor(structure, globalObject);
+ constructor->finishCreation(vm, globalObject);
+ return constructor;
+}
+
+template<typename JSClass> inline JSC::Structure* JSDOMNamedConstructor<JSClass>::createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)
+{
+ return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+}
+
+template<typename JSClass> inline void JSDOMNamedConstructor<JSClass>::finishCreation(JSC::VM& vm, JSDOMGlobalObject& globalObject)
+{
+ Base::finishCreation(globalObject);
+ ASSERT(inherits(vm, info()));
+ initializeProperties(vm, globalObject);
+}
+
+template<typename JSClass> inline JSC::ConstructType JSDOMNamedConstructor<JSClass>::getConstructData(JSC::JSCell*, JSC::ConstructData& constructData)
+{
+ constructData.native.function = construct;
+ return JSC::ConstructType::Host;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "HTMLFormElement.h"
</span><span class="cx"> #include "JSCustomElementInterface.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorBase.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 class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> VM& vm = exec.vm();
</span><span class="cx"> auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">
</span><del>- auto* jsConstructor = jsCast<DOMConstructorObject*>(exec.jsCallee());
</del><ins>+ auto* jsConstructor = jsCast<JSDOMConstructorBase*>(exec.jsCallee());
</ins><span class="cx"> ASSERT(jsConstructor);
</span><span class="cx">
</span><span class="cx"> auto* context = jsConstructor->scriptExecutionContext();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include "JSMutationObserver.h"
</span><span class="cx">
</span><span class="cx"> #include "ExceptionCode.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorBase.h"
</ins><span class="cx"> #include "JSMutationCallback.h"
</span><span class="cx"> #include "JSNodeCustom.h"
</span><span class="cx"> #include "MutationObserver.h"
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> if (!object || object->methodTable()->getCallData(object, callData) == CallType::None)
</span><span class="cx"> return throwArgumentTypeError(exec, scope, 0, "callback", "MutationObserver", nullptr, "MutationCallback");
</span><span class="cx">
</span><del>- DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec.jsCallee());
</del><ins>+ auto* jsConstructor = jsCast<JSDOMConstructorBase*>(exec.jsCallee());
</ins><span class="cx"> auto callback = JSMutationCallback::create(object, jsConstructor->globalObject());
</span><span class="cx"> JSObject* jsObserver = asObject(toJSNewlyCreated(&exec, jsConstructor->globalObject(), MutationObserver::create(WTFMove(callback))));
</span><span class="cx"> PrivateName propertyName;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -22,8 +22,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(READABLE_STREAM_API)
</span><span class="cx">
</span><del>-#include "JSDOMBinding.h"
-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMBuiltinConstructor.h"
</ins><span class="cx"> #include "JSReadableByteStreamController.h"
</span><span class="cx"> #include "JSReadableStream.h"
</span><span class="cx"> #include "JSReadableStreamDefaultController.h"
</span><span class="lines">@@ -31,6 +30,7 @@
</span><span class="cx"> #include "ReadableByteStreamInternalsBuiltins.h"
</span><span class="cx"> #include "ReadableStreamInternalsBuiltins.h"
</span><span class="cx"> #include "WebCoreJSClientData.h"
</span><ins>+#include <runtime/JSCInlines.h>
</ins><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="lines">@@ -71,11 +71,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Private JS ReadableStreamDefaultReader and ReadableStreamDefaultController constructors.
</span><del>-using JSBuiltinReadableStreamDefaultReaderPrivateConstructor = JSBuiltinConstructor<JSReadableStreamDefaultReader>;
-using JSBuiltinReadableStreamDefaultControllerPrivateConstructor = JSBuiltinConstructor<JSReadableStreamDefaultController>;
</del><ins>+using JSBuiltinReadableStreamDefaultReaderPrivateConstructor = JSDOMBuiltinConstructor<JSReadableStreamDefaultReader>;
+using JSBuiltinReadableStreamDefaultControllerPrivateConstructor = JSDOMBuiltinConstructor<JSReadableStreamDefaultController>;
</ins><span class="cx"> #if ENABLE(READABLE_BYTE_STREAM_API)
</span><span class="cx"> // Private JS ReadableByteStreamController constructor.
</span><del>-using JSBuiltinReadableByteStreamControllerPrivateConstructor = JSBuiltinConstructor<JSReadableByteStreamController>;
</del><ins>+using JSBuiltinReadableByteStreamControllerPrivateConstructor = JSDOMBuiltinConstructor<JSReadableByteStreamController>;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSBuiltinReadableStreamDefaultReaderPrivateConstructor);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStorageCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "JSStorage.h"
</span><span class="cx">
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMConvertStrings.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><del>-#include <runtime/IdentifierInlines.h>
</del><ins>+#include <runtime/JSCInlines.h>
</ins><span class="cx"> #include <runtime/PropertyNameArray.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSUserMessageHandlersNamespaceCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -28,8 +28,10 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(USER_MESSAGE_HANDLERS)
</span><span class="cx">
</span><del>-#include "JSDOMBinding.h"
</del><ins>+#include "JSDOMConvertInterface.h"
+#include "JSDOMConvertStrings.h"
</ins><span class="cx"> #include "JSUserMessageHandler.h"
</span><ins>+#include <runtime/JSCInlines.h>
</ins><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="lines">@@ -37,8 +39,8 @@
</span><span class="cx">
</span><span class="cx"> bool JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyName, PropertySlot& slot)
</span><span class="cx"> {
</span><del>- if (UserMessageHandler* handler = wrapped().handler(propertyNameToAtomicString(propertyName), globalObject()->world())) {
- slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS(exec, globalObject(), *handler));
</del><ins>+ if (auto* handler = wrapped().handler(propertyNameToAtomicString(propertyName), globalObject()->world())) {
+ slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS<IDLInterface<UserMessageHandler>>(*exec, *globalObject(), *handler));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</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 "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorBase.h"
+#include "JSDOMConvertStrings.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMGlobalObject.h"
</span><span class="cx"> #include "JSDOMWindowCustom.h"
</span><span class="lines">@@ -44,14 +45,14 @@
</span><span class="cx"> VM& vm = state.vm();
</span><span class="cx"> auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">
</span><del>- ASSERT(jsCast<DOMConstructorObject*>(state.jsCallee()));
- ASSERT(jsCast<DOMConstructorObject*>(state.jsCallee())->globalObject());
- auto& globalObject = *jsCast<DOMConstructorObject*>(state.jsCallee())->globalObject();
</del><ins>+ ASSERT(jsCast<JSDOMConstructorBase*>(state.jsCallee()));
+ ASSERT(jsCast<JSDOMConstructorBase*>(state.jsCallee())->globalObject());
+ auto& globalObject = *jsCast<JSDOMConstructorBase*>(state.jsCallee())->globalObject();
</ins><span class="cx">
</span><span class="cx"> if (!state.argumentCount())
</span><span class="cx"> return throwVMError(&state, scope, createNotEnoughArgumentsError(&state));
</span><span class="cx">
</span><del>- String scriptURL = state.uncheckedArgument(0).toWTFString(&state);
</del><ins>+ auto scriptURL = convert<IDLDOMString>(state, state.uncheckedArgument(0));
</ins><span class="cx"> RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span><span class="cx">
</span><span class="cx"> // See section 4.8.2 step 14 of WebWorkers for why this is the lexicalGlobalObject.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -6012,7 +6012,7 @@
</span><span class="cx"> my $interface = shift;
</span><span class="cx"> return "JSDOMConstructorNotConstructable" if $interface->extendedAttributes->{NamedConstructor};
</span><span class="cx"> return "JSDOMConstructorNotConstructable" unless IsConstructable($interface);
</span><del>- return "JSBuiltinConstructor" if IsJSBuiltinConstructor($interface);
</del><ins>+ return "JSDOMBuiltinConstructor" if IsJSBuiltinConstructor($interface);
</ins><span class="cx"> return "JSDOMConstructor";
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6024,7 +6024,8 @@
</span><span class="cx"> my $constructorClassName = "${className}Constructor";
</span><span class="cx"> my $templateClassName = GetConstructorTemplateClassName($interface);
</span><span class="cx">
</span><del>- $implIncludes{"JSDOMConstructor.h"} = 1;
</del><ins>+ AddToImplIncludes("${templateClassName}.h");
+ AddToImplIncludes("JSDOMNamedConstructor.h") if $interface->extendedAttributes->{NamedConstructor};
</ins><span class="cx">
</span><span class="cx"> push(@$outputArray, "using $constructorClassName = $templateClassName<$className>;\n");
</span><span class="cx"> push(@$outputArray, "using JS${interfaceName}NamedConstructor = JSDOMNamedConstructor<$className>;\n") if $interface->extendedAttributes->{NamedConstructor};
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSInterfaceNamecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><span class="cx"> #include "JSDOMBindingSecurity.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCEReactionsStringifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> #include "CustomElementReactionQueue.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSTestCallbackInterface.h"
</span><span class="cx">
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMStringList.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMBuiltinConstructor.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span><span class="cx"> #include "TestClassWithJSBuiltinConstructorBuiltins.h"
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-using JSTestClassWithJSBuiltinConstructorConstructor = JSBuiltinConstructor<JSTestClassWithJSBuiltinConstructor>;
</del><ins>+using JSTestClassWithJSBuiltinConstructorConstructor = JSDOMBuiltinConstructor<JSTestClassWithJSBuiltinConstructor>;
</ins><span class="cx">
</span><span class="cx"> template<> JSValue JSTestClassWithJSBuiltinConstructorConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
</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 (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestDOMJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #include "DOMJITIDLTypeFilter.h"
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceLeadingUnderscorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestIterablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMIterator.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMBuiltinConstructor.h"
</ins><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span><span class="cx"> #include "TestJSBuiltinConstructorBuiltins.h"
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> void finishCreation(JSC::VM&);
</span><span class="cx"> };
</span><span class="cx">
</span><del>-using JSTestJSBuiltinConstructorConstructor = JSBuiltinConstructor<JSTestJSBuiltinConstructor>;
</del><ins>+using JSTestJSBuiltinConstructorConstructor = JSDOMBuiltinConstructor<JSTestJSBuiltinConstructor>;
</ins><span class="cx">
</span><span class="cx"> template<> JSValue JSTestJSBuiltinConstructorConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,9 +23,10 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><ins>+#include "JSDOMNamedConstructor.h"
</ins><span class="cx"> #include "JSDOMWrapperCache.h"
</span><span class="cx"> #include <runtime/Error.h>
</span><span class="cx"> #include <runtime/FunctionPrototype.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializationInheritcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializationInheritFinalcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSDOMBindingCaller.h"
</span><del>-#include "JSDOMConstructor.h"
</del><ins>+#include "JSDOMConstructorNotConstructable.h"
</ins><span class="cx"> #include "JSDOMConvert.h"
</span><span class="cx"> #include "JSDOMExceptionHandling.h"
</span><span class="cx"> #include "JSDOMWrapperCache.h"
</span></span></pre></div>
<a id="trunkSourceWebCoredomStaticRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StaticRange.cpp (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StaticRange.cpp        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/dom/StaticRange.cpp        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -39,6 +39,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+StaticRange::~StaticRange()
+{
+}
+
</ins><span class="cx"> Ref<StaticRange> StaticRange::create(Ref<Node>&& startContainer, unsigned startOffset, Ref<Node>&& endContainer, unsigned endOffset)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(*new StaticRange(WTFMove(startContainer), startOffset, WTFMove(endContainer), endOffset));
</span></span></pre></div>
<a id="trunkSourceWebCoredomStaticRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/StaticRange.h (211891 => 211892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/StaticRange.h        2017-02-08 20:16:04 UTC (rev 211891)
+++ trunk/Source/WebCore/dom/StaticRange.h        2017-02-08 20:24:37 UTC (rev 211892)
</span><span class="lines">@@ -35,6 +35,8 @@
</span><span class="cx">
</span><span class="cx"> class StaticRange : public RefCounted<StaticRange> {
</span><span class="cx"> public:
</span><ins>+ ~StaticRange();
+
</ins><span class="cx"> static Ref<StaticRange> createFromRange(const Range&);
</span><span class="cx"> static Ref<StaticRange> create(Ref<Node>&& startContainer, unsigned startOffset, Ref<Node>&& endContainer, unsigned endOffset);
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>