<!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>[206953] 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/206953">206953</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-08 06:09:30 -0700 (Sat, 08 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Refactor binding generated casted-this checks
https://bugs.webkit.org/show_bug.cgi?id=162677
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-08
Reviewed by Darin Adler.
No change of behavior.
Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks.
The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue.
In the future, the second function should only take references.
Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value.
This allows implementing the first function using the second function as template parameter.
Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access.
* bindings/js/JSDOMBinding.h:
(WebCore::BindingCaller::attribute):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSattribute.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</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="#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="#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="#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="#trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodeh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h</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="#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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/ChangeLog        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2016-10-08 Youenn Fablet <youenn@apple.com>
+
+ Refactor binding generated casted-this checks
+ https://bugs.webkit.org/show_bug.cgi?id=162677
+
+ Reviewed by Darin Adler.
+
+ No change of behavior.
+
+ Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks.
+
+ The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue.
+ In the future, the second function should only take references.
+
+ Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value.
+ This allows implementing the first function using the second function as template parameter.
+
+ Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access.
+
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::BindingCaller::attribute):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader):
+ (GenerateImplementation):
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+ * bindings/scripts/test/JS/JSTestEventConstructor.h:
+ * bindings/scripts/test/JS/JSTestException.cpp:
+ * bindings/scripts/test/JS/JSTestException.h:
+ * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ * bindings/scripts/test/JS/JSTestInterface.h:
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
+ * bindings/scripts/test/JS/JSTestNode.cpp:
+ * bindings/scripts/test/JS/JSTestNode.h:
+ * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+ * bindings/scripts/test/JS/JSTestNondeterministic.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ * bindings/scripts/test/JS/JSTestObj.h:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ * bindings/scripts/test/JS/JSTestTypedefs.h:
+ * bindings/scripts/test/JS/JSattribute.cpp:
+ * bindings/scripts/test/JS/JSattribute.h:
+
</ins><span class="cx"> 2016-10-08 Enrique Ocaña González <eocanha@igalia.com>
</span><span class="cx">
</span><span class="cx"> Missing include in MediaDescription
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -382,6 +382,28 @@
</span><span class="cx">
</span><span class="cx"> template<typename VariadicHelper> typename VariadicHelper::Result toArguments(JSC::ExecState&, size_t startIndex = 0);
</span><span class="cx">
</span><ins>+enum class CastedThisErrorBehavior { Throw, ReturnEarly };
+
+template<typename JSClass>
+struct BindingCaller {
+ using AttributeGetterFunction = JSC::JSValue(JSC::ExecState*, JSClass*, JSC::ThrowScope&);
+
+ template<AttributeGetterFunction getter, CastedThisErrorBehavior shouldThrow = CastedThisErrorBehavior::Throw>
+ static JSC::EncodedJSValue attribute(JSC::ExecState* state, JSC::EncodedJSValue thisValue, const char* attributeName)
+ {
+ ASSERT(state);
+ auto throwScope = DECLARE_THROW_SCOPE(state->vm());
+ auto* thisObject = JSClass::castForAttribute(state, thisValue);
+ if (UNLIKELY(!thisObject)) {
+ ASSERT(JSClass::info());
+ return shouldThrow == CastedThisErrorBehavior::Throw ?
+ throwGetterTypeError(*state, throwScope, JSClass::info()->className, attributeName) : JSC::JSValue::encode(JSC::jsUndefined());
+ }
+ // FIXME: We should refactor the binding generated code to use references for state and thisObject.
+ return JSC::JSValue::encode(getter(state, thisObject, throwScope));
+ }
+};
+
</ins><span class="cx"> // Inline functions and template definitions.
</span><span class="cx">
</span><span class="cx"> inline JSC::Structure* DOMConstructorObject::createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -1410,6 +1410,8 @@
</span><span class="cx">
</span><span class="cx"> # Attribute and function enums
</span><span class="cx"> if ($numAttributes > 0) {
</span><ins>+ push(@headerContent, " static ${className}* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);\n");
+
</ins><span class="cx"> foreach (@{$interface->attributes}) {
</span><span class="cx"> my $attribute = $_;
</span><span class="cx"> $numCustomAttributes++ if HasCustomGetter($attribute->signature->extendedAttributes);
</span><span class="lines">@@ -2403,12 +2405,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@implContent, $endAppleCopyright) if $inAppleCopyright;
</span><del>-
</del><span class="cx"> push(@implContent, "\n");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($numAttributes > 0 || NeedsConstructorProperty($interface)) {
</span><span class="cx"> push(@implContent, "// Attributes\n\n");
</span><ins>+
</ins><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><span class="cx"> next if $attribute->signature->extendedAttributes->{ForwardDeclareInHeader};
</span><span class="cx"> next if IsJSBuiltin($interface, $attribute);
</span><span class="lines">@@ -2857,6 +2859,26 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><ins>+
+ if ($numAttributes > 0) {
+ my $castingFunction = $interface->extendedAttributes->{"CustomProxyToJSObject"} ? "to${className}" : GetCastingHelperForThisObject($interface);
+ # FIXME: Remove ImplicitThis keyword as it is no longer defined by WebIDL spec and is only used in DOMWindow.
+ if ($interface->extendedAttributes->{"ImplicitThis"}) {
+ push(@implContent, "inline ${className}* ${className}::castForAttribute(ExecState* state, EncodedJSValue thisValue)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " JSValue decodedThisValue = JSValue::decode(thisValue);\n");
+ push(@implContent, " if (decodedThisValue.isUndefinedOrNull())\n");
+ push(@implContent, " decodedThisValue = state->thisValue().toThis(state, NotStrictMode);\n");
+ push(@implContent, " return $castingFunction(decodedThisValue);\n");
+ push(@implContent, "}\n\n");
+ } else {
+ push(@implContent, "inline ${className}* ${className}::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " return $castingFunction(JSValue::decode(thisValue));\n");
+ push(@implContent, "}\n\n");
+ }
+ }
+
</ins><span class="cx"> $numAttributes = $numAttributes + 1 if NeedsConstructorProperty($interface);
</span><span class="cx"> if ($numAttributes > 0) {
</span><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><span class="lines">@@ -2874,31 +2896,31 @@
</span><span class="cx"> my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
</span><span class="cx"> push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
</span><span class="cx">
</span><del>- push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
- push(@implContent, "{\n");
</del><ins>+ if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
+ my $templateParameters = "${getFunctionName}Getter";
+ $templateParameters .= ", CastedThisErrorBehavior::ReturnEarly" if ($attribute->signature->extendedAttributes->{LenientThis});
+ push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*, ${className}*, ThrowScope& throwScope);\n\n");
</ins><span class="cx">
</span><del>- push(@implContent, " VM& vm = state->vm();\n");
- push(@implContent, " auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
- push(@implContent, " UNUSED_PARAM(throwScope);\n");
- push(@implContent, " UNUSED_PARAM(thisValue);\n");
</del><ins>+ push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue thisValue, PropertyName)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " return BindingCaller<${className}>::attribute<${templateParameters}>(state, thisValue, \"$name\");\n");
+ push(@implContent, "}\n\n");
</ins><span class="cx">
</span><del>- if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
- push(@implContent, " JSValue decodedThisValue = JSValue::decode(thisValue);\n");
- my $castingFunction = $interface->extendedAttributes->{CustomProxyToJSObject} ? "to${className}" : GetCastingHelperForThisObject($interface);
- # http://heycam.github.io/webidl/#ImplicitThis
- if ($interface->extendedAttributes->{ImplicitThis}) {
- push(@implContent, " auto* castedThis = decodedThisValue.isUndefinedOrNull() ? $castingFunction(state->thisValue().toThis(state, NotStrictMode)) : $castingFunction(decodedThisValue);\n");
- } else {
- push(@implContent, " auto* castedThis = $castingFunction(decodedThisValue);\n");
- }
- push(@implContent, " if (UNLIKELY(!castedThis)) {\n");
- if ($attribute->signature->extendedAttributes->{LenientThis}) {
- push(@implContent, " return JSValue::encode(jsUndefined());\n");
- } else {
- push(@implContent, " return throwGetterTypeError(*state, throwScope, \"$visibleInterfaceName\", \"$name\");\n");
- }
- push(@implContent, " }\n");
</del><ins>+ push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state, ${className}* thisObject, ThrowScope& throwScope)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " UNUSED_PARAM(throwScope);\n");
+ } else {
+ push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState*);\n\n");
+
+ push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* state, EncodedJSValue, PropertyName)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " return JSValue::encode(${getFunctionName}Getter(state));\n");
+ push(@implContent, "}\n\n");
+
+ push(@implContent, "static inline JSValue ${getFunctionName}Getter(ExecState* state)\n");
+ push(@implContent, "{\n");
</ins><span class="cx"> }
</span><ins>+ push(@implContent, " UNUSED_PARAM(state);\n");
</ins><span class="cx">
</span><span class="cx"> my @arguments = ();
</span><span class="cx"> if ($getterMayThrowLegacyException && !HasCustomGetter($attribute->signature->extendedAttributes)) {
</span><span class="lines">@@ -2916,11 +2938,11 @@
</span><span class="cx"> AddToImplIncludes("Frame.h");
</span><span class="cx"> AddToImplIncludes("Settings.h");
</span><span class="cx"> my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{EnabledBySetting}) . "Enabled";
</span><del>- push(@implContent, " if (UNLIKELY(!castedThis->wrapped().frame()))\n");
- push(@implContent, " return JSValue::encode(jsUndefined());\n");
- push(@implContent, " Settings& settings = castedThis->wrapped().frame()->settings();\n");
</del><ins>+ push(@implContent, " if (UNLIKELY(!thisObject->wrapped().frame()))\n");
+ push(@implContent, " return jsUndefined();\n");
+ push(@implContent, " Settings& settings = thisObject->wrapped().frame()->settings();\n");
</ins><span class="cx"> push(@implContent, " if (!settings.$enable_function())\n");
</span><del>- push(@implContent, " return JSValue::encode(jsUndefined());\n");
</del><ins>+ push(@implContent, " return jsUndefined();\n");
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2930,11 +2952,11 @@
</span><span class="cx"> !$attribute->signature->extendedAttributes->{DoNotCheckSecurity} &&
</span><span class="cx"> !$attribute->signature->extendedAttributes->{DoNotCheckSecurityOnGetter}) {
</span><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><del>- push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, thisObject->wrapped(), ThrowSecurityError))\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))\n");
</ins><span class="cx"> }
</span><del>- push(@implContent, " return JSValue::encode(jsUndefined());\n");
</del><ins>+ push(@implContent, " return jsUndefined();\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($attribute->signature->extendedAttributes->{Nondeterministic}) {
</span><span class="lines">@@ -2951,11 +2973,11 @@
</span><span class="cx"> my $exceptionCode = $getterMayThrowLegacyExceptionWithMessage ? "ec.code" : ($getterMayThrowLegacyException ? "ec" : "0");
</span><span class="cx"> push(@implContent, " static NeverDestroyed<const AtomicString> bindingName(\"$interfaceName.$name\", AtomicString::ConstructFromLiteral);\n");
</span><span class="cx"> push(@implContent, " if (cursor.isCapturing()) {\n");
</span><del>- push(@implContent, " $memoizedType memoizedResult = castedThis->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
</del><ins>+ push(@implContent, " $memoizedType memoizedResult = thisObject->wrapped().$implGetterFunctionName(" . join(", ", @arguments) . ");\n");
</ins><span class="cx"> push(@implContent, " cursor.appendInput<MemoizedDOMResult<$memoizedType>>(bindingName.get().string(), memoizedResult, $exceptionCode);\n");
</span><del>- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
</ins><span class="cx"> push(@implContent, " setDOMException(state, throwScope, ec);\n") if $getterMayThrowLegacyException;
</span><del>- push(@implContent, " return JSValue::encode(result);\n");
</del><ins>+ push(@implContent, " return result;\n");
</ins><span class="cx"> push(@implContent, " }\n");
</span><span class="cx"> push(@implContent, "\n");
</span><span class="cx"> push(@implContent, " if (cursor.isReplaying()) {\n");
</span><span class="lines">@@ -2963,9 +2985,9 @@
</span><span class="cx"> push(@implContent, " MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();\n");
</span><span class="cx"> push(@implContent, " if (input && input->convertTo<$memoizedType>(memoizedResult)) {\n");
</span><span class="cx"> # FIXME: the generated code should report an error if an input cannot be fetched or converted.
</span><del>- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "memoizedResult", "thisObject") . ";\n");
</ins><span class="cx"> push(@implContent, " setDOMException(state, throwScope, input->exceptionCode());\n") if $getterMayThrowLegacyException;
</span><del>- push(@implContent, " return JSValue::encode(result);\n");
</del><ins>+ push(@implContent, " return result;\n");
</ins><span class="cx"> push(@implContent, " }\n");
</span><span class="cx"> push(@implContent, " }\n");
</span><span class="cx"> push(@implContent, "#endif\n");
</span><span class="lines">@@ -2972,11 +2994,11 @@
</span><span class="cx"> } # attribute Nondeterministic
</span><span class="cx">
</span><span class="cx"> if (HasCustomGetter($attribute->signature->extendedAttributes)) {
</span><del>- push(@implContent, " return JSValue::encode(castedThis->$implGetterFunctionName(*state));\n");
</del><ins>+ push(@implContent, " return thisObject->$implGetterFunctionName(*state);\n");
</ins><span class="cx"> } elsif ($attribute->signature->extendedAttributes->{CheckSecurityForNode}) {
</span><span class="cx"> $implIncludes{"JSDOMBinding.h"} = 1;
</span><del>- push(@implContent, " auto& impl = castedThis->wrapped();\n");
- push(@implContent, " return JSValue::encode(shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
</del><ins>+ push(@implContent, " auto& impl = thisObject->wrapped();\n");
+ push(@implContent, " return shouldAllowAccessToNode(state, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName()", "thisObject") . " : jsNull();\n");
</ins><span class="cx"> } elsif ($type eq "EventHandler") {
</span><span class="cx"> $implIncludes{"EventNames.h"} = 1;
</span><span class="cx"> my $getter = $attribute->signature->extendedAttributes->{WindowEventHandler} ? "windowEventHandlerAttribute"
</span><span class="lines">@@ -2983,20 +3005,19 @@
</span><span class="cx"> : $attribute->signature->extendedAttributes->{DocumentEventHandler} ? "documentEventHandlerAttribute"
</span><span class="cx"> : "eventHandlerAttribute";
</span><span class="cx"> my $eventName = EventHandlerAttributeEventName($attribute);
</span><del>- push(@implContent, " UNUSED_PARAM(state);\n");
- push(@implContent, " return JSValue::encode($getter(castedThis->wrapped(), $eventName));\n");
</del><ins>+ push(@implContent, " return $getter(thisObject->wrapped(), $eventName);\n");
</ins><span class="cx"> } elsif ($attribute->signature->type =~ /Constructor$/) {
</span><span class="cx"> my $constructorType = $attribute->signature->type;
</span><span class="cx"> $constructorType =~ s/Constructor$//;
</span><del>- # When Constructor attribute is used by DOMWindow.idl, it's correct to pass castedThis as the global object
- # When JSDOMWrappers have a back-pointer to the globalObject we can pass castedThis->globalObject()
</del><ins>+ # When Constructor attribute is used by DOMWindow.idl, it's correct to pass thisObject as the global object
+ # When JSDOMWrappers have a back-pointer to the globalObject we can pass thisObject->globalObject()
</ins><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><span class="cx"> my $named = ($constructorType =~ /Named$/) ? "Named" : "";
</span><span class="cx"> $constructorType =~ s/Named$//;
</span><del>- push(@implContent, " return JSValue::encode(JS" . $constructorType . "::get${named}Constructor(state->vm(), castedThis));\n");
</del><ins>+ push(@implContent, " return JS" . $constructorType . "::get${named}Constructor(state->vm(), thisObject);\n");
</ins><span class="cx"> } else {
</span><span class="cx"> AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{Conditional});
</span><del>- push(@implContent, " return JSValue::encode(JS" . $constructorType . "::getConstructor(state->vm(), castedThis->globalObject()));\n");
</del><ins>+ push(@implContent, " return JS" . $constructorType . "::getConstructor(state->vm(), thisObject->globalObject());\n");
</ins><span class="cx"> }
</span><span class="cx"> } elsif (!$attribute->signature->extendedAttributes->{GetterMayThrowLegacyException} && !$attribute->signature->extendedAttributes->{GetterMayThrowLegacyExceptionWithMessage}) {
</span><span class="cx"> my $cacheIndex = 0;
</span><span class="lines">@@ -3003,20 +3024,20 @@
</span><span class="cx"> if ($attribute->signature->extendedAttributes->{CachedAttribute}) {
</span><span class="cx"> $cacheIndex = $currentCachedAttribute;
</span><span class="cx"> $currentCachedAttribute++;
</span><del>- push(@implContent, " if (JSValue cachedValue = castedThis->m_" . $attribute->signature->name . ".get())\n");
- push(@implContent, " return JSValue::encode(cachedValue);\n");
</del><ins>+ push(@implContent, " if (JSValue cachedValue = thisObject->m_" . $attribute->signature->name . ".get())\n");
+ push(@implContent, " return cachedValue;\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "JSValue::encode(jsUndefined())");
</del><ins>+ my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "jsUndefined()");
</ins><span class="cx">
</span><span class="cx"> if ($svgListPropertyType) {
</span><del>- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "castedThis->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "thisObject->wrapped().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
</ins><span class="cx"> } elsif ($svgPropertyOrListPropertyType) {
</span><del>- push(@implContent, " $svgPropertyOrListPropertyType& impl = castedThis->wrapped().propertyReference();\n");
</del><ins>+ push(@implContent, " $svgPropertyOrListPropertyType& impl = thisObject->wrapped().propertyReference();\n");
</ins><span class="cx"> if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
</span><del>- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl", "thisObject") . ";\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "thisObject") . ";\n");
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -3033,40 +3054,38 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unshift(@arguments, @callWithArgs);
</span><del>- my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
- push(@implContent, " auto& impl = castedThis->wrapped();\n") if !$attribute->isStatic;
</del><ins>+ my $jsType = NativeToJSValue($attribute->signature, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "thisObject");
+ push(@implContent, " auto& impl = thisObject->wrapped();\n") if !$attribute->isStatic;
</ins><span class="cx"> if ($codeGenerator->IsSVGAnimatedType($type)) {
</span><span class="cx"> push(@implContent, " auto obj = $jsType;\n");
</span><del>- push(@implContent, " JSValue result = toJS(state, castedThis->globalObject(), obj.get());\n");
</del><ins>+ push(@implContent, " JSValue result = toJS(state, thisObject->globalObject(), obj.get());\n");
</ins><span class="cx"> } else {
</span><span class="cx"> push(@implContent, " JSValue result = $jsType;\n");
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- push(@implContent, " castedThis->m_" . $attribute->signature->name . ".set(state->vm(), castedThis, result);\n") if $attribute->signature->extendedAttributes->{CachedAttribute};
- push(@implContent, " return JSValue::encode(result);\n");
</del><ins>+ push(@implContent, " thisObject->m_" . $attribute->signature->name . ".set(state->vm(), thisObject, result);\n") if $attribute->signature->extendedAttributes->{CachedAttribute};
+ push(@implContent, " return result;\n");
</ins><span class="cx">
</span><span class="cx"> } else {
</span><del>- unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "JSValue::encode(jsUndefined())"));
</del><ins>+ unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{CallWith}, \@implContent, "jsUndefined()"));
</ins><span class="cx">
</span><span class="cx"> if ($svgPropertyOrListPropertyType) {
</span><del>- push(@implContent, " $svgPropertyOrListPropertyType impl(*castedThis->wrapped());\n");
- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " $svgPropertyOrListPropertyType impl(*thisObject->wrapped());\n");
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " auto& impl = castedThis->wrapped();\n");
- push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
</del><ins>+ push(@implContent, " auto& impl = thisObject->wrapped();\n");
+ push(@implContent, " JSValue result = " . NativeToJSValue($attribute->signature, 0, $interface, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "thisObject") . ";\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@implContent, " setDOMException(state, throwScope, ec);\n");
</span><span class="cx">
</span><del>- push(@implContent, " return JSValue::encode(result);\n");
</del><ins>+ push(@implContent, " return result;\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@implContent, "}\n\n");
</span><span class="cx">
</span><del>- push(@implContent, "#endif\n") if $attributeConditionalString;
-
- push(@implContent, "\n");
</del><ins>+ push(@implContent, "#endif\n\n") if $attributeConditionalString;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (NeedsConstructorProperty($interface)) {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -140,25 +140,29 @@
</span><span class="cx"> thisObject->JSTestActiveDOMObject::~JSTestActiveDOMObject();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestActiveDOMObject* JSTestActiveDOMObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState*, JSTestActiveDOMObject*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestActiveDOMObject>::attribute<jsTestActiveDOMObjectExcitingAttrGetter>(state, thisValue, "excitingAttr");
+}
+
+static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState* state, JSTestActiveDOMObject* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestActiveDOMObject", "excitingAttr");
- }
- if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))
- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ if (!BindingSecurity::shouldAllowAccessToFrame(state, thisObject->wrapped().frame(), ThrowSecurityError))
+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.excitingAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestActiveDOMObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> public:
</span><span class="cx"> static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -178,55 +178,58 @@
</span><span class="cx"> thisObject->JSTestEventConstructor::~JSTestEventConstructor();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestEventConstructor* JSTestEventConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestEventConstructorAttr1Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr1Getter>(state, thisValue, "attr1");
+}
+
+static inline JSValue jsTestEventConstructorAttr1Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr1");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attr1());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestEventConstructorAttr2Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestEventConstructorAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr2Getter>(state, thisValue, "attr2");
+}
+
+static inline JSValue jsTestEventConstructorAttr2Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr2");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attr2());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(SPECIAL_EVENT)
+static inline JSValue jsTestEventConstructorAttr3Getter(ExecState*, JSTestEventConstructor*, ThrowScope& throwScope);
</ins><span class="cx">
</span><del>-#if ENABLE(SPECIAL_EVENT)
</del><span class="cx"> EncodedJSValue jsTestEventConstructorAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestEventConstructor>::attribute<jsTestEventConstructorAttr3Getter>(state, thisValue, "attr3");
+}
+
+static inline JSValue jsTestEventConstructorAttr3Getter(ExecState* state, JSTestEventConstructor* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestEventConstructor*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestEventConstructor", "attr3");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attr3());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestEventConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> protected:
</span><span class="cx"> JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventConstructor>&&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -132,23 +132,27 @@
</span><span class="cx"> thisObject->JSTestException::~JSTestException();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestException* JSTestException::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestException*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestExceptionNameGetter(ExecState*, JSTestException*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestExceptionName(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestException>::attribute<jsTestExceptionNameGetter>(state, thisValue, "name");
+}
+
+static inline JSValue jsTestExceptionNameGetter(ExecState* state, JSTestException* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestException*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestException", "name");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.name());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestExceptionConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestExceptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestException* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> public:
</span><span class="cx"> static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -177,74 +177,77 @@
</span><span class="cx"> thisObject->JSTestGlobalObject::~JSTestGlobalObject();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestGlobalObject* JSTestGlobalObject::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestGlobalObject*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestGlobalObjectRegularAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectRegularAttributeGetter>(state, thisValue, "regularAttribute");
+}
+
+static inline JSValue jsTestGlobalObjectRegularAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "regularAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.regularAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestGlobalObjectPublicAndPrivateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectPublicAndPrivateAttributeGetter>(state, thisValue, "publicAndPrivateAttribute");
+}
+
+static inline JSValue jsTestGlobalObjectPublicAndPrivateAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.publicAndPrivateAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(TEST_FEATURE)
+static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
</ins><span class="cx">
</span><del>-#if ENABLE(TEST_FEATURE)
</del><span class="cx"> EncodedJSValue jsTestGlobalObjectPublicAndPrivateConditionalAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter>(state, thisValue, "publicAndPrivateConditionalAttribute");
+}
+
+static inline JSValue jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "publicAndPrivateConditionalAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.publicAndPrivateConditionalAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(TEST_FEATURE)
</span><ins>+static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState*, JSTestGlobalObject*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestGlobalObjectEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestGlobalObject>::attribute<jsTestGlobalObjectEnabledAtRuntimeAttributeGetter>(state, thisValue, "enabledAtRuntimeAttribute");
+}
+
+static inline JSValue jsTestGlobalObjectEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestGlobalObject* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestGlobalObject*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestGlobalObject", "enabledAtRuntimeAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestGlobalObject* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> public:
</span><span class="cx"> static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -410,202 +410,223 @@
</span><span class="cx"> thisObject->JSTestInterface::~JSTestInterface();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestInterface* JSTestInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
+}
+
</ins><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><del>-EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState*);
+
+EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(state));
+}
+
+static inline JSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsNumber(TestInterface::implementsStaticReadOnlyAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><del>-EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState*);
+
+EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestInterfaceConstructorImplementsStaticAttrGetter(state));
+}
+
+static inline JSValue jsTestInterfaceConstructorImplementsStaticAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsStringWithCache(state, TestInterface::implementsStaticAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><ins>+static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr1Getter>(state, thisValue, "implementsStr1");
+}
+
+static inline JSValue jsTestInterfaceImplementsStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr1");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.implementsStr1());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><ins>+static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr2Getter>(state, thisValue, "implementsStr2");
+}
+
+static inline JSValue jsTestInterfaceImplementsStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr2");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.implementsStr2());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><ins>+static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsStr3Getter>(state, thisValue, "implementsStr3");
+}
+
+static inline JSValue jsTestInterfaceImplementsStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsStr3");
- }
- return JSValue::encode(castedThis->implementsStr3(*state));
</del><ins>+ UNUSED_PARAM(state);
+ return thisObject->implementsStr3(*state);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><ins>+static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceImplementsNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceImplementsNodeGetter>(state, thisValue, "implementsNode");
+}
+
+static inline JSValue jsTestInterfaceImplementsNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "implementsNode");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.implementsNode());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.implementsNode());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><del>-EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState*);
+
+EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(state));
+}
+
+static inline JSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsNumber(WebCore::TestSupplemental::supplementalStaticReadOnlyAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><del>-EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState*);
+
+EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestInterfaceConstructorSupplementalStaticAttrGetter(state));
+}
+
+static inline JSValue jsTestInterfaceConstructorSupplementalStaticAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStaticAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><ins>+static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr1Getter>(state, thisValue, "supplementalStr1");
+}
+
+static inline JSValue jsTestInterfaceSupplementalStr1Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr1");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr1(impl));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><ins>+static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr2Getter>(state, thisValue, "supplementalStr2");
+}
+
+static inline JSValue jsTestInterfaceSupplementalStr2Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr2");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, WebCore::TestSupplemental::supplementalStr2(impl));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><ins>+static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalStr3Getter>(state, thisValue, "supplementalStr3");
+}
+
+static inline JSValue jsTestInterfaceSupplementalStr3Getter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalStr3");
- }
- return JSValue::encode(castedThis->supplementalStr3(*state));
</del><ins>+ UNUSED_PARAM(state);
+ return thisObject->supplementalStr3(*state);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><ins>+static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState*, JSTestInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestInterface>::attribute<jsTestInterfaceSupplementalNodeGetter>(state, thisValue, "supplementalNode");
+}
+
+static inline JSValue jsTestInterfaceSupplementalNodeGetter(ExecState* state, JSTestInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestInterface", "supplementalNode");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), WebCore::TestSupplemental::supplementalNode(impl));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx">
</span><span class="cx"> // Custom attributes
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -132,36 +132,39 @@
</span><span class="cx"> thisObject->JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestJSBuiltinConstructor* JSTestJSBuiltinConstructor::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestJSBuiltinConstructor*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestJSBuiltinConstructorTestAttributeCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestJSBuiltinConstructor>::attribute<jsTestJSBuiltinConstructorTestAttributeCustomGetter>(state, thisValue, "testAttributeCustom");
+}
+
+static inline JSValue jsTestJSBuiltinConstructorTestAttributeCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeCustom");
- }
- return JSValue::encode(castedThis->testAttributeCustom(*state));
</del><ins>+ UNUSED_PARAM(state);
+ return thisObject->testAttributeCustom(*state);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState*, JSTestJSBuiltinConstructor*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestJSBuiltinConstructorTestAttributeRWCustom(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestJSBuiltinConstructor>::attribute<jsTestJSBuiltinConstructorTestAttributeRWCustomGetter>(state, thisValue, "testAttributeRWCustom");
+}
+
+static inline JSValue jsTestJSBuiltinConstructorTestAttributeRWCustomGetter(ExecState* state, JSTestJSBuiltinConstructor* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestJSBuiltinConstructor*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestJSBuiltinConstructor", "testAttributeRWCustom");
- }
- return JSValue::encode(castedThis->testAttributeRWCustom(*state));
</del><ins>+ UNUSED_PARAM(state);
+ return thisObject->testAttributeRWCustom(*state);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestJSBuiltinConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestJSBuiltinConstructor* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> static void visitChildren(JSCell*, JSC::SlotVisitor&);
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -168,23 +168,27 @@
</span><span class="cx"> return getDOMPrototype<JSTestNode>(vm, globalObject);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestNode* JSTestNode::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestNode*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestNodeNameGetter(ExecState*, JSTestNode*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestNodeName(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNode>::attribute<jsTestNodeNameGetter>(state, thisValue, "name");
+}
+
+static inline JSValue jsTestNodeNameGetter(ExecState* state, JSTestNode* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNode*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNode", "name");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.name());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestNodeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestNode* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> static void visitChildren(JSCell*, JSC::SlotVisitor&);
</span><span class="cx">
</span><span class="cx"> TestNode& wrapped() const
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -143,26 +143,31 @@
</span><span class="cx"> thisObject->JSTestNondeterministic::~JSTestNondeterministic();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestNondeterministic* JSTestNondeterministic::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicReadonlyAttrGetter>(state, thisValue, "nondeterministicReadonlyAttr");
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicReadonlyAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicReadonlyAttr");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx"> JSGlobalObject* globalObject = state->lexicalGlobalObject();
</span><span class="cx"> InputCursor& cursor = globalObject->inputCursor();
</span><span class="cx"> static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicReadonlyAttr", AtomicString::ConstructFromLiteral);
</span><span class="cx"> if (cursor.isCapturing()) {
</span><del>- int32_t memoizedResult = castedThis->wrapped().nondeterministicReadonlyAttr();
</del><ins>+ int32_t memoizedResult = thisObject->wrapped().nondeterministicReadonlyAttr();
</ins><span class="cx"> cursor.appendInput<MemoizedDOMResult<int32_t>>(bindingName.get().string(), memoizedResult, 0);
</span><span class="cx"> JSValue result = jsNumber(memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (cursor.isReplaying()) {
</span><span class="lines">@@ -170,36 +175,35 @@
</span><span class="cx"> MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
</span><span class="cx"> if (input && input->convertTo<int32_t>(memoizedResult)) {
</span><span class="cx"> JSValue result = jsNumber(memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.nondeterministicReadonlyAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestNondeterministicNondeterministicWriteableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicWriteableAttrGetter>(state, thisValue, "nondeterministicWriteableAttr");
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicWriteableAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicWriteableAttr");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx"> JSGlobalObject* globalObject = state->lexicalGlobalObject();
</span><span class="cx"> InputCursor& cursor = globalObject->inputCursor();
</span><span class="cx"> static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicWriteableAttr", AtomicString::ConstructFromLiteral);
</span><span class="cx"> if (cursor.isCapturing()) {
</span><del>- String memoizedResult = castedThis->wrapped().nondeterministicWriteableAttr();
</del><ins>+ String memoizedResult = thisObject->wrapped().nondeterministicWriteableAttr();
</ins><span class="cx"> cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (cursor.isReplaying()) {
</span><span class="lines">@@ -207,36 +211,35 @@
</span><span class="cx"> MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
</span><span class="cx"> if (input && input->convertTo<String>(memoizedResult)) {
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.nondeterministicWriteableAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestNondeterministicNondeterministicExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicExceptionAttrGetter>(state, thisValue, "nondeterministicExceptionAttr");
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicExceptionAttr");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx"> JSGlobalObject* globalObject = state->lexicalGlobalObject();
</span><span class="cx"> InputCursor& cursor = globalObject->inputCursor();
</span><span class="cx"> static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicExceptionAttr", AtomicString::ConstructFromLiteral);
</span><span class="cx"> if (cursor.isCapturing()) {
</span><del>- String memoizedResult = castedThis->wrapped().nondeterministicExceptionAttr();
</del><ins>+ String memoizedResult = thisObject->wrapped().nondeterministicExceptionAttr();
</ins><span class="cx"> cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (cursor.isReplaying()) {
</span><span class="lines">@@ -244,27 +247,26 @@
</span><span class="cx"> MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
</span><span class="cx"> if (input && input->convertTo<String>(memoizedResult)) {
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.nondeterministicExceptionAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestNondeterministicNondeterministicGetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicGetterExceptionAttrGetter>(state, thisValue, "nondeterministicGetterExceptionAttr");
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicGetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx"> JSGlobalObject* globalObject = state->lexicalGlobalObject();
</span><span class="lines">@@ -271,11 +273,11 @@
</span><span class="cx"> InputCursor& cursor = globalObject->inputCursor();
</span><span class="cx"> static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicGetterExceptionAttr", AtomicString::ConstructFromLiteral);
</span><span class="cx"> if (cursor.isCapturing()) {
</span><del>- String memoizedResult = castedThis->wrapped().nondeterministicGetterExceptionAttr(ec);
</del><ins>+ String memoizedResult = thisObject->wrapped().nondeterministicGetterExceptionAttr(ec);
</ins><span class="cx"> cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, ec);
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (cursor.isReplaying()) {
</span><span class="lines">@@ -284,37 +286,36 @@
</span><span class="cx"> if (input && input->convertTo<String>(memoizedResult)) {
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><span class="cx"> setDOMException(state, throwScope, input->exceptionCode());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.nondeterministicGetterExceptionAttr(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState*, JSTestNondeterministic*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestNondeterministic>::attribute<jsTestNondeterministicNondeterministicSetterExceptionAttrGetter>(state, thisValue, "nondeterministicSetterExceptionAttr");
+}
+
+static inline JSValue jsTestNondeterministicNondeterministicSetterExceptionAttrGetter(ExecState* state, JSTestNondeterministic* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestNondeterministic*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> #if ENABLE(WEB_REPLAY)
</span><span class="cx"> JSGlobalObject* globalObject = state->lexicalGlobalObject();
</span><span class="cx"> InputCursor& cursor = globalObject->inputCursor();
</span><span class="cx"> static NeverDestroyed<const AtomicString> bindingName("TestNondeterministic.nondeterministicSetterExceptionAttr", AtomicString::ConstructFromLiteral);
</span><span class="cx"> if (cursor.isCapturing()) {
</span><del>- String memoizedResult = castedThis->wrapped().nondeterministicSetterExceptionAttr();
</del><ins>+ String memoizedResult = thisObject->wrapped().nondeterministicSetterExceptionAttr();
</ins><span class="cx"> cursor.appendInput<MemoizedDOMResult<String>>(bindingName.get().string(), memoizedResult, 0);
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (cursor.isReplaying()) {
</span><span class="lines">@@ -322,16 +323,15 @@
</span><span class="cx"> MemoizedDOMResultBase* input = cursor.fetchInput<MemoizedDOMResultBase>();
</span><span class="cx"> if (input && input->convertTo<String>(memoizedResult)) {
</span><span class="cx"> JSValue result = jsStringWithCache(state, memoizedResult);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.nondeterministicSetterExceptionAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestNondeterministicConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministich"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestNondeterministic* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> protected:
</span><span class="cx"> JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNondeterministic>&&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -1711,1546 +1711,1475 @@
</span><span class="cx"> return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestObj* JSTestObj::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyLongAttrGetter>(state, thisValue, "readOnlyLongAttr");
+}
+
+static inline JSValue jsTestObjReadOnlyLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyLongAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.readOnlyLongAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyStringAttrGetter>(state, thisValue, "readOnlyStringAttr");
+}
+
+static inline JSValue jsTestObjReadOnlyStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyStringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.readOnlyStringAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReadOnlyTestObjAttrGetter>(state, thisValue, "readOnlyTestObjAttr");
+}
+
+static inline JSValue jsTestObjReadOnlyTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "readOnlyTestObjAttr");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.readOnlyTestObjAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.readOnlyTestObjAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState*);
</ins><span class="cx">
</span><del>-EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestObjConstructorStaticReadOnlyLongAttrGetter(state));
+}
+
+static inline JSValue jsTestObjConstructorStaticReadOnlyLongAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState*);
</ins><span class="cx">
</span><del>-EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</del><ins>+EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* state, EncodedJSValue, PropertyName)
</ins><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- UNUSED_PARAM(throwScope);
- UNUSED_PARAM(thisValue);
</del><ins>+ return JSValue::encode(jsTestObjConstructorStaticStringAttrGetter(state));
+}
+
+static inline JSValue jsTestObjConstructorStaticStringAttrGetter(ExecState* state)
+{
+ UNUSED_PARAM(state);
</ins><span class="cx"> JSValue result = jsStringWithCache(state, TestObj::staticStringAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConstructorTestSubObjGetter>(state, thisValue, "TestSubObj");
+}
+
+static inline JSValue jsTestObjConstructorTestSubObjGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObj");
- }
- return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ UNUSED_PARAM(state);
+ return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjTestSubObjEnabledBySettingConstructorGetter>(state, thisValue, "TestSubObjEnabledBySetting");
+}
+
+static inline JSValue jsTestObjTestSubObjEnabledBySettingConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "TestSubObjEnabledBySetting");
- }
- if (UNLIKELY(!castedThis->wrapped().frame()))
- return JSValue::encode(jsUndefined());
- Settings& settings = castedThis->wrapped().frame()->settings();
</del><ins>+ UNUSED_PARAM(state);
+ if (UNLIKELY(!thisObject->wrapped().frame()))
+ return jsUndefined();
+ Settings& settings = thisObject->wrapped().frame()->settings();
</ins><span class="cx"> if (!settings.testSettingEnabled())
</span><del>- return JSValue::encode(jsUndefined());
- return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ return jsUndefined();
+ return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjEnumAttrGetter>(state, thisValue, "enumAttr");
+}
+
+static inline JSValue jsTestObjEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "enumAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.enumAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjByteAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjByteAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjByteAttrGetter>(state, thisValue, "byteAttr");
+}
+
+static inline JSValue jsTestObjByteAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "byteAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.byteAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjOctetAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjOctetAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjOctetAttrGetter>(state, thisValue, "octetAttr");
+}
+
+static inline JSValue jsTestObjOctetAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "octetAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.octetAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjShortAttrGetter>(state, thisValue, "shortAttr");
+}
+
+static inline JSValue jsTestObjShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "shortAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.shortAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjClampedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjClampedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjClampedShortAttrGetter>(state, thisValue, "clampedShortAttr");
+}
+
+static inline JSValue jsTestObjClampedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "clampedShortAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.clampedShortAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjEnforceRangeShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjEnforceRangeShortAttrGetter>(state, thisValue, "enforceRangeShortAttr");
+}
+
+static inline JSValue jsTestObjEnforceRangeShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "enforceRangeShortAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.enforceRangeShortAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjUnsignedShortAttrGetter>(state, thisValue, "unsignedShortAttr");
+}
+
+static inline JSValue jsTestObjUnsignedShortAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedShortAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.unsignedShortAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjLongAttrGetter>(state, thisValue, "longAttr");
+}
+
+static inline JSValue jsTestObjLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "longAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.longAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjLongLongAttrGetter>(state, thisValue, "longLongAttr");
+}
+
+static inline JSValue jsTestObjLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "longLongAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.longLongAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjUnsignedLongLongAttrGetter>(state, thisValue, "unsignedLongLongAttr");
+}
+
+static inline JSValue jsTestObjUnsignedLongLongAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "unsignedLongLongAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.unsignedLongLongAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrGetter>(state, thisValue, "stringAttr");
+}
+
+static inline JSValue jsTestObjStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjUsvstringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjUsvstringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjUsvstringAttrGetter>(state, thisValue, "usvstringAttr");
+}
+
+static inline JSValue jsTestObjUsvstringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.usvstringAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjTestObjAttrGetter>(state, thisValue, "testObjAttr");
+}
+
+static inline JSValue jsTestObjTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "testObjAttr");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.testObjAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.testObjAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjTestNullableObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjTestNullableObjAttrGetter>(state, thisValue, "testNullableObjAttr");
+}
+
+static inline JSValue jsTestObjTestNullableObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "testNullableObjAttr");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.testNullableObjAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.testNullableObjAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjLenientTestObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjLenientTestObjAttrGetter, CastedThisErrorBehavior::ReturnEarly>(state, thisValue, "lenientTestObjAttr");
+}
+
+static inline JSValue jsTestObjLenientTestObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return JSValue::encode(jsUndefined());
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.lenientTestObjAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.lenientTestObjAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjUnforgeableAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjUnforgeableAttrGetter>(state, thisValue, "unforgeableAttr");
+}
+
+static inline JSValue jsTestObjUnforgeableAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "unforgeableAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.unforgeableAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrTreatingNullAsEmptyStringGetter>(state, thisValue, "stringAttrTreatingNullAsEmptyString");
+}
+
+static inline JSValue jsTestObjStringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrTreatingNullAsEmptyString");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttrTreatingNullAsEmptyString());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjUsvstringAttrTreatingNullAsEmptyString(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter>(state, thisValue, "usvstringAttrTreatingNullAsEmptyString");
+}
+
+static inline JSValue jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "usvstringAttrTreatingNullAsEmptyString");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.usvstringAttrTreatingNullAsEmptyString());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjImplementationEnumAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjImplementationEnumAttrGetter>(state, thisValue, "implementationEnumAttr");
+}
+
+static inline JSValue jsTestObjImplementationEnumAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "implementationEnumAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.implementationEnumAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjXMLObjAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjXMLObjAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjXMLObjAttrGetter>(state, thisValue, "XMLObjAttr");
+}
+
+static inline JSValue jsTestObjXMLObjAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "XMLObjAttr");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.xmlObjAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.xmlObjAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjCreateGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjCreate(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjCreateGetter>(state, thisValue, "create");
+}
+
+static inline JSValue jsTestObjCreateGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "create");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsBoolean(impl.isCreate());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedStringAttrGetter>(state, thisValue, "reflectedStringAttr");
+}
+
+static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedUSVStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUSVStringAttrGetter>(state, thisValue, "reflectedUSVStringAttr");
+}
+
+static inline JSValue jsTestObjReflectedUSVStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVStringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedIntegralAttrGetter>(state, thisValue, "reflectedIntegralAttr");
+}
+
+static inline JSValue jsTestObjReflectedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedIntegralAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUnsignedIntegralAttrGetter>(state, thisValue, "reflectedUnsignedIntegralAttr");
+}
+
+static inline JSValue jsTestObjReflectedUnsignedIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUnsignedIntegralAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedBooleanAttrGetter>(state, thisValue, "reflectedBooleanAttr");
+}
+
+static inline JSValue jsTestObjReflectedBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedBooleanAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedbooleanattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedURLAttrGetter>(state, thisValue, "reflectedURLAttr");
+}
+
+static inline JSValue jsTestObjReflectedURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedURLAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedUSVURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedUSVURLAttrGetter>(state, thisValue, "reflectedUSVURLAttr");
+}
+
+static inline JSValue jsTestObjReflectedUSVURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedUSVURLAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::reflectedusvurlattrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedStringAttrGetter>(state, thisValue, "reflectedStringAttr");
+}
+
+static inline JSValue jsTestObjReflectedStringAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedStringAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomIntegralAttrGetter>(state, thisValue, "reflectedCustomIntegralAttr");
+}
+
+static inline JSValue jsTestObjReflectedCustomIntegralAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomIntegralAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomBooleanAttrGetter>(state, thisValue, "reflectedCustomBooleanAttr");
+}
+
+static inline JSValue jsTestObjReflectedCustomBooleanAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomBooleanAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsBoolean(impl.hasAttributeWithoutSynchronization(WebCore::HTMLNames::customContentBooleanAttrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReflectedCustomURLAttrGetter>(state, thisValue, "reflectedCustomURLAttr");
+}
+
+static inline JSValue jsTestObjReflectedCustomURLAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "reflectedCustomURLAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(TEST_FEATURE)
+static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><del>-#if ENABLE(TEST_FEATURE)
</del><span class="cx"> EncodedJSValue jsTestObjEnabledAtRuntimeAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjEnabledAtRuntimeAttributeGetter>(state, thisValue, "enabledAtRuntimeAttribute");
+}
+
+static inline JSValue jsTestObjEnabledAtRuntimeAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "enabledAtRuntimeAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.enabledAtRuntimeAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjTypedArrayAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjTypedArrayAttrGetter>(state, thisValue, "typedArrayAttr");
+}
+
+static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "typedArrayAttr");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.typedArrayAttr());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.typedArrayAttr());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithGetterExceptionGetter>(state, thisValue, "attrWithGetterException");
+}
+
+static inline JSValue jsTestObjAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterException");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithGetterException(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttrWithGetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithGetterExceptionWithMessageGetter>(state, thisValue, "attrWithGetterExceptionWithMessage");
+}
+
+static inline JSValue jsTestObjAttrWithGetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithGetterExceptionWithMessage");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCodeWithMessage ec;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithGetterExceptionWithMessage(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithSetterExceptionGetter>(state, thisValue, "attrWithSetterException");
+}
+
+static inline JSValue jsTestObjAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterException");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithSetterException());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttrWithSetterExceptionWithMessage(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttrWithSetterExceptionWithMessageGetter>(state, thisValue, "attrWithSetterExceptionWithMessage");
+}
+
+static inline JSValue jsTestObjAttrWithSetterExceptionWithMessageGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attrWithSetterExceptionWithMessage");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithSetterExceptionWithMessage());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrWithGetterExceptionGetter>(state, thisValue, "stringAttrWithGetterException");
+}
+
+static inline JSValue jsTestObjStringAttrWithGetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithGetterException");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStringAttrWithSetterExceptionGetter>(state, thisValue, "stringAttrWithSetterException");
+}
+
+static inline JSValue jsTestObjStringAttrWithSetterExceptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "stringAttrWithSetterException");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjCustomAttrGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjCustomAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjCustomAttrGetter>(state, thisValue, "customAttr");
+}
+
+static inline JSValue jsTestObjCustomAttrGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "customAttr");
- }
- return JSValue::encode(castedThis->customAttr(*state));
</del><ins>+ UNUSED_PARAM(state);
+ return thisObject->customAttr(*state);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjOnfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjOnfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjOnfooGetter>(state, thisValue, "onfoo");
+}
+
+static inline JSValue jsTestObjOnfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "onfoo");
- }
</del><span class="cx"> UNUSED_PARAM(state);
</span><del>- return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
</del><ins>+ return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjOnwebkitfooGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjOnwebkitfoo(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjOnwebkitfooGetter>(state, thisValue, "onwebkitfoo");
+}
+
+static inline JSValue jsTestObjOnwebkitfooGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "onwebkitfoo");
- }
</del><span class="cx"> UNUSED_PARAM(state);
</span><del>- return JSValue::encode(eventHandlerAttribute(castedThis->wrapped(), eventNames().fooEvent));
</del><ins>+ return eventHandlerAttribute(thisObject->wrapped(), eventNames().fooEvent);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptStateAttributeGetter>(state, thisValue, "withScriptStateAttribute");
+}
+
+static inline JSValue jsTestObjWithScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.withScriptStateAttribute(*state));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithCallWithAndSetterCallWithAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithCallWithAndSetterCallWithAttributeGetter>(state, thisValue, "withCallWithAndSetterCallWithAttribute");
+}
+
+static inline JSValue jsTestObjWithCallWithAndSetterCallWithAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withCallWithAndSetterCallWithAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.withCallWithAndSetterCallWithAttribute(*state));
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAttributeGetter>(state, thisValue, "withScriptExecutionContextAttribute");
+}
+
+static inline JSValue jsTestObjWithScriptExecutionContextAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttribute");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!context)
</span><del>- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttribute(*context));
- return JSValue::encode(result);
</del><ins>+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttribute(*context));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptStateAttributeRaisesGetter>(state, thisValue, "withScriptStateAttributeRaises");
+}
+
+static inline JSValue jsTestObjWithScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptStateAttributeRaises");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
</del><ins>+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptStateAttributeRaises(*state, ec));
</ins><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAttributeRaisesGetter>(state, thisValue, "withScriptExecutionContextAttributeRaises");
+}
+
+static inline JSValue jsTestObjWithScriptExecutionContextAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAttributeRaises");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!context)
</span><del>- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
</del><ins>+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAttributeRaises(*context, ec));
</ins><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateAttribute");
+}
+
+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttribute");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!context)
</span><del>- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
- return JSValue::encode(result);
</del><ins>+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttribute(*state, *context));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateAttributeRaises");
+}
+
+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaisesGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateAttributeRaises");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!context)
</span><del>- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
</del><ins>+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateAttributeRaises(*state, *context, ec));
</ins><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter>(state, thisValue, "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
+}
+
+static inline JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> auto* context = jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())->scriptExecutionContext();
</span><span class="cx"> if (!context)
</span><del>- return JSValue::encode(jsUndefined());
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
- return JSValue::encode(result);
</del><ins>+ return jsUndefined();
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(*state, *context));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjWithScriptArgumentsAndCallStackAttributeGetter>(state, thisValue, "withScriptArgumentsAndCallStackAttribute");
+}
+
+static inline JSValue jsTestObjWithScriptArgumentsAndCallStackAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "withScriptArgumentsAndCallStackAttribute");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.withScriptArgumentsAndCallStackAttribute());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(Condition1)
+static inline JSValue jsTestObjConditionalAttr1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><del>-#if ENABLE(Condition1)
</del><span class="cx"> EncodedJSValue jsTestObjConditionalAttr1(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr1Getter>(state, thisValue, "conditionalAttr1");
+}
+
+static inline JSValue jsTestObjConditionalAttr1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr1");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.conditionalAttr1());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition1) && ENABLE(Condition2)
</span><ins>+static inline JSValue jsTestObjConditionalAttr2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjConditionalAttr2(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr2Getter>(state, thisValue, "conditionalAttr2");
+}
+
+static inline JSValue jsTestObjConditionalAttr2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr2");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.conditionalAttr2());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><ins>+static inline JSValue jsTestObjConditionalAttr3Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjConditionalAttr3(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr3Getter>(state, thisValue, "conditionalAttr3");
+}
+
+static inline JSValue jsTestObjConditionalAttr3Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr3");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.conditionalAttr3());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition1)
</span><ins>+static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr4ConstructorGetter>(state, thisValue, "conditionalAttr4");
+}
+
+static inline JSValue jsTestObjConditionalAttr4ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr4");
- }
- return JSValue::encode(JSTestObjectA::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ UNUSED_PARAM(state);
+ return JSTestObjectA::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition1) && ENABLE(Condition2)
</span><ins>+static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr5ConstructorGetter>(state, thisValue, "conditionalAttr5");
+}
+
+static inline JSValue jsTestObjConditionalAttr5ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr5");
- }
- return JSValue::encode(JSTestObjectB::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ UNUSED_PARAM(state);
+ return JSTestObjectB::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><ins>+static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjConditionalAttr6ConstructorGetter>(state, thisValue, "conditionalAttr6");
+}
+
+static inline JSValue jsTestObjConditionalAttr6ConstructorGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "conditionalAttr6");
- }
- return JSValue::encode(JSTestObjectC::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ UNUSED_PARAM(state);
+ return JSTestObjectC::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjCachedAttribute1Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestObjCachedAttribute1(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjCachedAttribute1Getter>(state, thisValue, "cachedAttribute1");
+}
+
+static inline JSValue jsTestObjCachedAttribute1Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute1");
- }
- if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
- return JSValue::encode(cachedValue);
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ if (JSValue cachedValue = thisObject->m_cachedAttribute1.get())
+ return cachedValue;
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = impl.cachedAttribute1();
</span><del>- castedThis->m_cachedAttribute1.set(state->vm(), castedThis, result);
- return JSValue::encode(result);
</del><ins>+ thisObject->m_cachedAttribute1.set(state->vm(), thisObject, result);
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjCachedAttribute2Getter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjCachedAttribute2(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjCachedAttribute2Getter>(state, thisValue, "cachedAttribute2");
+}
+
+static inline JSValue jsTestObjCachedAttribute2Getter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "cachedAttribute2");
- }
- if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
- return JSValue::encode(cachedValue);
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ if (JSValue cachedValue = thisObject->m_cachedAttribute2.get())
+ return cachedValue;
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = impl.cachedAttribute2();
</span><del>- castedThis->m_cachedAttribute2.set(state->vm(), castedThis, result);
- return JSValue::encode(result);
</del><ins>+ thisObject->m_cachedAttribute2.set(state->vm(), thisObject, result);
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAnyAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAnyAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAnyAttributeGetter>(state, thisValue, "anyAttribute");
+}
+
+static inline JSValue jsTestObjAnyAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "anyAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = impl.anyAttribute();
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjContentDocumentGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjContentDocument(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjContentDocumentGetter>(state, thisValue, "contentDocument");
+}
+
+static inline JSValue jsTestObjContentDocumentGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "contentDocument");
- }
- auto& impl = castedThis->wrapped();
- return JSValue::encode(shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, castedThis->globalObject(), impl.contentDocument()) : jsNull());
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ return shouldAllowAccessToNode(state, impl.contentDocument()) ? toJS(state, thisObject->globalObject(), impl.contentDocument()) : jsNull();
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjMutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjMutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjMutablePointGetter>(state, thisValue, "mutablePoint");
+}
+
+static inline JSValue jsTestObjMutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "mutablePoint");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjImmutablePointGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjImmutablePoint(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjImmutablePointGetter>(state, thisValue, "immutablePoint");
+}
+
+static inline JSValue jsTestObjImmutablePointGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "immutablePoint");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint()));
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStrawberryGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStrawberry(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStrawberryGetter>(state, thisValue, "strawberry");
+}
+
+static inline JSValue jsTestObjStrawberryGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "strawberry");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.blueberry());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjDescriptionGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjDescription(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjDescriptionGetter>(state, thisValue, "description");
+}
+
+static inline JSValue jsTestObjDescriptionGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "description");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.description());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjIdGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjId(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjIdGetter>(state, thisValue, "id");
+}
+
+static inline JSValue jsTestObjIdGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "id");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.id());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjHashGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjHash(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjHashGetter>(state, thisValue, "hash");
+}
+
+static inline JSValue jsTestObjHashGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "hash");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.hash());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjReplaceableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjReplaceableAttributeGetter>(state, thisValue, "replaceableAttribute");
+}
+
+static inline JSValue jsTestObjReplaceableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "replaceableAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.replaceableAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableDoubleAttributeGetter>(state, thisValue, "nullableDoubleAttribute");
+}
+
+static inline JSValue jsTestObjNullableDoubleAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableDoubleAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = toNullableJSNumber(impl.nullableDoubleAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableLongAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableLongAttributeGetter>(state, thisValue, "nullableLongAttribute");
+}
+
+static inline JSValue jsTestObjNullableLongAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = toNullableJSNumber(impl.nullableLongAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableBooleanAttributeGetter>(state, thisValue, "nullableBooleanAttribute");
+}
+
+static inline JSValue jsTestObjNullableBooleanAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableBooleanAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsBoolean(impl.nullableBooleanAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableStringAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringAttributeGetter>(state, thisValue, "nullableStringAttribute");
+}
+
+static inline JSValue jsTestObjNullableStringAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableLongSettableAttributeGetter>(state, thisValue, "nullableLongSettableAttribute");
+}
+
+static inline JSValue jsTestObjNullableLongSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableLongSettableAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = toNullableJSNumber(impl.nullableLongSettableAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringSettableAttributeGetter>(state, thisValue, "nullableStringSettableAttribute");
+}
+
+static inline JSValue jsTestObjNullableStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringSettableAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableUSVStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableUSVStringSettableAttributeGetter>(state, thisValue, "nullableUSVStringSettableAttribute");
+}
+
+static inline JSValue jsTestObjNullableUSVStringSettableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableUSVStringSettableAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringOrNull(state, impl.nullableUSVStringSettableAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjNullableStringValueGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjNullableStringValueGetter>(state, thisValue, "nullableStringValue");
+}
+
+static inline JSValue jsTestObjNullableStringValueGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "nullableStringValue");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = toNullableJSNumber(impl.nullableStringValue(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttributeGetter>(state, thisValue, "attribute");
+}
+
+static inline JSValue jsTestObjAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjAttributeWithReservedEnumTypeGetter>(state, thisValue, "attributeWithReservedEnumType");
+}
+
+static inline JSValue jsTestObjAttributeWithReservedEnumTypeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "attributeWithReservedEnumType");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.attributeWithReservedEnumType());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjPutForwardsAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjPutForwardsAttributeGetter>(state, thisValue, "putForwardsAttribute");
+}
+
+static inline JSValue jsTestObjPutForwardsAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsAttribute");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsAttribute());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsAttribute());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjPutForwardsNullableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjPutForwardsNullableAttributeGetter>(state, thisValue, "putForwardsNullableAttribute");
+}
+
+static inline JSValue jsTestObjPutForwardsNullableAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "putForwardsNullableAttribute");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = toJS(state, castedThis->globalObject(), impl.putForwardsNullableAttribute());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = toJS(state, thisObject->globalObject(), impl.putForwardsNullableAttribute());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestObjStringifierAttributeGetter(ExecState*, JSTestObj*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestObjStringifierAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestObj>::attribute<jsTestObjStringifierAttributeGetter>(state, thisValue, "stringifierAttribute");
+}
+
+static inline JSValue jsTestObjStringifierAttributeGetter(ExecState* state, JSTestObj* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestObject", "stringifierAttribute");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringifierAttribute());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestObjConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">
</span><span class="cx"> static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestObj* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1;
</span><span class="cx"> mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute2;
</span><span class="cx"> static void visitChildren(JSCell*, JSC::SlotVisitor&);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -132,97 +132,97 @@
</span><span class="cx"> thisObject->JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceValueGetter>(state, thisValue, "value");
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfaceValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "value");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = impl.value() ? impl.value()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = impl.value() ? impl.value()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceReadonlyValueGetter>(state, thisValue, "readonlyValue");
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfaceReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "readonlyValue");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = impl.readonlyValue() ? impl.readonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceCachedValueGetter>(state, thisValue, "cachedValue");
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfaceCachedValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedValue");
- }
- if (JSValue cachedValue = castedThis->m_cachedValue.get())
- return JSValue::encode(cachedValue);
- auto& impl = castedThis->wrapped();
- JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
- castedThis->m_cachedValue.set(state->vm(), castedThis, result);
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ if (JSValue cachedValue = thisObject->m_cachedValue.get())
+ return cachedValue;
+ auto& impl = thisObject->wrapped();
+ JSValue result = impl.cachedValue() ? impl.cachedValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
+ thisObject->m_cachedValue.set(state->vm(), thisObject, result);
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfacePortsGetter>(state, thisValue, "ports");
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfacePortsGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "ports");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = jsArray(state, castedThis->globalObject(), impl.ports());
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = jsArray(state, thisObject->globalObject(), impl.ports());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState*, JSTestSerializedScriptValueInterface*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestSerializedScriptValueInterface>::attribute<jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter>(state, thisValue, "cachedReadonlyValue");
+}
+
+static inline JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter(ExecState* state, JSTestSerializedScriptValueInterface* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestSerializedScriptValueInterface", "cachedReadonlyValue");
- }
- if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
- return JSValue::encode(cachedValue);
- auto& impl = castedThis->wrapped();
- JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
- castedThis->m_cachedReadonlyValue.set(state->vm(), castedThis, result);
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ if (JSValue cachedValue = thisObject->m_cachedReadonlyValue.get())
+ return cachedValue;
+ auto& impl = thisObject->wrapped();
+ JSValue result = impl.cachedReadonlyValue() ? impl.cachedReadonlyValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
+ thisObject->m_cachedReadonlyValue.set(state->vm(), thisObject, result);
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestSerializedScriptValueInterface* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> mutable JSC::WriteBarrier<JSC::Unknown> m_cachedValue;
</span><span class="cx"> mutable JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue;
</span><span class="cx"> static void visitChildren(JSCell*, JSC::SlotVisitor&);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -210,127 +210,125 @@
</span><span class="cx"> thisObject->JSTestTypedefs::~JSTestTypedefs();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSTestTypedefs* JSTestTypedefs::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsUnsignedLongLongAttrGetter>(state, thisValue, "unsignedLongLongAttr");
+}
+
+static inline JSValue jsTestTypedefsUnsignedLongLongAttrGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "unsignedLongLongAttr");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.unsignedLongLongAttr());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsImmutableSerializedScriptValueGetter>(state, thisValue, "immutableSerializedScriptValue");
+}
+
+static inline JSValue jsTestTypedefsImmutableSerializedScriptValueGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "immutableSerializedScriptValue");
- }
- auto& impl = castedThis->wrapped();
- JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, castedThis->globalObject(), 0) : jsNull();
- return JSValue::encode(result);
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
+ JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(state, thisObject->globalObject(), 0) : jsNull();
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsConstructorTestSubObjGetter>(state, thisValue, "TestSubObj");
+}
+
+static inline JSValue jsTestTypedefsConstructorTestSubObjGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "TestSubObj");
- }
- return JSValue::encode(JSTestSubObj::getConstructor(state->vm(), castedThis->globalObject()));
</del><ins>+ UNUSED_PARAM(state);
+ return JSTestSubObj::getConstructor(state->vm(), thisObject->globalObject());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttrWithGetterExceptionGetter>(state, thisValue, "attrWithGetterException");
+}
+
+static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithGetterException");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithGetterException(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttrWithSetterExceptionGetter>(state, thisValue, "attrWithSetterException");
+}
+
+static inline JSValue jsTestTypedefsAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "attrWithSetterException");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsNumber(impl.attrWithSetterException());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsStringAttrWithGetterExceptionGetter>(state, thisValue, "stringAttrWithGetterException");
+}
+
+static inline JSValue jsTestTypedefsStringAttrWithGetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithGetterException");
- }
</del><ins>+ UNUSED_PARAM(state);
</ins><span class="cx"> ExceptionCode ec = 0;
</span><del>- auto& impl = castedThis->wrapped();
</del><ins>+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttrWithGetterException(ec));
</span><span class="cx"> setDOMException(state, throwScope, ec);
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState*, JSTestTypedefs*, ThrowScope& throwScope);
</ins><span class="cx">
</span><span class="cx"> EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsStringAttrWithSetterExceptionGetter>(state, thisValue, "stringAttrWithSetterException");
+}
+
+static inline JSValue jsTestTypedefsStringAttrWithSetterExceptionGetter(ExecState* state, JSTestTypedefs* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSTestTypedefs*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "TestTypedefs", "stringAttrWithSetterException");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.stringAttrWithSetterException());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsTestTypedefsConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSTestTypedefs* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> public:
</span><span class="cx"> static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -132,23 +132,27 @@
</span><span class="cx"> thisObject->JSattribute::~JSattribute();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSattribute* JSattribute::castForAttribute(JSC::ExecState*, EncodedJSValue thisValue)
+{
+ return jsDynamicCast<JSattribute*>(JSValue::decode(thisValue));
+}
+
+static inline JSValue jsattributeReadonlyGetter(ExecState*, JSattribute*, ThrowScope& throwScope);
+
</ins><span class="cx"> EncodedJSValue jsattributeReadonly(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><del>- VM& vm = state->vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+ return BindingCaller<JSattribute>::attribute<jsattributeReadonlyGetter>(state, thisValue, "readonly");
+}
+
+static inline JSValue jsattributeReadonlyGetter(ExecState* state, JSattribute* thisObject, ThrowScope& throwScope)
+{
</ins><span class="cx"> UNUSED_PARAM(throwScope);
</span><del>- UNUSED_PARAM(thisValue);
- JSValue decodedThisValue = JSValue::decode(thisValue);
- auto* castedThis = jsDynamicCast<JSattribute*>(decodedThisValue);
- if (UNLIKELY(!castedThis)) {
- return throwGetterTypeError(*state, throwScope, "attribute", "readonly");
- }
- auto& impl = castedThis->wrapped();
</del><ins>+ UNUSED_PARAM(state);
+ auto& impl = thisObject->wrapped();
</ins><span class="cx"> JSValue result = jsStringWithCache(state, impl.readonly());
</span><del>- return JSValue::encode(result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> EncodedJSValue jsattributeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = state->vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSattributeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h (206952 => 206953)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-10-08 11:54:50 UTC (rev 206952)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h        2016-10-08 13:09:30 UTC (rev 206953)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
</span><ins>+ static JSattribute* castForAttribute(JSC::ExecState*, JSC::EncodedJSValue);
</ins><span class="cx"> public:
</span><span class="cx"> static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</span><span class="cx"> protected:
</span></span></pre>
</div>
</div>
</body>
</html>