<!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>[201129] 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/201129">201129</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2016-05-19 00:32:48 -0700 (Thu, 19 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor toJS functions to use toJSNewlyCreated
https://bugs.webkit.org/show_bug.cgi?id=157835

Reviewed by Chris Dumez.

Moving checks generated by binding generator from toJS to toJSNewlyCreated.
Changing wrap template function to use toJSNewlyCreated function.
This allows DOMClass toJS() to be equivalent to wrap template function.

Refactored custom binding code to take benefit of this.

Covered by existing tests.

* bindings/js/JSAnimationTimelineCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSBlobCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::wrap):
(WebCore::toJS):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::toJS):
(WebCore::cachedDocumentWrapper): Deleted.
* bindings/js/JSDocumentFragmentCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSIDBCursorCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSNodeListCustom.h:
(WebCore::toJS):
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSTextCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSXMLDocumentCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSAnimationTimelineCustomcpp">trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBlobCustomcpp">trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCSSRuleCustomcpp">trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCSSValueCustomcpp">trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCanvasRenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDocumentFragmentCustomcpp">trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSEventCustomcpp">trunk/Source/WebCore/bindings/js/JSEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLTemplateElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSImageDataCustomcpp">trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeListCustomh">trunk/Source/WebCore/bindings/js/JSNodeListCustom.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp">trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSVGPathSegCustomcpp">trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSStyleSheetCustomcpp">trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTextCustomcpp">trunk/Source/WebCore/bindings/js/JSTextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTextTrackCueCustomcpp">trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTrackCustomcpp">trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSXMLDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSXMLDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSattributecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSreadonlycpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/ChangeLog        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -1,5 +1,109 @@
</span><span class="cx"> 2016-05-19  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><ins>+        Refactor toJS functions to use toJSNewlyCreated
+        https://bugs.webkit.org/show_bug.cgi?id=157835
+
+        Reviewed by Chris Dumez.
+
+        Moving checks generated by binding generator from toJS to toJSNewlyCreated.
+        Changing wrap template function to use toJSNewlyCreated function.
+        This allows DOMClass toJS() to be equivalent to wrap template function.
+
+        Refactored custom binding code to take benefit of this.
+
+        Covered by existing tests.
+
+        * bindings/js/JSAnimationTimelineCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSBlobCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSCSSRuleCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSCSSValueCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSCanvasRenderingContextCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::wrap):
+        (WebCore::toJS):
+        * bindings/js/JSDocumentCustom.cpp:
+        (WebCore::toJS):
+        (WebCore::cachedDocumentWrapper): Deleted.
+        * bindings/js/JSDocumentFragmentCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSEventCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSHTMLDocumentCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSHTMLTemplateElementCustom.cpp:
+        (WebCore::JSHTMLTemplateElement::content):
+        * bindings/js/JSIDBCursorCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSImageDataCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSNodeListCustom.h:
+        (WebCore::toJS):
+        * bindings/js/JSPerformanceEntryCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSSVGPathSegCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSStyleSheetCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSTextCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSTextTrackCueCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSTrackCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSXMLDocumentCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        * bindings/scripts/test/JS/JSTestException.cpp:
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        * bindings/scripts/test/JS/JSattribute.cpp:
+        * bindings/scripts/test/JS/JSreadonly.cpp:
+
+2016-05-19  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
</ins><span class="cx">         Make binding DOM constructor use toJSNewlyCreated instead of toJS
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157832
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSAnimationTimelineCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -39,14 +39,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, AnimationTimeline&amp; value)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;AnimationTimeline&gt;&amp;&amp; value)
</ins><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), value))
-        return wrapper;
</del><ins>+    if (value-&gt;isDocumentTimeline())
+        return CREATE_DOM_WRAPPER(globalObject, DocumentTimeline, WTFMove(value));
+    return CREATE_DOM_WRAPPER(globalObject, AnimationTimeline, WTFMove(value));
+}
</ins><span class="cx"> 
</span><del>-    if (value.isDocumentTimeline())
-        return CREATE_DOM_WRAPPER(globalObject, DocumentTimeline, value);
-    return CREATE_DOM_WRAPPER(globalObject, AnimationTimeline, value);
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, AnimationTimeline&amp; value)
+{
+    return wrap(state, globalObject, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBlobCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -48,12 +48,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Blob&amp; blob)
</del><ins>+JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;Blob&gt;&amp;&amp; blob)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;File&gt;(blob))
</span><del>-        return wrap&lt;JSFile&gt;(globalObject, downcast&lt;File&gt;(blob));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, File, WTFMove(blob));
+    return createWrapper&lt;JSBlob&gt;(globalObject, WTFMove(blob));
+}
</ins><span class="cx"> 
</span><del>-    return wrap&lt;JSBlob&gt;(globalObject, blob);
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Blob&amp; blob)
+{
+    return wrap(state, globalObject, blob);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL constructJSBlob(ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSRuleCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -60,55 +60,43 @@
</span><span class="cx">     visitor.addOpaqueRoot(root(&amp;wrapped()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, CSSRule&amp; rule)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;CSSRule&gt;&amp;&amp; rule)
</ins><span class="cx"> {
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), rule);
-    if (wrapper)
-        return wrapper;
-
-    switch (rule.type()) {
-        case CSSRule::STYLE_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSStyleRule, rule);
-            break;
-        case CSSRule::MEDIA_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSMediaRule, rule);
-            break;
-        case CSSRule::FONT_FACE_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSFontFaceRule, rule);
-            break;
-        case CSSRule::PAGE_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPageRule, rule);
-            break;
-        case CSSRule::IMPORT_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSImportRule, rule);
-            break;
-        case CSSRule::CHARSET_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSCharsetRule, rule);
-            break;
-        case CSSRule::KEYFRAME_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframeRule, rule);
-            break;
-        case CSSRule::KEYFRAMES_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframesRule, rule);
-            break;
-        case CSSRule::SUPPORTS_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSSupportsRule, rule);
-            break;
</del><ins>+    switch (rule-&gt;type()) {
+    case CSSRule::STYLE_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSStyleRule, WTFMove(rule));
+    case CSSRule::MEDIA_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSMediaRule, WTFMove(rule));
+    case CSSRule::FONT_FACE_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSFontFaceRule, WTFMove(rule));
+    case CSSRule::PAGE_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSPageRule, WTFMove(rule));
+    case CSSRule::IMPORT_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSImportRule, WTFMove(rule));
+    case CSSRule::CHARSET_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSCharsetRule, WTFMove(rule));
+    case CSSRule::KEYFRAME_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSKeyframeRule, WTFMove(rule));
+    case CSSRule::KEYFRAMES_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSKeyframesRule, WTFMove(rule));
+    case CSSRule::SUPPORTS_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, CSSSupportsRule, WTFMove(rule));
</ins><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><del>-        case CSSRule::WEBKIT_VIEWPORT_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSViewportRule, rule);
-            break;
</del><ins>+    case CSSRule::WEBKIT_VIEWPORT_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, WebKitCSSViewportRule, WTFMove(rule));
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><del>-        case CSSRule::WEBKIT_REGION_RULE:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSRegionRule, rule);
-            break;
</del><ins>+    case CSSRule::WEBKIT_REGION_RULE:
+        return CREATE_DOM_WRAPPER(globalObject, WebKitCSSRegionRule, WTFMove(rule));
</ins><span class="cx"> #endif
</span><del>-        default:
-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSRule, rule);
</del><ins>+    default:
+        return CREATE_DOM_WRAPPER(globalObject, CSSRule, WTFMove(rule));
</ins><span class="cx">     }
</span><ins>+}
</ins><span class="cx"> 
</span><del>-    return wrapper;
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, CSSRule&amp; object)
+{
+    return wrap(state, globalObject, object);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSValueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -64,8 +64,25 @@
</span><span class="cx">     uncacheWrapper(world, &amp;jsCSSValue-&gt;wrapped(), jsCSSValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, CSSValue&amp; value)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;CSSValue&gt;&amp;&amp; value)
</ins><span class="cx"> {
</span><ins>+    if (value-&gt;isWebKitCSSTransformValue())
+        return CREATE_DOM_WRAPPER(globalObject, WebKitCSSTransformValue, WTFMove(value));
+    if (value-&gt;isWebKitCSSFilterValue())
+        return CREATE_DOM_WRAPPER(globalObject, WebKitCSSFilterValue, WTFMove(value));
+    if (value-&gt;isValueList())
+        return CREATE_DOM_WRAPPER(globalObject, CSSValueList, WTFMove(value));
+    if (value-&gt;isSVGPaint())
+        return CREATE_DOM_WRAPPER(globalObject, SVGPaint, WTFMove(value));
+    if (value-&gt;isSVGColor())
+        return CREATE_DOM_WRAPPER(globalObject, SVGColor, WTFMove(value));
+    if (value-&gt;isPrimitiveValue())
+        return CREATE_DOM_WRAPPER(globalObject, CSSPrimitiveValue, WTFMove(value));
+    return CREATE_DOM_WRAPPER(globalObject, CSSValue, WTFMove(value));
+}
+
+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, CSSValue&amp; value)
+{
</ins><span class="cx">     // Scripts should only ever see cloned CSSValues, never the internal ones.
</span><span class="cx">     ASSERT(value.isCSSOMSafe());
</span><span class="cx"> 
</span><span class="lines">@@ -73,27 +90,7 @@
</span><span class="cx">     if (!value.isCSSOMSafe())
</span><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), value);
-
-    if (wrapper)
-        return wrapper;
-
-    if (value.isWebKitCSSTransformValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSTransformValue, value);
-    else if (value.isWebKitCSSFilterValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSFilterValue, value);
-    else if (value.isValueList())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValueList, value);
-    else if (value.isSVGPaint())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGPaint, value);
-    else if (value.isSVGColor())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGColor, value);
-    else if (value.isPrimitiveValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPrimitiveValue, value);
-    else
-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValue, value);
-
-    return wrapper;
</del><ins>+    return wrap(state, globalObject, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCanvasRenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -47,17 +47,22 @@
</span><span class="cx">     visitor.addOpaqueRoot(root(wrapped().canvas()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, CanvasRenderingContext&amp; object)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;CanvasRenderingContext&gt;&amp;&amp; object)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx">     if (is&lt;WebGLRenderingContext&gt;(object))
</span><del>-        return wrap&lt;JSWebGLRenderingContext&gt;(globalObject, downcast&lt;WebGLRenderingContext&gt;(object));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, WebGLRenderingContext, WTFMove(object));
</ins><span class="cx"> #if ENABLE(WEBGL2)
</span><span class="cx">     if (is&lt;WebGL2RenderingContext&gt;(object))
</span><del>-        return wrap&lt;JSWebGL2RenderingContext&gt;(globalObject, downcast&lt;WebGL2RenderingContext&gt;(object));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, WebGL2RenderingContext, WTFMove(object));
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><del>-    return wrap&lt;JSCanvasRenderingContext2D&gt;(globalObject, downcast&lt;CanvasRenderingContext2D&gt;(object));
</del><ins>+    return CREATE_DOM_WRAPPER(globalObject, CanvasRenderingContext2D, WTFMove(object));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, CanvasRenderingContext&amp; object)
+{
+    return wrap(state, globalObject, object);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -165,8 +165,7 @@
</span><span class="cx"> template&lt;typename DOMClass, typename WrapperClass&gt; void uncacheWrapper(DOMWrapperWorld&amp;, DOMClass*, WrapperClass*);
</span><span class="cx"> template&lt;typename WrapperClass, typename DOMClass&gt; WrapperClass* createWrapper(JSDOMGlobalObject*, Ref&lt;DOMClass&gt;&amp;&amp;);
</span><span class="cx"> 
</span><del>-template&lt;typename WrapperClass, typename DOMClass&gt; JSC::JSValue wrap(JSDOMGlobalObject*, DOMClass&amp;);
-template&lt;typename WrapperClass, typename DOMClass&gt; JSC::JSValue getExistingWrapper(JSDOMGlobalObject*, DOMClass&amp;);
</del><ins>+template&lt;typename DOMClass&gt; JSC::JSValue wrap(JSC::ExecState*, JSDOMGlobalObject*, DOMClass&amp;);
</ins><span class="cx"> template&lt;typename WrapperClass, typename DOMClass&gt; JSC::JSValue createNewWrapper(JSDOMGlobalObject*, Ref&lt;DOMClass&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="cx"> void addImpureProperty(const AtomicString&amp;);
</span><span class="lines">@@ -467,18 +466,13 @@
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename WrapperClass, typename DOMClass&gt; inline JSC::JSValue wrap(JSDOMGlobalObject* globalObject, DOMClass&amp; domObject)
</del><ins>+template&lt;typename DOMClass&gt; inline JSC::JSValue wrap(JSC::ExecState* state, JSDOMGlobalObject* globalObject, DOMClass&amp; domObject)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), domObject))
</span><span class="cx">         return wrapper;
</span><del>-    return createWrapper&lt;WrapperClass, DOMClass&gt;(globalObject, domObject);
</del><ins>+    return toJSNewlyCreated(state, globalObject, Ref&lt;DOMClass&gt;(domObject));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename WrapperClass, typename DOMClass&gt; inline JSC::JSValue getExistingWrapper(JSDOMGlobalObject* globalObject, DOMClass&amp; domObject)
-{
-    return getCachedWrapper(globalObject-&gt;world(), domObject);
-}
-
</del><span class="cx"> template&lt;typename WrapperClass, typename DOMClass&gt; inline JSC::JSValue createNewWrapper(JSDOMGlobalObject* globalObject, Ref&lt;DOMClass&gt;&amp;&amp; domObject)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!getCachedWrapper(globalObject-&gt;world(), domObject));
</span><span class="lines">@@ -521,7 +515,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!buffer)
</span><span class="cx">         return JSC::jsNull();
</span><del>-    if (JSC::JSValue result = getExistingWrapper&lt;JSC::JSArrayBuffer&gt;(globalObject, *buffer))
</del><ins>+    if (JSC::JSValue result = getCachedWrapper(globalObject-&gt;world(), *buffer))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx">     // The JSArrayBuffer::create function will register the wrapper in finishCreation.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -70,13 +70,6 @@
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Document&amp; document)
-{
-    if (auto* wrapper = cachedDocumentWrapper(*state, *globalObject, document))
-        return wrapper;
-    return createNewDocumentWrapper(*state, *globalObject, document);
-}
-
</del><span class="cx"> JSObject* cachedDocumentWrapper(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, Document&amp; document)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = getCachedWrapper(globalObject.world(), document))
</span><span class="lines">@@ -110,6 +103,13 @@
</span><span class="cx">     return createNewDocumentWrapper(*state, *globalObject, WTFMove(document));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Document&amp; document)
+{
+    if (auto* wrapper = cachedDocumentWrapper(*state, *globalObject, document))
+        return wrapper;
+    return toJSNewlyCreated(state, globalObject, Ref&lt;Document&gt;(document));
+}
+
</ins><span class="cx"> JSValue JSDocument::prepend(ExecState&amp; state)
</span><span class="cx"> {
</span><span class="cx">     ExceptionCode ec = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentFragmentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -52,26 +52,18 @@
</span><span class="cx">     return jsUndefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline JSValue createNewDocumentFragmentWrapper(JSDOMGlobalObject&amp; globalObject, Ref&lt;DocumentFragment&gt;&amp;&amp; impl)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;DocumentFragment&gt;&amp;&amp; impl)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(SHADOW_DOM)
</span><span class="cx">     if (impl-&gt;isShadowRoot())
</span><del>-        return CREATE_DOM_WRAPPER(&amp;globalObject, ShadowRoot, WTFMove(impl));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, ShadowRoot, WTFMove(impl));
</ins><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSDocumentFragment&gt;(&amp;globalObject, WTFMove(impl));
</del><ins>+    return createNewWrapper&lt;JSDocumentFragment&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;DocumentFragment&gt;&amp;&amp; impl)
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, DocumentFragment&amp; impl)
</ins><span class="cx"> {
</span><del>-    return createNewDocumentFragmentWrapper(*globalObject, WTFMove(impl));
</del><ins>+    return wrap(state, globalObject, impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, DocumentFragment&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSDocumentFragment&gt;(globalObject, impl))
-        return result;
-
-    return createNewDocumentFragmentWrapper(*globalObject, impl);
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -51,33 +51,22 @@
</span><span class="cx"> 
</span><span class="cx"> #define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \
</span><span class="cx">     case interfaceName##InterfaceType: \
</span><del>-        return CREATE_DOM_WRAPPER(&amp;globalObject, interfaceName, WTFMove(event));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, interfaceName, WTFMove(event));
</ins><span class="cx"> 
</span><del>-static inline JSValue createNewEventWrapper(JSDOMGlobalObject&amp; globalObject, Ref&lt;Event&gt;&amp;&amp; event)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;Event&gt;&amp;&amp; event)
</ins><span class="cx"> {
</span><span class="cx">     switch (event-&gt;eventInterface()) {
</span><span class="cx">         DOM_EVENT_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE)
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return CREATE_DOM_WRAPPER(&amp;globalObject, Event, WTFMove(event));
</del><ins>+    return CREATE_DOM_WRAPPER(globalObject, Event, WTFMove(event));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Event&amp; event)
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Event&amp; event)
</ins><span class="cx"> {
</span><del>-    JSLockHolder lock(globalObject-&gt;vm());
-
-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), event))
-        return wrapper;
-
-    return createNewEventWrapper(*globalObject, event);
</del><ins>+    return wrap(state, globalObject, event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-
-JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;Event&gt;&amp;&amp; event)
-{
-    return createNewEventWrapper(*globalObject, WTFMove(event));
-}
-
</del><span class="cx"> #undef TRY_TO_WRAP_WITH_INTERFACE
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -53,23 +53,25 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, HTMLCollection&amp; collection)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;HTMLCollection&gt;&amp;&amp; collection)
</ins><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), collection))
-        return wrapper;
-
-    switch (collection.type()) {
</del><ins>+    switch (collection-&gt;type()) {
</ins><span class="cx">     case FormControls:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLFormControlsCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLFormControlsCollection, WTFMove(collection));
</ins><span class="cx">     case SelectOptions:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLOptionsCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLOptionsCollection, WTFMove(collection));
</ins><span class="cx">     case DocAll:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLAllCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLAllCollection, WTFMove(collection));
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return CREATE_DOM_WRAPPER(globalObject, HTMLCollection, collection);
</del><ins>+    return CREATE_DOM_WRAPPER(globalObject, HTMLCollection, WTFMove(collection));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, HTMLCollection&amp; collection)
+{
+    return wrap(state, globalObject, collection);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -53,12 +53,12 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-static inline JSValue createNewHTMLDocumentWrapper(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, Ref&lt;HTMLDocument&gt;&amp;&amp; passedDocument)
</del><ins>+JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Ref&lt;HTMLDocument&gt;&amp;&amp; passedDocument)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; document = passedDocument.get();
</span><del>-    JSObject* wrapper = CREATE_DOM_WRAPPER(&amp;globalObject, HTMLDocument, WTFMove(passedDocument));
</del><ins>+    JSObject* wrapper = createWrapper&lt;JSHTMLDocument&gt;(globalObject, WTFMove(passedDocument));
</ins><span class="cx"> 
</span><del>-    reportMemoryForDocumentIfFrameless(state, document);
</del><ins>+    reportMemoryForDocumentIfFrameless(*state, document);
</ins><span class="cx"> 
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span><span class="lines">@@ -67,14 +67,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = cachedDocumentWrapper(*state, *globalObject, document))
</span><span class="cx">         return wrapper;
</span><del>-    return createNewHTMLDocumentWrapper(*state, *globalObject, document);
</del><ins>+    return toJSNewlyCreated(state, globalObject, Ref&lt;HTMLDocument&gt;(document));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Ref&lt;HTMLDocument&gt;&amp;&amp; document)
-{
-    return createNewHTMLDocumentWrapper(*state, *globalObject, WTFMove(document));
-}
-
</del><span class="cx"> bool JSHTMLDocument::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><span class="cx">     JSHTMLDocument* thisObject = jsCast&lt;JSHTMLDocument*&gt;(object);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLTemplateElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -45,12 +45,8 @@
</span><span class="cx"> {
</span><span class="cx">     JSLockHolder lock(&amp;state);
</span><span class="cx"> 
</span><del>-    auto&amp; content = wrapped().content();
</del><ins>+    auto wrapper = wrap(&amp;state, globalObject(), wrapped().content());
</ins><span class="cx"> 
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject()-&gt;world(), content))
-        return wrapper;
-
-    auto* wrapper = CREATE_DOM_WRAPPER(globalObject(), DocumentFragment, content);
</del><span class="cx">     PrivateName propertyName;
</span><span class="cx">     const_cast&lt;JSHTMLTemplateElement*&gt;(this)-&gt;putDirect(globalObject()-&gt;vm(), propertyName, wrapper);
</span><span class="cx">     return wrapper;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -52,12 +52,16 @@
</span><span class="cx">     return toJS(&amp;state, globalObject(), cursor.objectStore());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, IDBCursor&amp; cursor)
</del><ins>+JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;IDBCursor&gt;&amp;&amp; cursor)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;IDBCursorWithValue&gt;(cursor))
</span><del>-        return wrap&lt;JSIDBCursorWithValue&gt;(globalObject, downcast&lt;IDBCursorWithValue&gt;(cursor));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, IDBCursorWithValue, WTFMove(cursor));
+    return createWrapper&lt;JSIDBCursor&gt;(globalObject, WTFMove(cursor));
+}
</ins><span class="cx"> 
</span><del>-    return wrap&lt;JSIDBCursor&gt;(globalObject, cursor);
</del><ins>+JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, IDBCursor&amp; cursor)
+{
+    return wrap(state, globalObject, cursor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSImageDataCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -50,9 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, ImageData&amp; imageData)
</span><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), imageData))
-        return wrapper;
-    return toJSNewlyCreated(state, globalObject, Ref&lt;ImageData&gt;(imageData));
</del><ins>+    return wrap(state, globalObject, imageData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -37,12 +37,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, MediaStreamCapabilities&amp; object)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;MediaStreamCapabilities&gt;&amp;&amp; object)
</ins><span class="cx"> {
</span><span class="cx">     if (object.hasVideoSource())
</span><del>-        return wrap&lt;JSAllVideoCapabilities&gt;(globalObject, static_cast&lt;AllVideoCapabilities&amp;&gt;(object));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, AllVideoCapabilities, WTFMove(object));
+    return CREATE_DOM_WRAPPER(globalObject, AllAudioCapabilities, WTFMove(object));
+}
</ins><span class="cx"> 
</span><del>-    return wrap&lt;JSAllAudioCapabilities&gt;(globalObject, static_cast&lt;AllAudioCapabilities&amp;&gt;(object));
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, MediaStreamCapabilities&amp; object)
+{
+    return wrap(state, globalObject, object);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeListCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeListCustom.h (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeListCustom.h        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSNodeListCustom.h        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> ALWAYS_INLINE JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, NodeList&amp; nodeList)
</span><span class="cx"> {
</span><del>-    if (JSC::JSValue existingWrapper = getExistingWrapper&lt;JSNodeList&gt;(globalObject, nodeList))
-        return existingWrapper;
</del><ins>+    if (auto wrapper = getCachedWrapper(globalObject-&gt;world(), nodeList))
+        return wrapper;
</ins><span class="cx">     return createWrapper(*globalObject, nodeList);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -47,21 +47,26 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, PerformanceEntry&amp; entry)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;PerformanceEntry&gt;&amp;&amp; entry)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;PerformanceResourceTiming&gt;(entry))
</span><del>-        return wrap&lt;JSPerformanceResourceTiming&gt;(globalObject, downcast&lt;PerformanceResourceTiming&gt;(entry));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, PerformanceResourceTiming, WTFMove(entry));
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(USER_TIMING)
</span><span class="cx">     if (is&lt;PerformanceMark&gt;(entry))
</span><del>-        return wrap&lt;JSPerformanceMark&gt;(globalObject, downcast&lt;PerformanceMark&gt;(entry));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, PerformanceMark, WTFMove(entry));
</ins><span class="cx"> 
</span><span class="cx">     if (is&lt;PerformanceMeasure&gt;(entry))
</span><del>-        return wrap&lt;JSPerformanceMeasure&gt;(globalObject, downcast&lt;PerformanceMeasure&gt;(entry));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, PerformanceMeasure, WTFMove(entry));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return wrap&lt;JSPerformanceEntry&gt;(globalObject, entry);
</del><ins>+    return createWrapper&lt;JSPerformanceEntry&gt;(globalObject, WTFMove(entry));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, PerformanceEntry&amp; entry)
+{
+    return wrap(state, globalObject, entry);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSVGPathSegCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -59,54 +59,56 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, SVGPathSeg&amp; object)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;SVGPathSeg&gt;&amp;&amp; object)
</ins><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), object))
-        return wrapper;
-
-    switch (object.pathSegType()) {
</del><ins>+    switch (object-&gt;pathSegType()) {
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CLOSEPATH:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegClosePath, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegClosePath, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_MOVETO_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegMovetoAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegMovetoAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_MOVETO_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegMovetoRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegMovetoRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_CUBIC_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_CUBIC_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_ARC_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegArcAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegArcAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_ARC_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegArcRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegArcRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoHorizontalAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoHorizontalAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoHorizontalRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoHorizontalRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_VERTICAL_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoVerticalAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoVerticalAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_LINETO_VERTICAL_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoVerticalRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegLinetoVerticalRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicSmoothAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicSmoothAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicSmoothRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoCubicSmoothRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticSmoothAbs, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticSmoothAbs, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticSmoothRel, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSegCurvetoQuadraticSmoothRel, WTFMove(object));
</ins><span class="cx">     case SVGPathSeg::PATHSEG_UNKNOWN:
</span><span class="cx">     default:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, SVGPathSeg, object);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, SVGPathSeg, WTFMove(object));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, SVGPathSeg&amp; object)
+{
+    return wrap(state, globalObject, object);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStyleSheetCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -35,13 +35,16 @@
</span><span class="cx">     visitor.addOpaqueRoot(root(&amp;wrapped()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, StyleSheet&amp; styleSheet)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;StyleSheet&gt;&amp;&amp; styleSheet)
</ins><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), styleSheet))
-        return wrapper;
-    if (styleSheet.isCSSStyleSheet())
-        return CREATE_DOM_WRAPPER(globalObject, CSSStyleSheet, styleSheet);
-    return CREATE_DOM_WRAPPER(globalObject, StyleSheet, styleSheet);
</del><ins>+    if (styleSheet-&gt;isCSSStyleSheet())
+        return CREATE_DOM_WRAPPER(globalObject, CSSStyleSheet, WTFMove(styleSheet));
+    return CREATE_DOM_WRAPPER(globalObject, StyleSheet, WTFMove(styleSheet));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, StyleSheet&amp; stylesheet)
+{
+    return wrap(state, globalObject, stylesheet);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTextCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTextCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSTextCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -32,23 +32,16 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><del>-static inline JSValue createNewTextWrapper(JSDOMGlobalObject&amp; globalObject, Ref&lt;Text&gt;&amp;&amp; text)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;Text&gt;&amp;&amp; text)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;CDATASection&gt;(text.get()))
</span><del>-        return CREATE_DOM_WRAPPER(&amp;globalObject, CDATASection, WTFMove(text));
-    return CREATE_DOM_WRAPPER(&amp;globalObject, Text, WTFMove(text));
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, CDATASection, WTFMove(text));
+    return CREATE_DOM_WRAPPER(globalObject, Text, WTFMove(text));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Text&amp; text)
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Text&amp; text)
</ins><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), text))
-        return wrapper;
-    return createNewTextWrapper(*globalObject, text);
</del><ins>+    return wrap(state, globalObject, text);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;Text&gt;&amp;&amp; text)
-{
-    return createNewTextWrapper(*globalObject, WTFMove(text));
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTextTrackCueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -76,10 +76,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, TextTrackCue&amp; cue)
</span><span class="cx"> {
</span><del>-    if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), cue))
-        return wrapper;
-
-    return toJSNewlyCreated(state, globalObject, Ref&lt;TextTrackCue&gt;(cue));
</del><ins>+    return wrap(state, globalObject, cue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSTextTrackCue::visitAdditionalChildren(SlotVisitor&amp; visitor)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTrackCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -53,30 +53,22 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TrackBase&amp; track)
</del><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TrackBase&amp; track)
</ins><span class="cx"> {
</span><span class="cx">     switch (track.type()) {
</span><span class="cx">     case TrackBase::BaseTrack:
</span><span class="cx">         // This should never happen.
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         break;
</span><del>-        
-    case TrackBase::AudioTrack:
-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), downcast&lt;AudioTrack&gt;(track)))
-            return wrapper;
-        return CREATE_DOM_WRAPPER(globalObject, AudioTrack, track);
</del><span class="cx"> 
</span><ins>+    case TrackBase::AudioTrack:
+        return wrap(state, globalObject, downcast&lt;AudioTrack&gt;(track));
</ins><span class="cx">     case TrackBase::VideoTrack:
</span><del>-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), downcast&lt;VideoTrack&gt;(track)))
-            return wrapper;
-        return CREATE_DOM_WRAPPER(globalObject, VideoTrack, track);
-
</del><ins>+        return wrap(state, globalObject, downcast&lt;VideoTrack&gt;(track));
</ins><span class="cx">     case TrackBase::TextTrack:
</span><del>-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), downcast&lt;TextTrack&gt;(track)))
-            return wrapper;
-        return CREATE_DOM_WRAPPER(globalObject, TextTrack, track);
</del><ins>+        return wrap(state, globalObject, downcast&lt;TextTrack&gt;(track));
</ins><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return jsNull();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSXMLDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSXMLDocumentCustom.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSXMLDocumentCustom.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/js/JSXMLDocumentCustom.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -35,16 +35,16 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><del>-static inline JSValue createNewXMLDocumentWrapper(ExecState&amp; state, JSDOMGlobalObject&amp; globalObject, Ref&lt;XMLDocument&gt;&amp;&amp; passedDocument)
</del><ins>+JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Ref&lt;XMLDocument&gt;&amp;&amp; passedDocument)
</ins><span class="cx"> {
</span><span class="cx">     auto&amp; document = passedDocument.get();
</span><span class="cx">     JSObject* wrapper;
</span><span class="cx">     if (document.isSVGDocument())
</span><del>-        wrapper = CREATE_DOM_WRAPPER(&amp;globalObject, SVGDocument, WTFMove(passedDocument));
</del><ins>+        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGDocument, WTFMove(passedDocument));
</ins><span class="cx">     else
</span><del>-        wrapper = CREATE_DOM_WRAPPER(&amp;globalObject, XMLDocument, WTFMove(passedDocument));
</del><ins>+        wrapper = CREATE_DOM_WRAPPER(globalObject, XMLDocument, WTFMove(passedDocument));
</ins><span class="cx"> 
</span><del>-    reportMemoryForDocumentIfFrameless(state, document);
</del><ins>+    reportMemoryForDocumentIfFrameless(*state, document);
</ins><span class="cx"> 
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span><span class="lines">@@ -53,12 +53,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = cachedDocumentWrapper(*state, *globalObject, document))
</span><span class="cx">         return wrapper;
</span><del>-    return createNewXMLDocumentWrapper(*state, *globalObject, document);
</del><ins>+    return toJSNewlyCreated(state, globalObject, Ref&lt;XMLDocument&gt;(document));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Ref&lt;XMLDocument&gt;&amp;&amp; document)
-{
-    return createNewXMLDocumentWrapper(*state, *globalObject, WTFMove(document));
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -3412,26 +3412,10 @@
</span><span class="cx"> 
</span><span class="cx">         push(@implContent, &quot;JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;$implType&gt;&amp;&amp; impl)\n&quot;);
</span><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><del>-        if ($svgPropertyType) {
-            push(@implContent, &quot;    return createNewWrapper&lt;$className, $implType&gt;(globalObject, WTFMove(impl));\n&quot;);
-        } else {
-            push(@implContent, &quot;    return createNewWrapper&lt;$className&gt;(globalObject, WTFMove(impl));\n&quot;);
-        }
-        push(@implContent, &quot;}\n\n&quot;);
-
-        push(@implContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, $implType&amp; impl)\n&quot;);
-        push(@implContent, &quot;{\n&quot;);
-        if ($svgPropertyType) {
-            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className, $implType&gt;(globalObject, impl))\n&quot;);
-            push(@implContent, &quot;        return result;\n&quot;);
-        } else {
-            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className&gt;(globalObject, impl))\n&quot;);
-            push(@implContent, &quot;        return result;\n&quot;);
-        }
</del><span class="cx">         push(@implContent, &lt;&lt;END) if $vtableNameGnu;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(${vtableRefWin});
</span><span class="cx"> #else
</span><span class="lines">@@ -3459,11 +3443,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> END
</span><span class="cx">         push(@implContent, &lt;&lt;END) if $interface-&gt;extendedAttributes-&gt;{&quot;ReportExtraMemoryCost&quot;};
</span><del>-    globalObject-&gt;vm().heap.reportExtraMemoryAllocated(impl.memoryCost());
</del><ins>+    globalObject-&gt;vm().heap.reportExtraMemoryAllocated(impl-&gt;memoryCost());
</ins><span class="cx"> END
</span><span class="cx"> 
</span><del>-        push(@implContent, &quot;    return createNewWrapper&lt;$className, $implType&gt;(globalObject, impl);\n&quot;);
</del><ins>+        push(@implContent, &quot;    return createNewWrapper&lt;$className, $implType&gt;(globalObject, WTFMove(impl));\n&quot;);
+        push(@implContent, &quot;}\n\n&quot;);
</ins><span class="cx"> 
</span><ins>+        push(@implContent, &quot;JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $implType&amp; impl)\n&quot;);
+        push(@implContent, &quot;{\n&quot;);
+        push(@implContent, &quot;    return wrap(state, globalObject, impl);\n&quot;);
</ins><span class="cx">         push(@implContent, &quot;}\n\n&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -252,16 +252,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestActiveDOMObject&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDOMObject&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestActiveDOMObject@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -278,9 +271,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestActiveDOMObject, TestActiveDOMObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestActiveDOMObject, TestActiveDOMObject&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestActiveDOMObject&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestActiveDOMObject* JSTestActiveDOMObject::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestActiveDOMObject*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -178,16 +178,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestClassWithJSBuiltinConstructor&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestClassWithJSBuiltinConstructor@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -204,9 +197,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor, TestClassWithJSBuiltinConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor, TestClassWithJSBuiltinConstructor&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestClassWithJSBuiltinConstructor* JSTestClassWithJSBuiltinConstructor::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestClassWithJSBuiltinConstructor*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -168,16 +168,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestCustomConstructorWithNoInterfaceObject&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestCustomConstructorWithNoInterfaceObject@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -194,9 +187,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject, TestCustomConstructorWithNoInterfaceObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject, TestCustomConstructorWithNoInterfaceObject&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestCustomConstructorWithNoInterfaceObject* JSTestCustomConstructorWithNoInterfaceObject::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestCustomConstructorWithNoInterfaceObject*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -225,16 +225,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestCustomNamedGetter&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNamedGetter&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestCustomNamedGetter@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -251,9 +244,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestCustomNamedGetter, TestCustomNamedGetter&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomNamedGetter, TestCustomNamedGetter&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomNamedGetter&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestCustomNamedGetter* JSTestCustomNamedGetter::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestCustomNamedGetter*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -273,16 +273,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestEventConstructor&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestEventConstructor&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventConstructor&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestEventConstructor&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestEventConstructor@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -299,9 +292,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestEventConstructor, TestEventConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventConstructor, TestEventConstructor&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventConstructor&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestEventConstructor* JSTestEventConstructor::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestEventConstructor*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -232,16 +232,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestEventTarget&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestEventTarget&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTarget&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestEventTarget&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestEventTarget@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -258,9 +251,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestEventTarget, TestEventTarget&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventTarget, TestEventTarget&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventTarget&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestEventTarget* JSTestEventTarget::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestEventTarget*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -206,16 +206,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestException&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestException&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestException&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestException&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestException@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -232,9 +225,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestException, TestException&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestException, TestException&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestException&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestException* JSTestException::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestException*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -165,16 +165,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestGenerateIsReachable&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerateIsReachable&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestGenerateIsReachable@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -191,9 +184,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestGenerateIsReachable, TestGenerateIsReachable&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGenerateIsReachable, TestGenerateIsReachable&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGenerateIsReachable&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestGenerateIsReachable* JSTestGenerateIsReachable::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestGenerateIsReachable*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -347,16 +347,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestGlobalObject&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestGlobalObject@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -373,9 +366,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestGlobalObject, TestGlobalObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGlobalObject, TestGlobalObject&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestGlobalObject* JSTestGlobalObject::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestGlobalObject*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -917,13 +917,6 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestInterface&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestInterface&gt;(globalObject, WTFMove(impl));
-}
-
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterface&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestInterface&gt;(globalObject, impl))
-        return result;
</del><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx">     // If you hit this failure the interface definition has the ImplementationLacksVTable
</span><span class="cx">     // attribute. You should remove that attribute. If the class has subclasses
</span><span class="lines">@@ -931,9 +924,14 @@
</span><span class="cx">     // attribute to TestInterface.
</span><span class="cx">     static_assert(!__is_polymorphic(TestInterface), &quot;TestInterface is polymorphic but the IDL claims it is not&quot;);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestInterface, TestInterface&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestInterface, TestInterface&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestInterface&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestInterface* JSTestInterface::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestInterface*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -190,16 +190,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestMediaQueryListListener&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQueryListListener&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestMediaQueryListListener@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -216,9 +209,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestMediaQueryListListener, TestMediaQueryListListener&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestMediaQueryListListener, TestMediaQueryListListener&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestMediaQueryListListener&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestMediaQueryListListener* JSTestMediaQueryListListener::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestMediaQueryListListener*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -213,16 +213,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestNamedConstructor&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestNamedConstructor&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedConstructor&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestNamedConstructor&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestNamedConstructor@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -239,9 +232,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestNamedConstructor, TestNamedConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNamedConstructor, TestNamedConstructor&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNamedConstructor&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestNamedConstructor* JSTestNamedConstructor::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestNamedConstructor*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -245,16 +245,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestNode&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestNode&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNode&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestNode&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestNode@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -271,8 +264,13 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestNode, TestNode&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNode, TestNode&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNode&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -474,16 +474,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestNondeterministic&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestNondeterministic&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeterministic&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestNondeterministic&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestNondeterministic@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -500,9 +493,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestNondeterministic, TestNondeterministic&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNondeterministic, TestNondeterministic&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNondeterministic&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestNondeterministic* JSTestNondeterministic::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestNondeterministic*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -6269,16 +6269,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestObj&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestObj&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestObj&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestObj@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -6295,9 +6288,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestObj, TestObj&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestObj, TestObj&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestObj&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestObj* JSTestObj::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestObj*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -249,16 +249,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestOverloadedConstructors&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverloadedConstructors&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestOverloadedConstructors@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -275,9 +268,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestOverloadedConstructors, TestOverloadedConstructors&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverloadedConstructors, TestOverloadedConstructors&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverloadedConstructors&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestOverloadedConstructors* JSTestOverloadedConstructors::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestOverloadedConstructors*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -232,16 +232,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestOverrideBuiltins&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverrideBuiltins&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestOverrideBuiltins@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -258,9 +251,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestOverrideBuiltins, TestOverrideBuiltins&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverrideBuiltins, TestOverrideBuiltins&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverrideBuiltins&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestOverrideBuiltins* JSTestOverrideBuiltins::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestOverrideBuiltins*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -307,16 +307,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestSerializedScriptValueInterface&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestSerializedScriptValueInterface@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -333,9 +326,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestSerializedScriptValueInterface, TestSerializedScriptValueInterface&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestSerializedScriptValueInterface, TestSerializedScriptValueInterface&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestSerializedScriptValueInterface*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -662,16 +662,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;TestTypedefs&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSTestTypedefs&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSTestTypedefs&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7TestTypedefs@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -688,9 +681,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSTestTypedefs, TestTypedefs&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestTypedefs, TestTypedefs&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> TestTypedefs* JSTestTypedefs::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSTestTypedefs*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -206,16 +206,9 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;attribute&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSattribute&gt;(globalObject, WTFMove(impl));
-}
</del><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSattribute&gt;(globalObject, impl))
-        return result;
-
</del><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl.ptr()));
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     void* expectedVTablePointer = reinterpret_cast&lt;void*&gt;(__identifier(&quot;??_7attribute@WebCore@@6B@&quot;));
</span><span class="cx"> #else
</span><span class="lines">@@ -232,9 +225,14 @@
</span><span class="cx">     // by adding the SkipVTableValidation attribute to the interface IDL definition
</span><span class="cx">     RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSattribute, attribute&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSattribute, attribute&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, attribute&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> attribute* JSattribute::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSattribute*&gt;(value))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSreadonlycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp (201128 => 201129)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp        2016-05-19 07:14:45 UTC (rev 201128)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp        2016-05-19 07:32:48 UTC (rev 201129)
</span><span class="lines">@@ -156,13 +156,6 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref&lt;readonly&gt;&amp;&amp; impl)
</span><span class="cx"> {
</span><del>-    return createNewWrapper&lt;JSreadonly&gt;(globalObject, WTFMove(impl));
-}
-
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly&amp; impl)
-{
-    if (JSValue result = getExistingWrapper&lt;JSreadonly&gt;(globalObject, impl))
-        return result;
</del><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx">     // If you hit this failure the interface definition has the ImplementationLacksVTable
</span><span class="cx">     // attribute. You should remove that attribute. If the class has subclasses
</span><span class="lines">@@ -170,9 +163,14 @@
</span><span class="cx">     // attribute to readonly.
</span><span class="cx">     static_assert(!__is_polymorphic(readonly), &quot;readonly is polymorphic but the IDL claims it is not&quot;);
</span><span class="cx"> #endif
</span><del>-    return createNewWrapper&lt;JSreadonly, readonly&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSreadonly, readonly&gt;(globalObject, WTFMove(impl));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, readonly&amp; impl)
+{
+    return wrap(state, globalObject, impl);
+}
+
</ins><span class="cx"> readonly* JSreadonly::toWrapped(JSC::JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (auto* wrapper = jsDynamicCast&lt;JSreadonly*&gt;(value))
</span></span></pre>
</div>
</div>

</body>
</html>