<!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>[200775] 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/200775">200775</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-05-12 09:07:13 -0700 (Thu, 12 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Avoid unnecessary null checks in toJS() when the implementation returns a reference or Ref&lt;&gt;
https://bugs.webkit.org/show_bug.cgi?id=157604

Reviewed by Darin Adler.

Avoid unnecessary null checks in toJS() when the implementation returns
a C++ reference or Ref&lt;&gt;. To achieve this, the following changes were
made:
1. Have toJS() overload that takes a raw pointer call the one that
   takes in a C++ reference, instead of the other way around. This way,
   we only do the null check when passing a raw pointer in.
2. Stop calling WTF::getPtr() on the value returned by the
   implementation because this causes us to call toJS() with a raw
   pointer every time.
3. Add an toJS() overload in JSDOMBinding.h that takes a Ref&lt;T&gt; in and
   that calls toJS() with a C++ reference internally. This way, we
   bypass the null check if the implementation returns a Ref&lt;T&gt;.

Further refactoring could be done but I try to keep the size of this
patch as small as possible. toJS() should probably take the ExecState
and the globalObject by reference, for e.g.

* bindings/js/JSAnimationTimelineCustom.cpp:
(WebCore::toJS):
* bindings/js/JSBlobCustom.cpp:
(WebCore::toJS):
(WebCore::constructJSBlob): Deleted.
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::attributeChanged):
* bindings/js/JSDOMBinding.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::constructJSDOMFormData):
* bindings/js/JSDOMMimeTypeArrayCustom.cpp:
(WebCore::JSDOMMimeTypeArray::nameGetter):
* bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
(WebCore::JSDOMNamedFlowCollection::nameGetter):
* bindings/js/JSDOMPluginArrayCustom.cpp:
(WebCore::JSDOMPluginArray::nameGetter):
* bindings/js/JSDOMPluginCustom.cpp:
(WebCore::JSDOMPlugin::nameGetter):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::toJS):
* bindings/js/JSDOMWindowBase.h:
(WebCore::toJS):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotNamedItemGetter):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
(WebCore::JSDocument::createTouchList):
(WebCore::JSDocument::prepend): Deleted.
* bindings/js/JSDocumentFragmentCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSFileReaderCustom.cpp:
(WebCore::JSFileReader::result):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::namedItems):
(WebCore::callHTMLAllCollection):
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter):
(WebCore::toJS):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
(WebCore::JSHTMLElement::pushEventHandlerScope):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::namedItems):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::nameGetter):
* bindings/js/JSIDBCursorCustom.cpp:
(WebCore::JSIDBCursor::source):
(WebCore::toJS):
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
(WebCore::JSIDBDatabase::transaction):
* bindings/js/JSIDBRequestCustom.cpp:
(WebCore::JSIDBRequest::result):
(WebCore::JSIDBRequest::source):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::construct):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/JSMediaSessionCustom.cpp:
(WebCore::constructJSMediaSession):
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
(WebCore::toJS):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::nameGetter):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
(WebCore::toJSNewlyCreated):
(WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase):
(WebCore::getOutOfLineCachedWrapper): Deleted.
* bindings/js/JSNodeCustom.h:
(WebCore::toJS):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSNodeListCustom.h:
(WebCore::toJS):
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJS):
* bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state):
* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::nameGetter):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.h:
* bindings/js/JSTrackEventCustom.cpp:
(WebCore::JSTrackEvent::track):
* bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
(WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::constructJSWorker):
* bindings/js/ReadableStreamController.cpp:
(WebCore::createReadableStream):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(NativeToJSValue):
(GenerateConstructorDefinition):
(ceilingToPowerOf2): Deleted.
(ConstructorHasProperties): Deleted.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestActiveDOMObject::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCallback.h:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
(WebCore::JSTestCallbackFunction::callbackWithArrayParam):
(WebCore::JSTestCallbackFunction::callbackWithStringList):
(WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCallbackFunction.h:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestCustomNamedGetter::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestEventConstructor::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestEventTarget::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestException::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestGenerateIsReachable::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestGlobalObject::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestGlobalObject.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::construct):
(WebCore::jsTestInterfaceImplementsNode):
(WebCore::jsTestInterfaceSupplementalNode):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestInterface::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestMediaQueryListListener::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::construct):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestNamedConstructor::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::construct):
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestNondeterministic::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestNondeterministic.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
(WebCore::jsTestObjReadOnlyTestObjAttr):
(WebCore::jsTestObjTestObjAttr):
(WebCore::jsTestObjTestNullableObjAttr):
(WebCore::jsTestObjLenientTestObjAttr):
(WebCore::jsTestObjXMLObjAttr):
(WebCore::jsTestObjTypedArrayAttr):
(WebCore::jsTestObjStrictTypeCheckingAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAttribute):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjContentDocument):
(WebCore::jsTestObjMutablePoint):
(WebCore::jsTestObjImmutablePoint):
(WebCore::jsTestObjPutForwardsAttribute):
(WebCore::jsTestObjPutForwardsNullableAttribute):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionGetElementById):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestObj::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
(WebCore::constructJSTestOverloadedConstructors5):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestOverloadedConstructors::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestOverrideBuiltins::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestSerializedScriptValueInterface::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestTypedefs::toWrapped): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSattribute::toWrapped): Deleted.
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSreadonly::toWrapped): Deleted.
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* html/HTMLMediaElement.cpp:
(WebCore::controllerJSValue):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):</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="#trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp">trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.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="#trunkSourceWebCorebindingsjsJSCustomElementInterfacecpp">trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMFormDataCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMMimeTypeArrayCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMNamedFlowCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPluginArrayCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPluginCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBaseh">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#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="#trunkSourceWebCorebindingsjsJSEventTargetCustomcpp">trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSFileReaderCustomcpp">trunk/Source/WebCore/bindings/js/JSFileReaderCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLAllCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLCanvasElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.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="#trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLFormControlsCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLFormElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBRequestCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSImageConstructorcpp">trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSImageDataCustomcpp">trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSLazyEventListenercpp">trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaSessionCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaSessionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNamedNodeMapCustomcpp">trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeCustomh">trunk/Source/WebCore/bindings/js/JSNodeCustom.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeListCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeListCustom.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="#trunkSourceWebCorebindingsjsJSPopStateEventCustomcpp">trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSRTCStatsResponseCustomcpp">trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.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="#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="#trunkSourceWebCorebindingsjsJSTrackCustomh">trunk/Source/WebCore/bindings/js/JSTrackCustom.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTrackEventCustomcpp">trunk/Source/WebCore/bindings/js/JSTrackEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSUserMessageHandlersNamespaceCustomcpp">trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerCustomcpp">trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBasecpp">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBaseh">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamControllercpp">trunk/Source/WebCore/bindings/js/ReadableStreamController.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="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestExceptionh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachableh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenerh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h</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="#trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministich">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSattributecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSattributeh">trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSreadonlycpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSreadonlyh">trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/ChangeLog        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -1,3 +1,368 @@
</span><ins>+2016-05-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Avoid unnecessary null checks in toJS() when the implementation returns a reference or Ref&lt;&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=157604
+
+        Reviewed by Darin Adler.
+
+        Avoid unnecessary null checks in toJS() when the implementation returns
+        a C++ reference or Ref&lt;&gt;. To achieve this, the following changes were
+        made:
+        1. Have toJS() overload that takes a raw pointer call the one that
+           takes in a C++ reference, instead of the other way around. This way,
+           we only do the null check when passing a raw pointer in.
+        2. Stop calling WTF::getPtr() on the value returned by the
+           implementation because this causes us to call toJS() with a raw
+           pointer every time.
+        3. Add an toJS() overload in JSDOMBinding.h that takes a Ref&lt;T&gt; in and
+           that calls toJS() with a C++ reference internally. This way, we
+           bypass the null check if the implementation returns a Ref&lt;T&gt;.
+
+        Further refactoring could be done but I try to keep the size of this
+        patch as small as possible. toJS() should probably take the ExecState
+        and the globalObject by reference, for e.g.
+
+        * bindings/js/JSAnimationTimelineCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSBlobCustom.cpp:
+        (WebCore::toJS):
+        (WebCore::constructJSBlob): Deleted.
+        * bindings/js/JSCSSRuleCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
+        * bindings/js/JSCSSValueCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSCanvasRenderingContextCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSCustomElementInterface.cpp:
+        (WebCore::JSCustomElementInterface::attributeChanged):
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/js/JSDOMFormDataCustom.cpp:
+        (WebCore::constructJSDOMFormData):
+        * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
+        (WebCore::JSDOMMimeTypeArray::nameGetter):
+        * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
+        (WebCore::JSDOMNamedFlowCollection::nameGetter):
+        * bindings/js/JSDOMPluginArrayCustom.cpp:
+        (WebCore::JSDOMPluginArray::nameGetter):
+        * bindings/js/JSDOMPluginCustom.cpp:
+        (WebCore::JSDOMPlugin::nameGetter):
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSDOMWindowBase.h:
+        (WebCore::toJS):
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::jsDOMWindowGetOwnPropertySlotNamedItemGetter):
+        * bindings/js/JSDocumentCustom.cpp:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::JSDocument::createTouchList):
+        (WebCore::JSDocument::prepend): Deleted.
+        * bindings/js/JSDocumentFragmentCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        * bindings/js/JSEventCustom.cpp:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/js/JSEventTargetCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSFileReaderCustom.cpp:
+        (WebCore::JSFileReader::result):
+        * bindings/js/JSHTMLAllCollectionCustom.cpp:
+        (WebCore::namedItems):
+        (WebCore::callHTMLAllCollection):
+        * bindings/js/JSHTMLCanvasElementCustom.cpp:
+        (WebCore::JSHTMLCanvasElement::getContext):
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::JSHTMLCollection::nameGetter):
+        (WebCore::toJS):
+        * bindings/js/JSHTMLDocumentCustom.cpp:
+        (WebCore::JSHTMLDocument::nameGetter):
+        * bindings/js/JSHTMLElementCustom.cpp:
+        (WebCore::constructJSHTMLElement):
+        (WebCore::JSHTMLElement::pushEventHandlerScope):
+        * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
+        (WebCore::namedItems):
+        * bindings/js/JSHTMLFormElementCustom.cpp:
+        (WebCore::JSHTMLFormElement::nameGetter):
+        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+        (WebCore::JSHTMLOptionsCollection::nameGetter):
+        * bindings/js/JSIDBCursorCustom.cpp:
+        (WebCore::JSIDBCursor::source):
+        (WebCore::toJS):
+        * bindings/js/JSIDBDatabaseCustom.cpp:
+        (WebCore::JSIDBDatabase::createObjectStore):
+        (WebCore::JSIDBDatabase::transaction):
+        * bindings/js/JSIDBRequestCustom.cpp:
+        (WebCore::JSIDBRequest::result):
+        (WebCore::JSIDBRequest::source):
+        * bindings/js/JSImageConstructor.cpp:
+        (WebCore::JSImageConstructor::construct):
+        * bindings/js/JSImageDataCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSLazyEventListener.cpp:
+        (WebCore::JSLazyEventListener::initializeJSFunction):
+        * bindings/js/JSMediaSessionCustom.cpp:
+        (WebCore::constructJSMediaSession):
+        * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSNamedNodeMapCustom.cpp:
+        (WebCore::JSNamedNodeMap::nameGetter):
+        * bindings/js/JSNodeCustom.cpp:
+        (WebCore::createWrapperInline):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase):
+        (WebCore::getOutOfLineCachedWrapper): Deleted.
+        * bindings/js/JSNodeCustom.h:
+        (WebCore::toJS):
+        * bindings/js/JSNodeListCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        * bindings/js/JSNodeListCustom.h:
+        (WebCore::toJS):
+        * bindings/js/JSPerformanceEntryCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSPopStateEventCustom.cpp:
+        (WebCore::JSPopStateEvent::state):
+        * bindings/js/JSRTCStatsResponseCustom.cpp:
+        (WebCore::JSRTCStatsResponse::nameGetter):
+        * bindings/js/JSSVGPathSegCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSStyleSheetCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSTextTrackCueCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSTrackCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSTrackCustom.h:
+        * bindings/js/JSTrackEventCustom.cpp:
+        (WebCore::JSTrackEvent::track):
+        * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
+        (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
+        * bindings/js/JSWorkerCustom.cpp:
+        (WebCore::constructJSWorker):
+        * bindings/js/ReadableStreamController.cpp:
+        (WebCore::createReadableStream):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+        (GenerateCallbackHeader):
+        (GenerateCallbackImplementation):
+        (NativeToJSValue):
+        (GenerateConstructorDefinition):
+        (ceilingToPowerOf2): Deleted.
+        (ConstructorHasProperties): Deleted.
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestActiveDOMObject::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        (WebCore::JSTestCallback::callbackWithArrayParam):
+        (WebCore::JSTestCallback::callbackWithStringList):
+        (WebCore::JSTestCallback::callbackRequiresThisToPass):
+        (WebCore::toJS):
+        * bindings/scripts/test/JS/JSTestCallback.h:
+        (WebCore::toJS):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
+        (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
+        (WebCore::JSTestCallbackFunction::callbackWithStringList):
+        (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
+        (WebCore::toJS):
+        * bindings/scripts/test/JS/JSTestCallbackFunction.h:
+        (WebCore::toJS):
+        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestCustomNamedGetter::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        (WebCore::JSTestEventConstructorConstructor::construct):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestEventConstructor::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestEventConstructor.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        (WebCore::jsTestEventTargetPrototypeFunctionItem):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestEventTarget::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestEventTarget.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestException.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestException::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestException.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestGenerateIsReachable::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestGlobalObject::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestGlobalObject.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        (WebCore::JSTestInterfaceConstructor::construct):
+        (WebCore::jsTestInterfaceImplementsNode):
+        (WebCore::jsTestInterfaceSupplementalNode):
+        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
+        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestInterface::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestInterface.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestMediaQueryListListener::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestNamedConstructor::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        (WebCore::JSTestNodeConstructor::construct):
+        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestNondeterministic::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestNondeterministic.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjConstructor::construct):
+        (WebCore::jsTestObjReadOnlyTestObjAttr):
+        (WebCore::jsTestObjTestObjAttr):
+        (WebCore::jsTestObjTestNullableObjAttr):
+        (WebCore::jsTestObjLenientTestObjAttr):
+        (WebCore::jsTestObjXMLObjAttr):
+        (WebCore::jsTestObjTypedArrayAttr):
+        (WebCore::jsTestObjStrictTypeCheckingAttribute):
+        (WebCore::jsTestObjWithScriptExecutionContextAttribute):
+        (WebCore::jsTestObjWithScriptStateAttributeRaises):
+        (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
+        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
+        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
+        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
+        (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
+        (WebCore::jsTestObjContentDocument):
+        (WebCore::jsTestObjMutablePoint):
+        (WebCore::jsTestObjImmutablePoint):
+        (WebCore::jsTestObjPutForwardsAttribute):
+        (WebCore::jsTestObjPutForwardsNullableAttribute):
+        (WebCore::jsTestObjPrototypeFunctionObjMethod):
+        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
+        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
+        (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
+        (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
+        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
+        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
+        (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
+        (WebCore::jsTestObjPrototypeFunctionGetElementById):
+        (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
+        (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
+        (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestObj::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestObj.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        (WebCore::constructJSTestOverloadedConstructors1):
+        (WebCore::constructJSTestOverloadedConstructors2):
+        (WebCore::constructJSTestOverloadedConstructors3):
+        (WebCore::constructJSTestOverloadedConstructors4):
+        (WebCore::constructJSTestOverloadedConstructors5):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestOverloadedConstructors::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestOverrideBuiltins::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestSerializedScriptValueInterface::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::JSTestTypedefsConstructor::construct):
+        (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSTestTypedefs::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSTestTypedefs.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSattribute.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSattribute::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSattribute.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * bindings/scripts/test/JS/JSreadonly.cpp:
+        (WebCore::toJSNewlyCreated):
+        (WebCore::toJS):
+        (WebCore::JSreadonly::toWrapped): Deleted.
+        * bindings/scripts/test/JS/JSreadonly.h:
+        (WebCore::toJS):
+        (WebCore::toJSNewlyCreated):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::controllerJSValue):
+        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
+
</ins><span class="cx"> 2016-05-12  Konstantin Tokarev  &lt;annulen@yandex.ru&gt;
</span><span class="cx"> 
</span><span class="cx">         Use reference instead of pointer in FrameLoaderClient::saveViewStateToItem.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSAnimationTimelineCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSAnimationTimelineCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -39,20 +39,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, AnimationTimeline* value)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, AnimationTimeline&amp; value)
</ins><span class="cx"> {
</span><del>-    if (!value)
-        return jsNull();
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;value);
</ins><span class="cx"> 
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), value);
-
</del><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    if (value-&gt;isDocumentTimeline())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, DocumentTimeline, value);
</del><ins>+    if (value.isDocumentTimeline())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, DocumentTimeline, &amp;value);
</ins><span class="cx">     else
</span><del>-        wrapper = CREATE_DOM_WRAPPER(globalObject, AnimationTimeline, value);
</del><ins>+        wrapper = CREATE_DOM_WRAPPER(globalObject, AnimationTimeline, &amp;value);
</ins><span class="cx"> 
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBlobCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -48,15 +48,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Blob* blob)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Blob&amp; blob)
</ins><span class="cx"> {
</span><del>-    if (!blob)
-        return jsNull();
</del><ins>+    if (is&lt;File&gt;(blob))
+        return wrap&lt;JSFile&gt;(globalObject, downcast&lt;File&gt;(blob));
</ins><span class="cx"> 
</span><del>-    if (is&lt;File&gt;(*blob))
-        return wrap&lt;JSFile&gt;(globalObject, downcast&lt;File&gt;(*blob));
-
-    return wrap&lt;JSBlob&gt;(globalObject, *blob);
</del><ins>+    return wrap&lt;JSBlob&gt;(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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -60,55 +60,52 @@
</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* rule)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, CSSRule&amp; rule)
</ins><span class="cx"> {
</span><del>-    if (!rule)
-        return jsNull();
-
-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), rule);
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;rule);
</ins><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    switch (rule-&gt;type()) {
</del><ins>+    switch (rule.type()) {
</ins><span class="cx">         case CSSRule::STYLE_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSStyleRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSStyleRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::MEDIA_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSMediaRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSMediaRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::FONT_FACE_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSFontFaceRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSFontFaceRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::PAGE_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPageRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPageRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::IMPORT_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSImportRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSImportRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::CHARSET_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSCharsetRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSCharsetRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::KEYFRAME_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframeRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframeRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::KEYFRAMES_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframesRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSKeyframesRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx">         case CSSRule::SUPPORTS_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSSupportsRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSSupportsRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx"> #if ENABLE(CSS_DEVICE_ADAPTATION)
</span><span class="cx">         case CSSRule::WEBKIT_VIEWPORT_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSViewportRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSViewportRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><span class="cx">         case CSSRule::WEBKIT_REGION_RULE:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSRegionRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSRegionRule, &amp;rule);
</ins><span class="cx">             break;
</span><span class="cx"> #endif
</span><span class="cx">         default:
</span><del>-            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSRule, rule);
</del><ins>+            wrapper = CREATE_DOM_WRAPPER(globalObject, CSSRule, &amp;rule);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return wrapper;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -358,7 +358,7 @@
</span><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><span class="cx">     globalObject()-&gt;world().m_cssValueRoots.add(cssValue.get(), root(&amp;wrapped())); // Balanced by JSCSSValueOwner::finalize().
</span><del>-    return toJS(&amp;state, globalObject(), WTF::getPtr(cssValue));
</del><ins>+    return toJS(&amp;state, globalObject(), *cssValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSCSSStyleDeclaration::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray&amp; propertyNames, EnumerationMode mode)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSValueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -64,37 +64,34 @@
</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* value)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, CSSValue&amp; value)
</ins><span class="cx"> {
</span><del>-    if (!value)
-        return jsNull();
-
</del><span class="cx">     // Scripts should only ever see cloned CSSValues, never the internal ones.
</span><del>-    ASSERT(value-&gt;isCSSOMSafe());
</del><ins>+    ASSERT(value.isCSSOMSafe());
</ins><span class="cx"> 
</span><span class="cx">     // If we're here under erroneous circumstances, prefer returning null over a potentially insecure value.
</span><del>-    if (!value-&gt;isCSSOMSafe())
</del><ins>+    if (!value.isCSSOMSafe())
</ins><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), value);
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;value);
</ins><span class="cx"> 
</span><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    if (value-&gt;isWebKitCSSTransformValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSTransformValue, value);
-    else if (value-&gt;isWebKitCSSFilterValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSFilterValue, value);
-    else if (value-&gt;isValueList())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValueList, value);
-    else if (value-&gt;isSVGPaint())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGPaint, value);
-    else if (value-&gt;isSVGColor())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGColor, value);
-    else if (value-&gt;isPrimitiveValue())
-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPrimitiveValue, value);
</del><ins>+    if (value.isWebKitCSSTransformValue())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSTransformValue, &amp;value);
+    else if (value.isWebKitCSSFilterValue())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSFilterValue, &amp;value);
+    else if (value.isValueList())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValueList, &amp;value);
+    else if (value.isSVGPaint())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGPaint, &amp;value);
+    else if (value.isSVGColor())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, SVGColor, &amp;value);
+    else if (value.isPrimitiveValue())
+        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPrimitiveValue, &amp;value);
</ins><span class="cx">     else
</span><del>-        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValue, value);
</del><ins>+        wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValue, &amp;value);
</ins><span class="cx"> 
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCanvasRenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -47,20 +47,17 @@
</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* object)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, CanvasRenderingContext&amp; object)
</ins><span class="cx"> {
</span><del>-    if (!object)
-        return jsNull();
-
</del><span class="cx"> #if ENABLE(WEBGL)
</span><del>-    if (is&lt;WebGLRenderingContext&gt;(*object))
-        return wrap&lt;JSWebGLRenderingContext&gt;(globalObject, downcast&lt;WebGLRenderingContext&gt;(*object));
</del><ins>+    if (is&lt;WebGLRenderingContext&gt;(object))
+        return wrap&lt;JSWebGLRenderingContext&gt;(globalObject, downcast&lt;WebGLRenderingContext&gt;(object));
</ins><span class="cx"> #if ENABLE(WEBGL2)
</span><del>-    if (is&lt;WebGL2RenderingContext&gt;(*object))
-        return wrap&lt;JSWebGL2RenderingContext&gt;(globalObject, downcast&lt;WebGL2RenderingContext&gt;(*object));
</del><ins>+    if (is&lt;WebGL2RenderingContext&gt;(object))
+        return wrap&lt;JSWebGL2RenderingContext&gt;(globalObject, downcast&lt;WebGL2RenderingContext&gt;(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 wrap&lt;JSCanvasRenderingContext2D&gt;(globalObject, downcast&lt;CanvasRenderingContext2D&gt;(object));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomElementInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSCustomElementInterface.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx">     JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, *m_isolatedWorld);
</span><span class="cx">     ExecState* state = globalObject-&gt;globalExec();
</span><span class="cx"> 
</span><del>-    JSObject* jsElement = asObject(toJS(state, globalObject, &amp;element));
</del><ins>+    JSObject* jsElement = asObject(toJS(state, globalObject, element));
</ins><span class="cx"> 
</span><span class="cx">     PropertyName attributeChanged(Identifier::fromString(state, &quot;attributeChangedCallback&quot;));
</span><span class="cx">     JSValue callback = jsElement-&gt;get(state, attributeChanged);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -251,8 +251,12 @@
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBuffer*);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, JSC::ArrayBufferView*);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, JSC::ArrayBufferView*);
</span><del>-template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, RefPtr&lt;T&gt;);
-template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, PassRefPtr&lt;T&gt;);
</del><ins>+template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const RefPtr&lt;T&gt;&amp;);
+template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const PassRefPtr&lt;T&gt;&amp;);
+template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Ref&lt;T&gt;&amp;);
+template&lt;typename T&gt; JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const RefPtr&lt;T&gt;&amp;);
+template&lt;typename T&gt; JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const PassRefPtr&lt;T&gt;&amp;);
+template&lt;typename T&gt; JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const Ref&lt;T&gt;&amp;);
</ins><span class="cx"> template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Vector&lt;T&gt;&amp;);
</span><span class="cx"> template&lt;typename T&gt; JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Vector&lt;RefPtr&lt;T&gt;&gt;&amp;);
</span><span class="cx"> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const String&amp;);
</span><span class="lines">@@ -540,16 +544,36 @@
</span><span class="cx">     return view-&gt;wrap(exec, globalObject);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, RefPtr&lt;T&gt; ptr)
</del><ins>+template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const RefPtr&lt;T&gt;&amp; ptr)
</ins><span class="cx"> {
</span><span class="cx">     return toJS(exec, globalObject, ptr.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr&lt;T&gt; ptr)
</del><ins>+template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const PassRefPtr&lt;T&gt;&amp; ptr)
</ins><span class="cx"> {
</span><span class="cx">     return toJS(exec, globalObject, ptr.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Ref&lt;T&gt;&amp; ptr)
+{
+    return toJS(exec, globalObject, const_cast&lt;T&amp;&gt;(ptr.get()));
+}
+
+template&lt;typename T&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const RefPtr&lt;T&gt;&amp; ptr)
+{
+    return toJSNewlyCreated(exec, globalObject, ptr.get());
+}
+
+template&lt;typename T&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const PassRefPtr&lt;T&gt;&amp; ptr)
+{
+    return toJSNewlyCreated(exec, globalObject, ptr.get());
+}
+
+template&lt;typename T&gt; inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Ref&lt;T&gt;&amp; ptr)
+{
+    return toJSNewlyCreated(exec, globalObject, const_cast&lt;T&amp;&gt;(ptr.get()));
+}
+
</ins><span class="cx"> template&lt;typename T&gt; inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector&lt;T&gt;&amp; vector)
</span><span class="cx"> {
</span><span class="cx">     JSC::JSArray* array = constructEmptyArray(exec, nullptr, vector.size());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMFormDataCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx">     DOMConstructorObject* jsConstructor = jsCast&lt;DOMConstructorObject*&gt;(exec-&gt;callee());
</span><span class="cx"> 
</span><span class="cx">     HTMLFormElement* form = toHTMLFormElementOrNull(exec-&gt;argument(0));
</span><del>-    RefPtr&lt;DOMFormData&gt; domFormData = DOMFormData::create(form);
-    return JSValue::encode(asObject(toJS(exec, jsConstructor-&gt;globalObject(), domFormData.get())));
</del><ins>+    auto domFormData = DOMFormData::create(form);
+    return JSValue::encode(asObject(toJS(exec, jsConstructor-&gt;globalObject(), domFormData)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSDOMFormData::append(ExecState&amp; state)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMMimeTypeArrayCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMNamedFlowCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPluginArrayCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPluginCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -282,16 +282,14 @@
</span><span class="cx"> 
</span><span class="cx"> // JSDOMGlobalObject* is ignored, accessing a window in any context will
</span><span class="cx"> // use that DOMWindow's prototype chain.
</span><del>-JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow* domWindow)
</del><ins>+JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow&amp; domWindow)
</ins><span class="cx"> {
</span><span class="cx">     return toJS(exec, domWindow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState* exec, DOMWindow* domWindow)
</del><ins>+JSValue toJS(ExecState* exec, DOMWindow&amp; domWindow)
</ins><span class="cx"> {
</span><del>-    if (!domWindow)
-        return jsNull();
-    Frame* frame = domWindow-&gt;frame();
</del><ins>+    Frame* frame = domWindow.frame();
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return jsNull();
</span><span class="cx">     return frame-&gt;script().windowShell(currentWorld(exec));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -90,8 +90,10 @@
</span><span class="cx">     // Returns a JSDOMWindow or jsNull()
</span><span class="cx">     // JSDOMGlobalObject* is ignored, accessing a window in any context will
</span><span class="cx">     // use that DOMWindow's prototype chain.
</span><del>-    WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow*);
-    JSC::JSValue toJS(JSC::ExecState*, DOMWindow*);
</del><ins>+    WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow&amp;);
+    inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMWindow* window) { return window ? toJS(exec, globalObject, *window) : JSC::jsNull(); }
+    JSC::JSValue toJS(JSC::ExecState*, DOMWindow&amp;);
+    inline JSC::JSValue toJS(JSC::ExecState* exec, DOMWindow* window) { return window ? toJS(exec, *window) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx">     // Returns JSDOMWindow or 0
</span><span class="cx">     JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">             if (UNLIKELY(htmlDocument.windowNamedItemContainsMultipleElements(*atomicPropertyName))) {
</span><span class="cx">                 Ref&lt;HTMLCollection&gt; collection = document-&gt;windowNamedItems(atomicPropertyName);
</span><span class="cx">                 ASSERT(collection-&gt;length() &gt; 1);
</span><del>-                namedItem = toJS(exec, thisObject-&gt;globalObject(), collection.ptr());
</del><ins>+                namedItem = toJS(exec, thisObject-&gt;globalObject(), collection);
</ins><span class="cx">             } else
</span><span class="cx">                 namedItem = toJS(exec, thisObject-&gt;globalObject(), htmlDocument.windowNamedItem(*atomicPropertyName));
</span><span class="cx">             slot.setValue(thisObject, ReadOnly | DontDelete | DontEnum, namedItem);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,29 +79,26 @@
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Document* document)
</del><ins>+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, Document&amp; document)
</ins><span class="cx"> {
</span><del>-    if (!document)
-        return jsNull();
-
-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), document);
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;document);
</ins><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    if (DOMWindow* domWindow = document-&gt;domWindow()) {
-        globalObject = toJSDOMWindow(toJS(state, domWindow));
</del><ins>+    if (DOMWindow* domWindow = document.domWindow()) {
+        globalObject = toJSDOMWindow(toJS(state, *domWindow));
</ins><span class="cx">         // Creating a wrapper for domWindow might have created a wrapper for document as well.
</span><del>-        wrapper = getCachedWrapper(globalObject-&gt;world(), document);
</del><ins>+        wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;document);
</ins><span class="cx">         if (wrapper)
</span><span class="cx">             return wrapper;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return createNewDocumentWrapper(*state, *globalObject, *document);
</del><ins>+    return createNewDocumentWrapper(*state, *globalObject, document);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Document* document)
</del><ins>+JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Document&amp; document)
</ins><span class="cx"> {
</span><del>-    return document ? createNewDocumentWrapper(*state, *globalObject, *document) : jsNull();
</del><ins>+    return createNewDocumentWrapper(*state, *globalObject, document);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSDocument::prepend(ExecState&amp; state)
</span><span class="lines">@@ -125,12 +122,12 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> JSValue JSDocument::createTouchList(ExecState&amp; state)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;TouchList&gt; touchList = TouchList::create();
</del><ins>+    auto touchList = TouchList::create();
</ins><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; state.argumentCount(); i++)
</span><span class="cx">         touchList-&gt;append(JSTouch::toWrapped(state.argument(i)));
</span><span class="cx"> 
</span><del>-    return toJS(&amp;state, globalObject(), touchList.release());
</del><ins>+    return toJS(&amp;state, globalObject(), touchList);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentFragmentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSDocumentFragmentCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -61,20 +61,17 @@
</span><span class="cx">     return createNewWrapper&lt;JSDocumentFragment&gt;(&amp;globalObject, &amp;impl);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, DocumentFragment* impl)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, DocumentFragment&amp; impl)
</ins><span class="cx"> {
</span><del>-    return impl ? createNewDocumentFragmentWrapper(*globalObject, *impl) : jsNull();
</del><ins>+    return createNewDocumentFragmentWrapper(*globalObject, impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, DocumentFragment* impl)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, DocumentFragment&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-
-    if (JSValue result = getExistingWrapper&lt;JSDocumentFragment&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSDocumentFragment&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><del>-    return createNewDocumentFragmentWrapper(*globalObject, *impl);
</del><ins>+    return createNewDocumentFragmentWrapper(*globalObject, impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSEventCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -62,24 +62,21 @@
</span><span class="cx">     return CREATE_DOM_WRAPPER(&amp;globalObject, Event, &amp;event);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Event* event)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, Event&amp; event)
</ins><span class="cx"> {
</span><span class="cx">     JSLockHolder lock(globalObject-&gt;vm());
</span><span class="cx"> 
</span><del>-    if (!event)
-        return jsNull();
-
-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), event);
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;event);
</ins><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    return createNewEventWrapper(*globalObject, *event);
</del><ins>+    return createNewEventWrapper(*globalObject, event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Event* event)
</del><ins>+JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Event&amp; event)
</ins><span class="cx"> {
</span><del>-    return event ? createNewEventWrapper(*globalObject, *event) : jsNull();
</del><ins>+    return createNewEventWrapper(*globalObject, event);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #undef TRY_TO_WRAP_WITH_INTERFACE
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSEventTargetCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSEventTargetCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -42,14 +42,11 @@
</span><span class="cx"> 
</span><span class="cx"> #define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \
</span><span class="cx">     case interfaceName##EventTargetInterfaceType: \
</span><del>-        return toJS(exec, globalObject, static_cast&lt;interfaceName*&gt;(target));
</del><ins>+        return toJS(exec, globalObject, static_cast&lt;interfaceName&amp;&gt;(target));
</ins><span class="cx"> 
</span><del>-JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* target)
</del><ins>+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget&amp; target)
</ins><span class="cx"> {
</span><del>-    if (!target)
-        return jsNull();
-
-    switch (target-&gt;eventTargetInterface()) {
</del><ins>+    switch (target.eventTargetInterface()) {
</ins><span class="cx">     DOM_EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE)
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSFileReaderCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSFileReaderCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSFileReaderCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSFileReaderCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> {
</span><span class="cx">     FileReader&amp; imp = wrapped();
</span><span class="cx">     if (imp.readType() == FileReaderLoader::ReadAsArrayBuffer)
</span><del>-        return toJS(&amp;state, globalObject(), WTF::getPtr(imp.arrayBufferResult()));
</del><ins>+        return toJS(&amp;state, globalObject(), imp.arrayBufferResult().get());
</ins><span class="cx">     return jsOwnedStringOrNull(&amp;state, imp.stringResult());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLAllCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -43,11 +43,11 @@
</span><span class="cx">     if (namedItems.isEmpty())
</span><span class="cx">         return jsUndefined();
</span><span class="cx">     if (namedItems.size() == 1)
</span><del>-        return toJS(&amp;state, collection-&gt;globalObject(), namedItems[0].ptr());
</del><ins>+        return toJS(&amp;state, collection-&gt;globalObject(), namedItems[0]);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: HTML5 specification says this should be a HTMLCollection.
</span><span class="cx">     // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
</span><del>-    return toJS(&amp;state, collection-&gt;globalObject(), StaticElementList::adopt(namedItems).get());
</del><ins>+    return toJS(&amp;state, collection-&gt;globalObject(), StaticElementList::adopt(namedItems));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // HTMLAllCollections are strange objects, they support both get and call.
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (Optional&lt;uint32_t&gt; index = parseIndex(*exec-&gt;argument(1).toWTFString(exec).impl())) {
</span><span class="cx">         if (auto* item = collection.namedItemWithIndex(string, index.value()))
</span><del>-            return JSValue::encode(toJS(exec, jsCollection-&gt;globalObject(), item));
</del><ins>+            return JSValue::encode(toJS(exec, jsCollection-&gt;globalObject(), *item));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLCanvasElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     CanvasRenderingContext* context = canvas.getContext(contextId, attrs.get());
</span><span class="cx">     if (!context)
</span><span class="cx">         return jsNull();
</span><del>-    return toJS(&amp;state, globalObject(), WTF::getPtr(context));
</del><ins>+    return toJS(&amp;state, globalObject(), *context);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState&amp; state)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -49,32 +49,29 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, HTMLCollection* collection)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, HTMLCollection&amp; collection)
</ins><span class="cx"> {
</span><del>-    if (!collection)
-        return jsNull();
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;collection);
</ins><span class="cx"> 
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), collection);
-
</del><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    switch (collection-&gt;type()) {
</del><ins>+    switch (collection.type()) {
</ins><span class="cx">     case FormControls:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLFormControlsCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLFormControlsCollection, &amp;collection);
</ins><span class="cx">     case SelectOptions:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLOptionsCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLOptionsCollection, &amp;collection);
</ins><span class="cx">     case DocAll:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, HTMLAllCollection, collection);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, HTMLAllCollection, &amp;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, &amp;collection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -87,13 +87,13 @@
</span><span class="cx">     if (UNLIKELY(document.documentNamedItemContainsMultipleElements(*atomicPropertyName))) {
</span><span class="cx">         Ref&lt;HTMLCollection&gt; collection = document.documentNamedItems(atomicPropertyName);
</span><span class="cx">         ASSERT(collection-&gt;length() &gt; 1);
</span><del>-        value = toJS(exec, globalObject(), WTF::getPtr(collection));
</del><ins>+        value = toJS(exec, globalObject(), collection);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Element* element = document.documentNamedItem(*atomicPropertyName);
-    if (UNLIKELY(is&lt;HTMLIFrameElement&gt;(*element))) {
-        if (Frame* frame = downcast&lt;HTMLIFrameElement&gt;(*element).contentFrame()) {
</del><ins>+    Element&amp; element = *document.documentNamedItem(*atomicPropertyName);
+    if (UNLIKELY(is&lt;HTMLIFrameElement&gt;(element))) {
+        if (Frame* frame = downcast&lt;HTMLIFrameElement&gt;(element).contentFrame()) {
</ins><span class="cx">             value = toJS(exec, frame);
</span><span class="cx">             return true;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    JSValue elementWrapperValue = toJS(state, jsConstructor-&gt;globalObject(), elementToUpgrade);
</del><ins>+    JSValue elementWrapperValue = toJS(state, jsConstructor-&gt;globalObject(), *elementToUpgrade);
</ins><span class="cx">     ASSERT(elementWrapperValue.isObject());
</span><span class="cx"> 
</span><span class="cx">     JSValue newPrototype = newTarget-&gt;get(state, vm.propertyNames-&gt;prototype);
</span><span class="lines">@@ -108,14 +108,14 @@
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     JSGlobalObject* lexicalGlobalObject = exec-&gt;lexicalGlobalObject();
</span><span class="cx">     
</span><del>-    scope = JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), &amp;element.document())), scope);
</del><ins>+    scope = JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), element.document())), scope);
</ins><span class="cx"> 
</span><span class="cx">     // The form is next, searched before the document, but after the element itself.
</span><span class="cx">     if (HTMLFormElement* form = element.form())
</span><del>-        scope = JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), form)), scope);
</del><ins>+        scope = JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), *form)), scope);
</ins><span class="cx"> 
</span><span class="cx">     // The element is on top, searched first.
</span><del>-    return JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), &amp;element)), scope);
</del><ins>+    return JSWithScope::create(vm, lexicalGlobalObject, asObject(toJS(exec, globalObject(), element)), scope);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLFormControlsCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     if (namedItems.isEmpty())
</span><span class="cx">         return jsUndefined();
</span><span class="cx">     if (namedItems.size() == 1)
</span><del>-        return toJS(&amp;state, collection-&gt;globalObject(), namedItems[0].ptr());
</del><ins>+        return toJS(&amp;state, collection-&gt;globalObject(), namedItems[0]);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(collection-&gt;wrapped().type() == FormControls);
</span><span class="cx">     return toJS(&amp;state, collection-&gt;globalObject(), collection-&gt;wrapped().ownerNode().radioNodeList(name).get());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLFormElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     if (namedItems.isEmpty())
</span><span class="cx">         return false;
</span><span class="cx">     if (namedItems.size() == 1) {
</span><del>-        value = toJS(exec, globalObject(), namedItems[0].ptr());
</del><ins>+        value = toJS(exec, globalObject(), namedItems[0]);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -48,19 +48,16 @@
</span><span class="cx"> {
</span><span class="cx">     auto&amp; cursor = wrapped();
</span><span class="cx">     if (auto* index = cursor.index())
</span><del>-        return toJS(&amp;state, globalObject(), index);
</del><ins>+        return toJS(&amp;state, globalObject(), *index);
</ins><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* cursor)
</del><ins>+JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, IDBCursor&amp; cursor)
</ins><span class="cx"> {
</span><del>-    if (!cursor)
-        return JSC::jsNull();
</del><ins>+    if (is&lt;IDBCursorWithValue&gt;(cursor))
+        return wrap&lt;JSIDBCursorWithValue&gt;(globalObject, downcast&lt;IDBCursorWithValue&gt;(cursor));
</ins><span class="cx"> 
</span><del>-    if (is&lt;IDBCursorWithValue&gt;(*cursor))
-        return wrap&lt;JSIDBCursorWithValue&gt;(globalObject, downcast&lt;IDBCursorWithValue&gt;(*cursor));
-
-    return wrap&lt;JSIDBCursor&gt;(globalObject, *cursor);
</del><ins>+    return wrap&lt;JSIDBCursor&gt;(globalObject, cursor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ExceptionCodeWithMessage ec;
</span><del>-    JSValue result = toJS(&amp;state, globalObject(), wrapped().createObjectStore(name, keyPath, autoIncrement, ec).get());
</del><ins>+    JSValue result = toJS(&amp;state, globalObject(), wrapped().createObjectStore(name, keyPath, autoIncrement, ec));
</ins><span class="cx">     setDOMException(&amp;state, ec);
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ExceptionCodeWithMessage ec;
</span><del>-    JSValue result = toJS(&amp;exec, globalObject(), wrapped().transaction(scriptContext, scope, mode, ec).get());
</del><ins>+    JSValue result = toJS(&amp;exec, globalObject(), wrapped().transaction(scriptContext, scope, mode, ec));
</ins><span class="cx">     setDOMException(&amp;exec, ec);
</span><span class="cx">     return result;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBRequestCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSIDBRequestCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -50,9 +50,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (auto* cursor = request.cursorResult())
</span><del>-        return toJS(&amp;state, globalObject(), cursor);
</del><ins>+        return toJS(&amp;state, globalObject(), *cursor);
</ins><span class="cx">     if (auto* database = request.databaseResult())
</span><del>-        return toJS(&amp;state, globalObject(), database);
</del><ins>+        return toJS(&amp;state, globalObject(), *database);
</ins><span class="cx">     if (auto result = request.scriptResult())
</span><span class="cx">         return result;
</span><span class="cx">     return jsNull();
</span><span class="lines">@@ -62,9 +62,9 @@
</span><span class="cx"> {
</span><span class="cx">     auto&amp; request = wrapped();
</span><span class="cx">     if (auto* cursor = request.cursorSource())
</span><del>-        return toJS(&amp;state, globalObject(), cursor);
</del><ins>+        return toJS(&amp;state, globalObject(), *cursor);
</ins><span class="cx">     if (auto* index = request.indexSource())
</span><del>-        return toJS(&amp;state, globalObject(), index);
</del><ins>+        return toJS(&amp;state, globalObject(), *index);
</ins><span class="cx">     return toJS(&amp;state, globalObject(), request.objectStoreSource());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSImageConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     // Calling toJS on the document causes the JS document wrapper to be
</span><span class="cx">     // added to the window object. This is done to ensure that JSDocument::visit
</span><span class="cx">     // will be called, which will cause the image element to be marked if necessary.
</span><del>-    toJS(state, jsConstructor-&gt;globalObject(), document);
</del><ins>+    toJS(state, jsConstructor-&gt;globalObject(), *document);
</ins><span class="cx">     int width;
</span><span class="cx">     int height;
</span><span class="cx">     int* optionalWidth = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSImageDataCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -35,21 +35,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData* imageData)
</del><ins>+JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData&amp; imageData)
</ins><span class="cx"> {
</span><del>-    if (!imageData)
-        return jsNull();
-    
-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), imageData);
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;imageData);
</ins><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx">     
</span><del>-    wrapper = CREATE_DOM_WRAPPER(globalObject, ImageData, imageData);
</del><ins>+    wrapper = CREATE_DOM_WRAPPER(globalObject, ImageData, &amp;imageData);
</ins><span class="cx">     Identifier dataName = Identifier::fromString(exec, &quot;data&quot;);
</span><del>-    wrapper-&gt;putDirect(exec-&gt;vm(), dataName, toJS(exec, globalObject, imageData-&gt;data()), DontDelete | ReadOnly);
</del><ins>+    wrapper-&gt;putDirect(exec-&gt;vm(), dataName, toJS(exec, globalObject, imageData.data()), DontDelete | ReadOnly);
</ins><span class="cx">     // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=142595
</span><del>-    exec-&gt;heap()-&gt;deprecatedReportExtraMemory(imageData-&gt;data()-&gt;length());
</del><ins>+    exec-&gt;heap()-&gt;deprecatedReportExtraMemory(imageData.data()-&gt;length());
</ins><span class="cx">     
</span><span class="cx">     return wrapper;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSLazyEventListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">             // Ensure that 'node' has a JavaScript wrapper to mark the event listener we're creating.
</span><span class="cx">             JSLockHolder lock(exec);
</span><span class="cx">             // FIXME: Should pass the global object associated with the node
</span><del>-            setWrapper(exec-&gt;vm(), asObject(toJS(exec, globalObject, m_originalNode)));
</del><ins>+            setWrapper(exec-&gt;vm(), asObject(toJS(exec, globalObject, *m_originalNode)));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Add the event's home element to the scope
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaSessionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMediaSessionCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaSessionCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSMediaSessionCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx">     } else
</span><span class="cx">         kind = &quot;content&quot;;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;MediaSession&gt; object = MediaSession::create(*context, kind);
-    return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = MediaSession::create(*context, kind);
+    return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -37,15 +37,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, MediaStreamCapabilities* object)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, MediaStreamCapabilities&amp; object)
</ins><span class="cx"> {
</span><del>-    if (!object)
-        return jsNull();
</del><ins>+    if (object.hasVideoSource())
+        return wrap&lt;JSAllVideoCapabilities&gt;(globalObject, static_cast&lt;AllVideoCapabilities&amp;&gt;(object));
</ins><span class="cx"> 
</span><del>-    if (object-&gt;hasVideoSource())
-        return wrap&lt;JSAllVideoCapabilities&gt;(globalObject, static_cast&lt;AllVideoCapabilities&gt;(*object));
-
-    return wrap&lt;JSAllAudioCapabilities&gt;(globalObject, static_cast&lt;AllAudioCapabilities&gt;(*object));
</del><ins>+    return wrap&lt;JSAllAudioCapabilities&gt;(globalObject, static_cast&lt;AllAudioCapabilities&amp;&gt;(object));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNamedNodeMapCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">             break;
</span><span class="cx">         case Node::DOCUMENT_NODE:
</span><span class="cx">             // we don't want to cache the document itself in the per-document dictionary
</span><del>-            return toJS(exec, globalObject, downcast&lt;Document&gt;(node));
</del><ins>+            return toJS(exec, globalObject, downcast&lt;Document&gt;(*node));
</ins><span class="cx">         case Node::DOCUMENT_TYPE_NODE:
</span><span class="cx">             wrapper = CREATE_DOM_WRAPPER(globalObject, DocumentType, node);
</span><span class="cx">             break;
</span><span class="lines">@@ -252,12 +252,9 @@
</span><span class="cx">     return createWrapperInline(exec, globalObject, node);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
</del><ins>+JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node)
-        return jsNull();
-    
-    return createWrapperInline(exec, globalObject, node);
</del><ins>+    return createWrapperInline(exec, globalObject, &amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSC::JSObject* getOutOfLineCachedWrapper(JSDOMGlobalObject* globalObject, Node* node)
</span><span class="lines">@@ -273,7 +270,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     JSLockHolder lock(scriptState);
</span><del>-    toJS(scriptState, static_cast&lt;JSDOMGlobalObject*&gt;(scriptState-&gt;lexicalGlobalObject()), root);
</del><ins>+    toJS(scriptState, static_cast&lt;JSDOMGlobalObject*&gt;(scriptState-&gt;lexicalGlobalObject()), *root);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeCustom.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeCustom.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSNodeCustom.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -34,20 +34,17 @@
</span><span class="cx"> WEBCORE_EXPORT JSC::JSValue createWrapper(JSC::ExecState*, JSDOMGlobalObject*, Node*);
</span><span class="cx"> WEBCORE_EXPORT JSC::JSObject* getOutOfLineCachedWrapper(JSDOMGlobalObject*, Node*);
</span><span class="cx"> 
</span><del>-inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
</del><ins>+inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node)
-        return JSC::jsNull();
-
</del><span class="cx">     if (LIKELY(globalObject-&gt;worldIsNormal())) {
</span><del>-        if (auto* wrapper = node-&gt;wrapper())
</del><ins>+        if (auto* wrapper = node.wrapper())
</ins><span class="cx">             return wrapper;
</span><span class="cx">     } else {
</span><del>-        if (auto* wrapper = getOutOfLineCachedWrapper(globalObject, node))
</del><ins>+        if (auto* wrapper = getOutOfLineCachedWrapper(globalObject, &amp;node))
</ins><span class="cx">             return wrapper;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return createWrapper(exec, globalObject, node);
</del><ins>+    return createWrapper(exec, globalObject, &amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // In the C++ DOM, a node tree survives as long as there is a reference to its
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeListCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeListCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeListCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSNodeListCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -59,12 +59,9 @@
</span><span class="cx">     return createNewWrapper&lt;JSNodeList&gt;(&amp;globalObject, &amp;nodeList);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, NodeList* nodeList)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, NodeList&amp; nodeList)
</ins><span class="cx"> {
</span><del>-    if (!nodeList)
-        return JSC::jsNull();
-
-    return createWrapper(*globalObject, *nodeList);
</del><ins>+    return createWrapper(*globalObject, nodeList);
</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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeListCustom.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSNodeListCustom.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -33,13 +33,11 @@
</span><span class="cx"> 
</span><span class="cx"> WEBCORE_EXPORT JSC::JSValue createWrapper(JSDOMGlobalObject&amp;, NodeList&amp;);
</span><span class="cx"> 
</span><del>-ALWAYS_INLINE JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, NodeList* nodeList)
</del><ins>+ALWAYS_INLINE JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, NodeList&amp; nodeList)
</ins><span class="cx"> {
</span><del>-    if (!nodeList)
-        return JSC::jsNull();
-    if (JSC::JSValue existingWrapper = getExistingWrapper&lt;JSNodeList&gt;(globalObject, nodeList))
</del><ins>+    if (JSC::JSValue existingWrapper = getExistingWrapper&lt;JSNodeList&gt;(globalObject, &amp;nodeList))
</ins><span class="cx">         return existingWrapper;
</span><del>-    return createWrapper(*globalObject, *nodeList);
</del><ins>+    return createWrapper(*globalObject, nodeList);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -47,23 +47,20 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, PerformanceEntry* entry)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, PerformanceEntry&amp; entry)
</ins><span class="cx"> {
</span><del>-    if (!entry)
-        return jsNull();
</del><ins>+    if (is&lt;PerformanceResourceTiming&gt;(entry))
+        return wrap&lt;JSPerformanceResourceTiming&gt;(globalObject, downcast&lt;PerformanceResourceTiming&gt;(entry));
</ins><span class="cx"> 
</span><del>-    if (is&lt;PerformanceResourceTiming&gt;(*entry))
-        return wrap&lt;JSPerformanceResourceTiming&gt;(globalObject, downcast&lt;PerformanceResourceTiming&gt;(*entry));
-
</del><span class="cx"> #if ENABLE(USER_TIMING)
</span><del>-    if (is&lt;PerformanceMark&gt;(*entry))
-        return wrap&lt;JSPerformanceMark&gt;(globalObject, downcast&lt;PerformanceMark&gt;(*entry));
</del><ins>+    if (is&lt;PerformanceMark&gt;(entry))
+        return wrap&lt;JSPerformanceMark&gt;(globalObject, downcast&lt;PerformanceMark&gt;(entry));
</ins><span class="cx"> 
</span><del>-    if (is&lt;PerformanceMeasure&gt;(*entry))
-        return wrap&lt;JSPerformanceMeasure&gt;(globalObject, downcast&lt;PerformanceMeasure&gt;(*entry));
</del><ins>+    if (is&lt;PerformanceMeasure&gt;(entry))
+        return wrap&lt;JSPerformanceMeasure&gt;(globalObject, downcast&lt;PerformanceMeasure&gt;(entry));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return wrap&lt;JSPerformanceEntry&gt;(globalObject, *entry);
</del><ins>+    return wrap&lt;JSPerformanceEntry&gt;(globalObject, entry);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPopStateEventCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">     JSValue result;
</span><span class="cx"> 
</span><span class="cx">     if (isSameState) {
</span><del>-        JSHistory* jsHistory = jsCast&lt;JSHistory*&gt;(toJS(&amp;state, globalObject(), history).asCell());
</del><ins>+        JSHistory* jsHistory = jsCast&lt;JSHistory*&gt;(toJS(&amp;state, globalObject(), *history).asCell());
</ins><span class="cx">         result = jsHistory-&gt;state(state);
</span><span class="cx">     } else
</span><span class="cx">         result = event.serializedState()-&gt;deserialize(&amp;state, globalObject(), 0);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSRTCStatsResponseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     if (!item)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    value = toJS(exec, globalObject(), item);
</del><ins>+    value = toJS(exec, globalObject(), *item);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSVGPathSegCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSSVGPathSegCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -59,56 +59,53 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, SVGPathSeg* object)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, SVGPathSeg&amp; object)
</ins><span class="cx"> {
</span><del>-    if (!object)
-        return jsNull();
-
-    if (JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), object))
</del><ins>+    if (JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;object))
</ins><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    switch (object-&gt;pathSegType()) {
</del><ins>+    switch (object.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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;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, &amp;object);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStyleSheetCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -35,18 +35,15 @@
</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* styleSheet)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, StyleSheet&amp; styleSheet)
</ins><span class="cx"> {
</span><del>-    if (!styleSheet)
-        return JSC::jsNull();
-
-    if (JSC::JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), styleSheet))
</del><ins>+    if (JSC::JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;styleSheet))
</ins><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><del>-    if (styleSheet-&gt;isCSSStyleSheet())
-        return CREATE_DOM_WRAPPER(globalObject, CSSStyleSheet, styleSheet);
</del><ins>+    if (styleSheet.isCSSStyleSheet())
+        return CREATE_DOM_WRAPPER(globalObject, CSSStyleSheet, &amp;styleSheet);
</ins><span class="cx"> 
</span><del>-    return CREATE_DOM_WRAPPER(globalObject, StyleSheet, styleSheet);
</del><ins>+    return CREATE_DOM_WRAPPER(globalObject, StyleSheet, &amp;styleSheet);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -59,23 +59,20 @@
</span><span class="cx">     return visitor.containsOpaqueRoot(root(textTrackCue.track()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, TextTrackCue* cue)
</del><ins>+JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, TextTrackCue&amp; cue)
</ins><span class="cx"> {
</span><del>-    if (!cue)
-        return jsNull();
</del><ins>+    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), &amp;cue);
</ins><span class="cx"> 
</span><del>-    JSObject* wrapper = getCachedWrapper(globalObject-&gt;world(), cue);
-
</del><span class="cx">     if (wrapper)
</span><span class="cx">         return wrapper;
</span><span class="cx"> 
</span><span class="cx">     // This switch will make more sense once we support DataCue
</span><del>-    switch (cue-&gt;cueType()) {
</del><ins>+    switch (cue.cueType()) {
</ins><span class="cx">     case TextTrackCue::Data:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, DataCue, cue);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, DataCue, &amp;cue);
</ins><span class="cx">     case TextTrackCue::WebVTT:
</span><span class="cx">     case TextTrackCue::Generic:
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, VTTCue, cue);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, VTTCue, &amp;cue);
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return jsNull();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTrackCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSTrackCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -53,31 +53,28 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TrackBase* track)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TrackBase&amp; track)
</ins><span class="cx"> {
</span><del>-    if (!track)
-        return jsNull();
-    
-    switch (track-&gt;type()) {
</del><ins>+    switch (track.type()) {
</ins><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><span class="cx">         
</span><span class="cx">     case TrackBase::AudioTrack:
</span><del>-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toAudioTrack(track)))
</del><ins>+        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toAudioTrack(&amp;track)))
</ins><span class="cx">             return wrapper;
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, AudioTrack, track);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, AudioTrack, &amp;track);
</ins><span class="cx"> 
</span><span class="cx">     case TrackBase::VideoTrack:
</span><del>-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toVideoTrack(track)))
</del><ins>+        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toVideoTrack(&amp;track)))
</ins><span class="cx">             return wrapper;
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, VideoTrack, track);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, VideoTrack, &amp;track);
</ins><span class="cx"> 
</span><span class="cx">     case TrackBase::TextTrack:
</span><del>-        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toTextTrack(track)))
</del><ins>+        if (auto* wrapper = getCachedWrapper(globalObject-&gt;world(), toTextTrack(&amp;track)))
</ins><span class="cx">             return wrapper;
</span><del>-        return CREATE_DOM_WRAPPER(globalObject, TextTrack, track);
</del><ins>+        return CREATE_DOM_WRAPPER(globalObject, TextTrack, &amp;track);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return jsNull();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTrackCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTrackCustom.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTrackCustom.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSTrackCustom.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> TrackBase* toTrack(JSC::JSValue);
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TrackBase*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TrackBase&amp;);
</ins><span class="cx"> 
</span><span class="cx"> inline void* root(TrackBase* track)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTrackEventCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTrackEventCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTrackEventCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSTrackEventCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     if (!track)
</span><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><del>-    return toJS(&amp;state, globalObject(), track);
</del><ins>+    return toJS(&amp;state, globalObject(), *track);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSUserMessageHandlersNamespaceCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> bool JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><span class="cx">     if (UserMessageHandler* handler = wrapped().handler(propertyNameToAtomicString(propertyName), globalObject()-&gt;world())) {
</span><del>-        slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS(exec, globalObject(), handler));
</del><ins>+        slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS(exec, globalObject(), *handler));
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSWorkerCustom.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">         return JSValue::encode(JSValue());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return JSValue::encode(asObject(toJS(exec, jsConstructor-&gt;globalObject(), worker.release())));
</del><ins>+    return JSValue::encode(asObject(toJS(exec, jsConstructor-&gt;globalObject(), *worker)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -104,16 +104,14 @@
</span><span class="cx">     thisObject-&gt;scriptExecutionContext()-&gt;postTask(JSGlobalObjectTask((JSDOMGlobalObject*)thisObject, task));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState* exec, JSDOMGlobalObject*, WorkerGlobalScope* workerGlobalScope)
</del><ins>+JSValue toJS(ExecState* exec, JSDOMGlobalObject*, WorkerGlobalScope&amp; workerGlobalScope)
</ins><span class="cx"> {
</span><span class="cx">     return toJS(exec, workerGlobalScope);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSValue toJS(ExecState*, WorkerGlobalScope* workerGlobalScope)
</del><ins>+JSValue toJS(ExecState*, WorkerGlobalScope&amp; workerGlobalScope)
</ins><span class="cx"> {
</span><del>-    if (!workerGlobalScope)
-        return jsNull();
-    WorkerScriptController* script = workerGlobalScope-&gt;script();
</del><ins>+    WorkerScriptController* script = workerGlobalScope.script();
</ins><span class="cx">     if (!script)
</span><span class="cx">         return jsNull();
</span><span class="cx">     JSWorkerGlobalScope* contextWrapper = script-&gt;workerGlobalScopeWrapper();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -70,8 +70,10 @@
</span><span class="cx"> 
</span><span class="cx">     // Returns a JSWorkerGlobalScope or jsNull()
</span><span class="cx">     // Always ignores the execState and passed globalObject, WorkerGlobalScope is itself a globalObject and will always use its own prototype chain.
</span><del>-    JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerGlobalScope*);
-    JSC::JSValue toJS(JSC::ExecState*, WorkerGlobalScope*);
</del><ins>+    JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WorkerGlobalScope&amp;);
+    inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WorkerGlobalScope* scope) { return scope ? toJS(exec, globalObject, *scope) : JSC::jsNull(); }
+    JSC::JSValue toJS(JSC::ExecState*, WorkerGlobalScope&amp;);
+    inline JSC::JSValue toJS(JSC::ExecState* exec, WorkerGlobalScope* scope) { return scope ? toJS(exec, *scope) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx">     JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSC::JSValue);
</span><span class="cx">     JSWorkerGlobalScope* toJSWorkerGlobalScope(JSC::JSValue);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSC::JSLockHolder lock(&amp;state);
</span><span class="cx"> 
</span><del>-    auto jsSource = source ? toJS(&amp;state, globalObject, source) : JSC::jsUndefined();
</del><ins>+    auto jsSource = source ? toJS(&amp;state, globalObject, *source) : JSC::jsUndefined();
</ins><span class="cx">     JSC::Strong&lt;JSC::Unknown&gt; protect(state.vm(), jsSource);
</span><span class="cx"> 
</span><span class="cx">     JSC::MarkedArgumentBuffer arguments;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -1462,13 +1462,14 @@
</span><span class="cx">         # Node and NodeList have custom inline implementations which thus cannot be exported.
</span><span class="cx">         # FIXME: The special case for Node and NodeList should probably be implemented via an IDL attribute.
</span><span class="cx">         if ($implType eq &quot;Node&quot; or $implType eq &quot;NodeList&quot;) {
</span><del>-            push(@headerContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n&quot;);
</del><ins>+            push(@headerContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType&amp;);\n&quot;);
</ins><span class="cx">         } else {
</span><del>-            push(@headerContent, $exportMacro.&quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n&quot;);
</del><ins>+            push(@headerContent, $exportMacro.&quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType&amp;);\n&quot;);
</ins><span class="cx">         }
</span><del>-        push(@headerContent, &quot;inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $implType&amp; impl) { return toJS(state, globalObject, &amp;impl); }\n&quot;);
</del><ins>+        push(@headerContent, &quot;inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $implType* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }\n&quot;);
</ins><span class="cx"> 
</span><del>-        push(@headerContent, &quot;JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n&quot;);
</del><ins>+        push(@headerContent, &quot;JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $implType&amp;);\n&quot;);
+        push(@headerContent, &quot;inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $implType* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }\n&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     push(@headerContent, &quot;\n&quot;);
</span><span class="lines">@@ -3389,37 +3390,28 @@
</span><span class="cx"> 
</span><span class="cx"> END
</span><span class="cx"> 
</span><del>-        push(@implContent, &quot;JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, $implType* impl)\n&quot;);
</del><ins>+        push(@implContent, &quot;JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, $implType&amp; impl)\n&quot;);
</ins><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><del>-push(@implContent, &lt;&lt;END);
-    if (!impl)
-        return jsNull();
-END
</del><span class="cx">         if ($svgPropertyType) {
</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, &amp;impl);\n&quot;);
</ins><span class="cx">         } else {
</span><del>-            push(@implContent, &quot;    return createNewWrapper&lt;$className&gt;(globalObject, impl);\n&quot;);
</del><ins>+            push(@implContent, &quot;    return createNewWrapper&lt;$className&gt;(globalObject, &amp;impl);\n&quot;);
</ins><span class="cx">         }
</span><span class="cx">         push(@implContent, &quot;}\n\n&quot;);
</span><span class="cx"> 
</span><del>-        push(@implContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, $implType* impl)\n&quot;);
</del><ins>+        push(@implContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, $implType&amp; impl)\n&quot;);
</ins><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><del>-        push(@implContent, &lt;&lt;END);
-    if (!impl)
-        return jsNull();
-END
-
</del><span class="cx">         if ($svgPropertyType) {
</span><del>-            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className, $implType&gt;(globalObject, impl))\n&quot;);
</del><ins>+            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className, $implType&gt;(globalObject, &amp;impl))\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;        return result;\n&quot;);
</span><span class="cx">         } else {
</span><del>-            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className&gt;(globalObject, impl))\n&quot;);
</del><ins>+            push(@implContent, &quot;    if (JSValue result = getExistingWrapper&lt;$className&gt;(globalObject, &amp;impl))\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;        return result;\n&quot;);
</span><span class="cx">         }
</span><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;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -3447,13 +3439,13 @@
</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-&gt;memoryCost());
</del><ins>+    globalObject-&gt;vm().heap.reportExtraMemoryAllocated(impl.memoryCost());
</ins><span class="cx"> END
</span><span class="cx"> 
</span><span class="cx">         if ($svgPropertyType) {
</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, &amp;impl);\n&quot;);
</ins><span class="cx">         } else {
</span><del>-            push(@implContent, &quot;    return createNewWrapper&lt;$className&gt;(globalObject, impl);\n&quot;);
</del><ins>+            push(@implContent, &quot;    return createNewWrapper&lt;$className&gt;(globalObject, &amp;impl);\n&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         push(@implContent, &quot;}\n\n&quot;);
</span><span class="lines">@@ -3914,8 +3906,8 @@
</span><span class="cx">     push(@headerContent, &quot;};\n\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     # toJS().
</span><del>-    push(@headerContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName*);\n&quot;);
-    push(@headerContent, &quot;inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $interfaceName&amp; impl) { return toJS(state, globalObject, &amp;impl); }\n\n&quot;);
</del><ins>+    push(@headerContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName&amp;);\n&quot;);
+    push(@headerContent, &quot;inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $interfaceName* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }\n\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     push(@headerContent, &quot;} // namespace WebCore\n&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -4092,11 +4084,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # toJS() implementation.
</span><del>-    push(@implContent, &quot;\nJSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName* impl)\n&quot;);
</del><ins>+    push(@implContent, &quot;\nJSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName&amp; impl)\n&quot;);
</ins><span class="cx">     push(@implContent, &quot;{\n&quot;);
</span><del>-    push(@implContent, &quot;    if (!impl || !static_cast&lt;${className}&amp;&gt;(*impl).callbackData())\n&quot;);
</del><ins>+    push(@implContent, &quot;    if (!static_cast&lt;${className}&amp;&gt;(impl).callbackData())\n&quot;);
</ins><span class="cx">     push(@implContent, &quot;        return jsNull();\n\n&quot;);
</span><del>-    push(@implContent, &quot;    return static_cast&lt;${className}&amp;&gt;(*impl).callbackData()-&gt;callback();\n\n&quot;);
</del><ins>+    push(@implContent, &quot;    return static_cast&lt;${className}&amp;&gt;(impl).callbackData()-&gt;callback();\n\n&quot;);
</ins><span class="cx">     push(@implContent, &quot;}\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     push(@implContent, &quot;\n}\n&quot;);
</span><span class="lines">@@ -4561,8 +4553,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     my $function = $signature-&gt;extendedAttributes-&gt;{&quot;NewObject&quot;} ? &quot;toJSNewlyCreated&quot; : &quot;toJS&quot;;
</span><del>-
-    return &quot;$function(state, $globalObject, WTF::getPtr($value))&quot;;
</del><ins>+    return &quot;$function(state, $globalObject, $value)&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub ceilingToPowerOf2
</span><span class="lines">@@ -5019,8 +5010,8 @@
</span><span class="cx">             return JSValue::encode(jsUndefined());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;${interfaceName}&gt; event = ${interfaceName}::createForBindings(eventType, eventInit);
-    return JSValue::encode(toJS(state, jsConstructor-&gt;globalObject(), event.get()));
</del><ins>+    Ref&lt;${interfaceName}&gt; event = ${interfaceName}::createForBindings(eventType, eventInit);
+    return JSValue::encode(toJS(state, jsConstructor-&gt;globalObject(), event));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool fill${interfaceName}Init(${interfaceName}Init&amp; eventInit, JSDictionary&amp; dictionary)
</span><span class="lines">@@ -5133,9 +5124,9 @@
</span><span class="cx">             }
</span><span class="cx">             my $constructorArg = join(&quot;, &quot;, @constructorArgList);
</span><span class="cx">             if ($generatingNamedConstructor) {
</span><del>-                push(@$outputArray, &quot;    RefPtr&lt;${interfaceName}&gt; object = ${interfaceName}::createForJSConstructor(${constructorArg});\n&quot;);
</del><ins>+                push(@$outputArray, &quot;    auto object = ${interfaceName}::createForJSConstructor(${constructorArg});\n&quot;);
</ins><span class="cx">             } else {
</span><del>-                push(@$outputArray, &quot;    RefPtr&lt;${interfaceName}&gt; object = ${interfaceName}::create(${constructorArg});\n&quot;);
</del><ins>+                push(@$outputArray, &quot;    auto object = ${interfaceName}::create(${constructorArg});\n&quot;);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             if ($interface-&gt;extendedAttributes-&gt;{&quot;ConstructorRaisesException&quot;}) {
</span><span class="lines">@@ -5150,7 +5141,7 @@
</span><span class="cx">                  push(@$outputArray, &quot;        return JSValue::encode(jsUndefined());\n&quot;);
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            push(@$outputArray, &quot;    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));\n&quot;);
</del><ins>+            push(@$outputArray, &quot;    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));\n&quot;);
</ins><span class="cx">             push(@$outputArray, &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 (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -250,22 +250,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDOMObject* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDOMObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDOMObject* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDOMObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -282,7 +278,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestActiveDOMObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestActiveDOMObject* JSTestActiveDOMObject::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -82,9 +82,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestActiveDOMObject&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestActiveDOMObject* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestActiveDOMObject* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> 
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(arrayParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), arrayParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, &quot;callbackWithArrayParam&quot;), returnedException);
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx"> 
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(listParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), listParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, &quot;callbackWithStringList&quot;), returnedException);
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><span class="cx">     args.append(jsNumber(longParam));
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(testNodeParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), testNodeParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     m_data-&gt;invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, &quot;callbackRequiresThisToPass&quot;), returnedException);
</span><span class="lines">@@ -217,12 +217,12 @@
</span><span class="cx">     return !returnedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallback* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallback&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl || !static_cast&lt;JSTestCallback&amp;&gt;(*impl).callbackData())
</del><ins>+    if (!static_cast&lt;JSTestCallback&amp;&gt;(impl).callbackData())
</ins><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><del>-    return static_cast&lt;JSTestCallback&amp;&gt;(*impl).callbackData()-&gt;callback();
</del><ins>+    return static_cast&lt;JSTestCallback&amp;&gt;(impl).callbackData()-&gt;callback();
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx">     JSCallbackDataStrong* m_data;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallback*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCallback&amp; impl) { return toJS(state, globalObject, &amp;impl); }
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallback&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCallback* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(arrayParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), arrayParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> 
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(listParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), listParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">     ExecState* state = m_data-&gt;globalObject()-&gt;globalExec();
</span><span class="cx">     MarkedArgumentBuffer args;
</span><span class="cx">     args.append(jsNumber(longParam));
</span><del>-    args.append(toJS(state, m_data-&gt;globalObject(), WTF::getPtr(testNodeParam)));
</del><ins>+    args.append(toJS(state, m_data-&gt;globalObject(), testNodeParam));
</ins><span class="cx"> 
</span><span class="cx">     NakedPtr&lt;Exception&gt; returnedException;
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="lines">@@ -187,12 +187,12 @@
</span><span class="cx">     return !returnedException;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallbackFunction* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallbackFunction&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl || !static_cast&lt;JSTestCallbackFunction&amp;&gt;(*impl).callbackData())
</del><ins>+    if (!static_cast&lt;JSTestCallbackFunction&amp;&gt;(impl).callbackData())
</ins><span class="cx">         return jsNull();
</span><span class="cx"> 
</span><del>-    return static_cast&lt;JSTestCallbackFunction&amp;&gt;(*impl).callbackData()-&gt;callback();
</del><ins>+    return static_cast&lt;JSTestCallbackFunction&amp;&gt;(impl).callbackData()-&gt;callback();
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx">     JSCallbackDataStrong* m_data;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallbackFunction*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCallbackFunction&amp; impl) { return toJS(state, globalObject, &amp;impl); }
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCallbackFunction&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCallbackFunction* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -176,22 +176,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -208,7 +204,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestClassWithJSBuiltinConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestClassWithJSBuiltinConstructor* JSTestClassWithJSBuiltinConstructor::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestClassWithJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -81,9 +81,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestClassWithJSBuiltinConstructor*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestClassWithJSBuiltinConstructor*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestClassWithJSBuiltinConstructor&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestClassWithJSBuiltinConstructor&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestClassWithJSBuiltinConstructor* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -166,22 +166,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -198,7 +194,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomConstructorWithNoInterfaceObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestCustomConstructorWithNoInterfaceObject* JSTestCustomConstructorWithNoInterfaceObject::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomConstructorWithNoInterfaceObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -78,9 +78,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomConstructorWithNoInterfaceObject*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestCustomConstructorWithNoInterfaceObject*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomConstructorWithNoInterfaceObject&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestCustomConstructorWithNoInterfaceObject&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomConstructorWithNoInterfaceObject* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> // Custom constructor
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL constructJSTestCustomConstructorWithNoInterfaceObject(JSC::ExecState*);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -223,22 +223,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNamedGetter* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNamedGetter&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNamedGetter* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNamedGetter&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -255,7 +251,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestCustomNamedGetter&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestCustomNamedGetter* JSTestCustomNamedGetter::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGetterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -85,9 +85,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomNamedGetter&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomNamedGetter* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestCustomNamedGetter* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx">             return JSValue::encode(jsUndefined());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;TestEventConstructor&gt; event = TestEventConstructor::createForBindings(eventType, eventInit);
-    return JSValue::encode(toJS(state, jsConstructor-&gt;globalObject(), event.get()));
</del><ins>+    Ref&lt;TestEventConstructor&gt; event = TestEventConstructor::createForBindings(eventType, eventInit);
+    return JSValue::encode(toJS(state, jsConstructor-&gt;globalObject(), event));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool fillTestEventConstructorInit(TestEventConstructorInit&amp; eventInit, JSDictionary&amp; dictionary)
</span><span class="lines">@@ -271,22 +271,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventConstructor* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestEventConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventConstructor* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestEventConstructor&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestEventConstructor&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -303,7 +299,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestEventConstructor* JSTestEventConstructor::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -81,9 +81,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventConstructor&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventConstructor* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventConstructor* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> bool fillTestEventConstructorInit(TestEventConstructorInit&amp;, JSDictionary&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">     auto index = convert&lt;uint32_t&gt;(*state, state-&gt;argument(0), NormalConversion);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.item(WTFMove(index))));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.item(WTFMove(index)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -230,22 +230,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTarget* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTarget&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestEventTarget&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventTarget&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTarget* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTarget&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestEventTarget&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestEventTarget&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -262,7 +258,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestEventTarget&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestEventTarget* JSTestEventTarget::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -74,9 +74,10 @@
</span><span class="cx">     bool nameGetter(JSC::ExecState*, JSC::PropertyName, JSC::JSValue&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventTarget&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventTarget* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestEventTarget* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -204,22 +204,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestException* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestException&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestException&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestException&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestException* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestException&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestException&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestException&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -236,7 +232,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestException&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestException* JSTestException::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -83,9 +83,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestException&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestException* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestException&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestException* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -163,22 +163,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerateIsReachable* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerateIsReachable&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerateIsReachable* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerateIsReachable&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -195,7 +191,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGenerateIsReachable&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestGenerateIsReachable* JSTestGenerateIsReachable::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGenerateIsReachableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,9 +79,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGenerateIsReachable&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGenerateIsReachable* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGenerateIsReachable* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -345,22 +345,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestGlobalObject&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestGlobalObject&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -377,7 +373,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestGlobalObject&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestGlobalObject* JSTestGlobalObject::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -85,9 +85,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGlobalObject&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGlobalObject* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestGlobalObject&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestGlobalObject* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> class JSTestGlobalObjectPrototype : public JSC::JSNonFinalObject {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -235,12 +235,12 @@
</span><span class="cx">     ScriptExecutionContext* context = castedThis-&gt;scriptExecutionContext();
</span><span class="cx">     if (UNLIKELY(!context))
</span><span class="cx">         return throwConstructorDocumentUnavailableError(*state, &quot;TestInterface&quot;);
</span><del>-    RefPtr&lt;TestInterface&gt; object = TestInterface::create(*context, str1, str2, ec);
</del><ins>+    auto object = TestInterface::create(*context, str1, str2, ec);
</ins><span class="cx">     if (UNLIKELY(ec)) {
</span><span class="cx">         setDOMException(state, ec);
</span><span class="cx">         return JSValue::encode(JSValue());
</span><span class="cx">     }
</span><del>-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; JSValue JSTestInterfaceConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span><span class="lines">@@ -490,7 +490,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestInterface&quot;, &quot;implementsNode&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.implementsNode()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.implementsNode());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -578,7 +578,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestInterface&quot;, &quot;supplementalNode&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalNode(impl)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -803,7 +803,7 @@
</span><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, 1, &quot;objArg&quot;, &quot;TestInterface&quot;, &quot;implementsMethod2&quot;, &quot;TestObj&quot;);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.implementsMethod2(*context, WTFMove(strArg), *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.implementsMethod2(*context, WTFMove(strArg), *objArg, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -869,7 +869,7 @@
</span><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, 1, &quot;objArg&quot;, &quot;TestInterface&quot;, &quot;supplementalMethod2&quot;, &quot;TestObj&quot;);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(WebCore::TestSupplemental::supplementalMethod2(impl, *context, WTFMove(strArg), *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), WebCore::TestSupplemental::supplementalMethod2(impl, *context, WTFMove(strArg), *objArg, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -915,18 +915,14 @@
</span><span class="cx">     uncacheWrapper(world, &amp;jsTestInterface-&gt;wrapped(), jsTestInterface);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterface* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterface&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestInterface&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestInterface&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterface* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterface&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestInterface&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestInterface&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx">     // If you hit this failure the interface definition has the ImplementationLacksVTable
</span><span class="lines">@@ -935,7 +931,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestInterface&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestInterface* JSTestInterface::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -106,9 +106,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestInterface&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
</del><ins>+WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestInterface* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestInterface&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestInterface* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -188,22 +188,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQueryListListener* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQueryListListener&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQueryListListener* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQueryListListener&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -220,7 +216,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestMediaQueryListListener&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestMediaQueryListListener* JSTestMediaQueryListListener::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,9 +79,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestMediaQueryListListener&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestMediaQueryListListener* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestMediaQueryListListener* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -95,12 +95,12 @@
</span><span class="cx">     auto str3 = state-&gt;argument(2).isUndefined() ? String() : state-&gt;uncheckedArgument(2).toWTFString(state);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    RefPtr&lt;TestNamedConstructor&gt; object = TestNamedConstructor::createForJSConstructor(*castedThis-&gt;document(), str1, str2, str3, ec);
</del><ins>+    auto object = TestNamedConstructor::createForJSConstructor(*castedThis-&gt;document(), str1, str2, str3, ec);
</ins><span class="cx">     if (UNLIKELY(ec)) {
</span><span class="cx">         setDOMException(state, ec);
</span><span class="cx">         return JSValue::encode(JSValue());
</span><span class="cx">     }
</span><del>-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; JSValue JSTestNamedConstructorNamedConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span><span class="lines">@@ -211,22 +211,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedConstructor* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestNamedConstructor&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNamedConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedConstructor* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedConstructor&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestNamedConstructor&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestNamedConstructor&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -243,7 +239,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNamedConstructor&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestNamedConstructor* JSTestNamedConstructor::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -80,9 +80,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNamedConstructor&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNamedConstructor* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNamedConstructor* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,8 +79,8 @@
</span><span class="cx"> template&lt;&gt; EncodedJSValue JSC_HOST_CALL JSTestNodeConstructor::construct(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestNodeConstructor*&gt;(state-&gt;callee());
</span><del>-    RefPtr&lt;TestNode&gt; object = TestNode::create();
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestNode::create();
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; JSValue JSTestNodeConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -472,22 +472,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeterministic* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeterministic&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestNondeterministic&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNondeterministic&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeterministic* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeterministic&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestNondeterministic&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestNondeterministic&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -504,7 +500,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestNondeterministic&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestNondeterministic* JSTestNondeterministic::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,9 +79,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNondeterministic&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNondeterministic* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestNondeterministic* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -963,8 +963,8 @@
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;testCallbackFunction&quot;, &quot;TestObj&quot;, nullptr);
</span><span class="cx">     RefPtr&lt;TestCallbackFunction&gt; testCallbackFunction = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><del>-    RefPtr&lt;TestObj&gt; object = TestObj::create(*testCallback, *testCallbackFunction);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestObj::create(*testCallback, *testCallbackFunction);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; JSValue JSTestObjConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span><span class="lines">@@ -1361,7 +1361,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;readOnlyTestObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.readOnlyTestObjAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1590,7 +1590,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;testObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.testObjAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.testObjAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1605,7 +1605,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;testNullableObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.testNullableObjAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.testNullableObjAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1620,7 +1620,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.lenientTestObjAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.lenientTestObjAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1665,7 +1665,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;XMLObjAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.xmlObjAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.xmlObjAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1847,7 +1847,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;typedArrayAttr&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.typedArrayAttr()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.typedArrayAttr());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1958,7 +1958,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;strictTypeCheckingAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.strictTypeCheckingAttribute()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.strictTypeCheckingAttribute());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2047,7 +2047,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(*context)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAttribute(*context));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2063,7 +2063,7 @@
</span><span class="cx">     }
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(*state, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -2083,7 +2083,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(*context, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -2102,7 +2102,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2121,7 +2121,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
</ins><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -2140,7 +2140,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2155,7 +2155,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;withScriptArgumentsAndCallStackAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2317,7 +2317,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;contentDocument&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
</del><ins>+    return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis-&gt;globalObject(), impl.contentDocument()) : jsNull());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -2331,7 +2331,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;mutablePoint&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(SVGStaticPropertyTearOff&lt;TestObj, SVGPoint&gt;::create(impl, impl.mutablePoint(), &amp;TestObj::updateMutablePoint)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), SVGStaticPropertyTearOff&lt;TestObj, SVGPoint&gt;::create(impl, impl.mutablePoint(), &amp;TestObj::updateMutablePoint));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2346,7 +2346,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;immutablePoint&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePoint())));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePoint()));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2588,7 +2588,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;putForwardsAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.putForwardsAttribute()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.putForwardsAttribute());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2603,7 +2603,7 @@
</span><span class="cx">         return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;putForwardsNullableAttribute&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.putForwardsNullableAttribute()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.putForwardsNullableAttribute());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4030,7 +4030,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;objMethod&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.objMethod()));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.objMethod());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4053,7 +4053,7 @@
</span><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;argument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, 2, &quot;objArg&quot;, &quot;TestObj&quot;, &quot;objMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.objMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.objMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4258,7 +4258,7 @@
</span><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;argument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, 1, &quot;objArg&quot;, &quot;TestObj&quot;, &quot;methodThatRequiresAllArgsAndThrows&quot;, &quot;TestObj&quot;);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(WTFMove(strArg), *objArg, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.methodThatRequiresAllArgsAndThrows(WTFMove(strArg), *objArg, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -4412,7 +4412,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;withScriptStateObj&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptStateObj(*state)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptStateObj(*state));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -4441,7 +4441,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptStateObjException(*state, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptStateObjException(*state, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="lines">@@ -4491,7 +4491,7 @@
</span><span class="cx">     auto* context = jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject())-&gt;scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(*state, *context, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateObjException(*state, *context, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="lines">@@ -4510,7 +4510,7 @@
</span><span class="cx">     auto* context = jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject())-&gt;scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(*state, *context)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpaces(*state, *context));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5602,7 +5602,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!values))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;values&quot;, &quot;TestObj&quot;, &quot;domStringListFunction&quot;, &quot;DOMStringList&quot;);
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.domStringListFunction(*values, ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.domStringListFunction(*values, ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5661,7 +5661,7 @@
</span><span class="cx">     auto elementId = AtomicString(state-&gt;argument(0).toString(state)-&gt;toExistingAtomicString(state));
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.getElementById(WTFMove(elementId))));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.getElementById(WTFMove(elementId)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5676,7 +5676,7 @@
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     if (!shouldAllowAccessToNode(state, impl.getSVGDocument(ec)))
</span><span class="cx">         return JSValue::encode(jsNull());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.getSVGDocument(ec)));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.getSVGDocument(ec));
</ins><span class="cx"> 
</span><span class="cx">     setDOMException(state, ec);
</span><span class="cx">     return JSValue::encode(result);
</span><span class="lines">@@ -5756,7 +5756,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;mutablePointFunction&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.mutablePointFunction())));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.mutablePointFunction()));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5768,7 +5768,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;immutablePointFunction&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePointFunction())));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePointFunction()));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -6207,22 +6207,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestObj&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestObj&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestObj&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestObj&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -6239,7 +6235,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestObj&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestObj* JSTestObj::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -97,9 +97,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestObj&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestObj* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestObj&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestObj* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -75,8 +75,8 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!arrayBuffer))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;arrayBuffer&quot;, &quot;TestOverloadedConstructors&quot;, nullptr, &quot;ArrayBuffer&quot;);
</span><del>-    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(*arrayBuffer);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestOverloadedConstructors::create(*arrayBuffer);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline EncodedJSValue constructJSTestOverloadedConstructors2(ExecState* state)
</span><span class="lines">@@ -89,8 +89,8 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!arrayBufferView))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;arrayBufferView&quot;, &quot;TestOverloadedConstructors&quot;, nullptr, &quot;ArrayBufferView&quot;);
</span><del>-    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(*arrayBufferView);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestOverloadedConstructors::create(*arrayBufferView);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline EncodedJSValue constructJSTestOverloadedConstructors3(ExecState* state)
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx">     auto blob = JSBlob::toWrapped(state-&gt;argument(0));
</span><span class="cx">     if (UNLIKELY(!blob))
</span><span class="cx">         return throwArgumentTypeError(*state, 0, &quot;blob&quot;, &quot;TestOverloadedConstructors&quot;, nullptr, &quot;Blob&quot;);
</span><del>-    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(*blob);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestOverloadedConstructors::create(*blob);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline EncodedJSValue constructJSTestOverloadedConstructors4(ExecState* state)
</span><span class="lines">@@ -113,8 +113,8 @@
</span><span class="cx">     auto string = state-&gt;argument(0).toWTFString(state);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(string);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestOverloadedConstructors::create(string);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline EncodedJSValue constructJSTestOverloadedConstructors5(ExecState* state)
</span><span class="lines">@@ -123,8 +123,8 @@
</span><span class="cx">     Vector&lt;int32_t&gt; longArgs = toNativeArguments&lt;int32_t&gt;(state, 0);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(longArgs);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestOverloadedConstructors::create(longArgs);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::construct(ExecState* state)
</span><span class="lines">@@ -247,22 +247,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverloadedConstructors* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverloadedConstructors&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverloadedConstructors* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverloadedConstructors&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -279,7 +275,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverloadedConstructors&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestOverloadedConstructors* JSTestOverloadedConstructors::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,9 +79,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverloadedConstructors&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverloadedConstructors* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverloadedConstructors* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">     auto name = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;test&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(impl.namedItem(WTFMove(name))));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.namedItem(WTFMove(name)));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -230,22 +230,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverrideBuiltins* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverrideBuiltins&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverrideBuiltins* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverrideBuiltins&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -262,7 +258,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestOverrideBuiltins&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestOverrideBuiltins* JSTestOverrideBuiltins::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -86,9 +86,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverrideBuiltins*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverrideBuiltins&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestOverrideBuiltins*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverrideBuiltins&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverrideBuiltins* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestOverrideBuiltins&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestOverrideBuiltins* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -305,22 +305,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -337,7 +333,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestSerializedScriptValueInterface&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -85,9 +85,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -135,8 +135,8 @@
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;testCallback&quot;, &quot;TestTypedefs&quot;, nullptr);
</span><span class="cx">     RefPtr&lt;TestCallback&gt; testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><del>-    RefPtr&lt;TestTypedefs&gt; object = TestTypedefs::create(hello, *testCallback);
-    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object.get())));
</del><ins>+    auto object = TestTypedefs::create(hello, *testCallback);
+    return JSValue::encode(asObject(toJS(state, castedThis-&gt;globalObject(), object)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; JSValue JSTestTypedefsConstructor::prototypeForStructure(JSC::VM&amp; vm, const JSDOMGlobalObject&amp; globalObject)
</span><span class="lines">@@ -562,7 +562,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestTypedefs&quot;, &quot;immutablePointFunction&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-    JSValue result = toJS(state, castedThis-&gt;globalObject(), WTF::getPtr(SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePointFunction())));
</del><ins>+    JSValue result = toJS(state, castedThis-&gt;globalObject(), SVGPropertyTearOff&lt;SVGPoint&gt;::create(impl.immutablePointFunction()));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -660,22 +660,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSTestTypedefs&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestTypedefs&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSTestTypedefs&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSTestTypedefs&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -692,7 +688,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSTestTypedefs&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TestTypedefs* JSTestTypedefs::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -82,9 +82,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestTypedefs* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -204,22 +204,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSattribute&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSattribute&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSattribute&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSattribute&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(BINDING_INTEGRITY)
</span><del>-    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(impl));
</del><ins>+    void* actualVTablePointer = *(reinterpret_cast&lt;void**&gt;(&amp;impl));
</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">@@ -236,7 +232,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSattribute&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> attribute* JSattribute::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -83,9 +83,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, attribute&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, attribute* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, attribute&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, attribute* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSreadonlycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -154,18 +154,14 @@
</span><span class="cx">     uncacheWrapper(world, &amp;jsreadonly-&gt;wrapped(), jsreadonly);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly* impl)
</del><ins>+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    return createNewWrapper&lt;JSreadonly&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSreadonly&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly* impl)
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly&amp; impl)
</ins><span class="cx"> {
</span><del>-    if (!impl)
-        return jsNull();
-    if (JSValue result = getExistingWrapper&lt;JSreadonly&gt;(globalObject, impl))
</del><ins>+    if (JSValue result = getExistingWrapper&lt;JSreadonly&gt;(globalObject, &amp;impl))
</ins><span class="cx">         return result;
</span><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx">     // If you hit this failure the interface definition has the ImplementationLacksVTable
</span><span class="lines">@@ -174,7 +170,7 @@
</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&gt;(globalObject, impl);
</del><ins>+    return createNewWrapper&lt;JSreadonly&gt;(globalObject, &amp;impl);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> readonly* JSreadonly::toWrapped(JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSreadonlyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -79,9 +79,10 @@
</span><span class="cx">     return wrappableObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, readonly&amp; impl) { return toJS(state, globalObject, &amp;impl); }
-JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
</del><ins>+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly&amp;);
+inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, readonly* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, readonly&amp;);
+inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, readonly* impl) { return impl ? toJSNewlyCreated(state, globalObject, *impl) : JSC::jsNull(); }
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (200774 => 200775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-05-12 15:47:45 UTC (rev 200774)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-05-12 16:07:13 UTC (rev 200775)
</span><span class="lines">@@ -3896,7 +3896,7 @@
</span><span class="cx"> 
</span><span class="cx"> static JSC::JSValue controllerJSValue(JSC::ExecState&amp; exec, JSDOMGlobalObject&amp; globalObject, HTMLMediaElement&amp; media)
</span><span class="cx"> {
</span><del>-    auto mediaJSWrapper = toJS(&amp;exec, &amp;globalObject, &amp;media);
</del><ins>+    auto mediaJSWrapper = toJS(&amp;exec, &amp;globalObject, media);
</ins><span class="cx">     
</span><span class="cx">     // Retrieve the controller through the JS object graph
</span><span class="cx">     JSC::JSObject* mediaJSWrapperObject = JSC::jsDynamicCast&lt;JSC::JSObject*&gt;(mediaJSWrapper);
</span><span class="lines">@@ -6476,8 +6476,8 @@
</span><span class="cx">     if (!m_mediaControlsHost)
</span><span class="cx">         m_mediaControlsHost = MediaControlsHost::create(this);
</span><span class="cx"> 
</span><del>-    auto mediaJSWrapper = toJS(exec, globalObject, this);
-    auto mediaControlsHostJSWrapper = toJS(exec, globalObject, m_mediaControlsHost.get());
</del><ins>+    auto mediaJSWrapper = toJS(exec, globalObject, *this);
+    auto mediaControlsHostJSWrapper = toJS(exec, globalObject, m_mediaControlsHost);
</ins><span class="cx">     
</span><span class="cx">     JSC::MarkedArgumentBuffer argList;
</span><span class="cx">     argList.append(toJS(exec, globalObject, root));
</span></span></pre>
</div>
</div>

</body>
</html>