<!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>[161009] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161009">161009</a></dd>
<dt>Author</dt> <dd>oliver@apple.com</dd>
<dt>Date</dt> <dd>2013-12-23 11:51:38 -0800 (Mon, 23 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update custom setter implementations to perform type checks
https://bugs.webkit.org/show_bug.cgi?id=126171

Reviewed by Daniel Bates.

Source/JavaScriptCore:

Modify the setter function signature to take encoded values
as we're changing the setter usage everywhere anyway.

* runtime/Lookup.h:
(JSC::putEntry):

Source/WebCore:

Update the bindings code generator for setters so that they perform a real
type check.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
(WebCore::setJSTestInterfaceImplementsStr2):
(WebCore::setJSTestInterfaceImplementsStr3):
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceSupplementalStr2):
(WebCore::setJSTestInterfaceSupplementalStr3):
(WebCore::setJSTestInterfaceSupplementalNode):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjConstructorStaticStringAttr):
(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjEnumAttr):
(WebCore::setJSTestObjByteAttr):
(WebCore::setJSTestObjOctetAttr):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjLongAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjTypedArrayAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjCustomAttr):
(WebCore::setJSTestObjWithScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjConditionalAttr4Constructor):
(WebCore::setJSTestObjConditionalAttr5Constructor):
(WebCore::setJSTestObjConditionalAttr6Constructor):
(WebCore::setJSTestObjAnyAttribute):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::setJSTestObjStrawberry):
(WebCore::setJSTestObjStrictFloat):
(WebCore::setJSTestObjId):
(WebCore::setJSTestObjReplaceableAttribute):
(WebCore::setJSTestObjNullableLongSettableAttribute):
(WebCore::setJSTestObjNullableStringValue):
(WebCore::setJSTestObjAttributeWithReservedEnumType):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::setJSTestSerializedScriptValueInterfaceValue):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::setJSTestTypedefsUnsignedLongLongAttr):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
(WebCore::setJSTestTypedefsAttrWithGetterException):
(WebCore::setJSTestTypedefsAttrWithSetterException):
(WebCore::setJSTestTypedefsStringAttrWithGetterException):
(WebCore::setJSTestTypedefsStringAttrWithSetterException):
* bindings/scripts/test/JS/JSTestTypedefs.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookuph">trunk/Source/JavaScriptCore/runtime/Lookup.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</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="#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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/JavaScriptCore/ChangeLog        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-12-23  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Update custom setter implementations to perform type checks
+        https://bugs.webkit.org/show_bug.cgi?id=126171
+
+        Reviewed by Daniel Bates.
+
+        Modify the setter function signature to take encoded values
+        as we're changing the setter usage everywhere anyway.
+
+        * runtime/Lookup.h:
+        (JSC::putEntry):
+
</ins><span class="cx"> 2013-12-23  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;rdar://problem/15682948&gt; Update copyright strings
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookuph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.h (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.h        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.h        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     // FIXME: There is no reason this get function can't be simpler.
</span><span class="cx">     // ie. typedef JSValue (*GetFunction)(ExecState*, JSObject* baseObject)
</span><span class="cx">     typedef PropertySlot::GetValueFunc GetFunction;
</span><del>-    typedef void (*PutFunction)(ExecState*, JSObject* baseObject, JSValue value);
</del><ins>+    typedef void (*PutFunction)(ExecState*, EncodedJSValue base, EncodedJSValue value);
</ins><span class="cx"> 
</span><span class="cx">     class HashEntry {
</span><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx">         if (entry-&gt;attributes() &amp; Function)
</span><span class="cx">             thisObj-&gt;putDirect(exec-&gt;vm(), propertyName, value);
</span><span class="cx">         else if (!(entry-&gt;attributes() &amp; ReadOnly))
</span><del>-            entry-&gt;propertyPutter()(exec, thisObj, value);
</del><ins>+            entry-&gt;propertyPutter()(exec, JSValue::encode(thisObj), JSValue::encode(value));
</ins><span class="cx">         else if (shouldThrow)
</span><span class="cx">             throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/ChangeLog        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -1,3 +1,94 @@
</span><ins>+2013-12-23  Oliver Hunt  &lt;oliver@apple.com&gt;
+
+        Update custom setter implementations to perform type checks
+        https://bugs.webkit.org/show_bug.cgi?id=126171
+
+        Reviewed by Daniel Bates.
+
+        Update the bindings code generator for setters so that they perform a real
+        type check.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateAttributeEventListenerCall):
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
+        (WebCore::setJSTestInterfaceImplementsStr2):
+        (WebCore::setJSTestInterfaceImplementsStr3):
+        (WebCore::setJSTestInterfaceImplementsNode):
+        (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
+        (WebCore::setJSTestInterfaceSupplementalStr2):
+        (WebCore::setJSTestInterfaceSupplementalStr3):
+        (WebCore::setJSTestInterfaceSupplementalNode):
+        * bindings/scripts/test/JS/JSTestInterface.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::setJSTestObjConstructorStaticStringAttr):
+        (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
+        (WebCore::setJSTestObjEnumAttr):
+        (WebCore::setJSTestObjByteAttr):
+        (WebCore::setJSTestObjOctetAttr):
+        (WebCore::setJSTestObjShortAttr):
+        (WebCore::setJSTestObjUnsignedShortAttr):
+        (WebCore::setJSTestObjLongAttr):
+        (WebCore::setJSTestObjLongLongAttr):
+        (WebCore::setJSTestObjUnsignedLongLongAttr):
+        (WebCore::setJSTestObjStringAttr):
+        (WebCore::setJSTestObjTestObjAttr):
+        (WebCore::setJSTestObjXMLObjAttr):
+        (WebCore::setJSTestObjCreate):
+        (WebCore::setJSTestObjReflectedStringAttr):
+        (WebCore::setJSTestObjReflectedIntegralAttr):
+        (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
+        (WebCore::setJSTestObjReflectedBooleanAttr):
+        (WebCore::setJSTestObjReflectedURLAttr):
+        (WebCore::setJSTestObjReflectedCustomIntegralAttr):
+        (WebCore::setJSTestObjReflectedCustomBooleanAttr):
+        (WebCore::setJSTestObjReflectedCustomURLAttr):
+        (WebCore::setJSTestObjTypedArrayAttr):
+        (WebCore::setJSTestObjAttrWithGetterException):
+        (WebCore::setJSTestObjAttrWithSetterException):
+        (WebCore::setJSTestObjStringAttrWithGetterException):
+        (WebCore::setJSTestObjStringAttrWithSetterException):
+        (WebCore::setJSTestObjCustomAttr):
+        (WebCore::setJSTestObjWithScriptStateAttribute):
+        (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
+        (WebCore::setJSTestObjWithScriptStateAttributeRaises):
+        (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
+        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
+        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
+        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
+        (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
+        (WebCore::setJSTestObjConditionalAttr1):
+        (WebCore::setJSTestObjConditionalAttr2):
+        (WebCore::setJSTestObjConditionalAttr3):
+        (WebCore::setJSTestObjConditionalAttr4Constructor):
+        (WebCore::setJSTestObjConditionalAttr5Constructor):
+        (WebCore::setJSTestObjConditionalAttr6Constructor):
+        (WebCore::setJSTestObjAnyAttribute):
+        (WebCore::setJSTestObjMutablePoint):
+        (WebCore::setJSTestObjImmutablePoint):
+        (WebCore::setJSTestObjStrawberry):
+        (WebCore::setJSTestObjStrictFloat):
+        (WebCore::setJSTestObjId):
+        (WebCore::setJSTestObjReplaceableAttribute):
+        (WebCore::setJSTestObjNullableLongSettableAttribute):
+        (WebCore::setJSTestObjNullableStringValue):
+        (WebCore::setJSTestObjAttributeWithReservedEnumType):
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        (WebCore::setJSTestSerializedScriptValueInterfaceValue):
+        (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
+        (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
+        (WebCore::setJSTestTypedefsAttrWithGetterException):
+        (WebCore::setJSTestTypedefsAttrWithSetterException):
+        (WebCore::setJSTestTypedefsStringAttrWithGetterException):
+        (WebCore::setJSTestTypedefsStringAttrWithSetterException):
+        * bindings/scripts/test/JS/JSTestTypedefs.h:
+
</ins><span class="cx"> 2013-12-23  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;rdar://problem/15682948&gt; Update copyright strings
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">     my $implSetterFunctionName = shift;
</span><span class="cx">     my $windowEventListener = shift;
</span><span class="cx"> 
</span><del>-    my $wrapperObject = $windowEventListener ? &quot;globalObject&quot; : &quot;thisObject&quot;;
</del><ins>+    my $wrapperObject = $windowEventListener ? &quot;globalObject&quot; : &quot;castedThis&quot;;
</ins><span class="cx">     my @GenerateEventListenerImpl = ();
</span><span class="cx"> 
</span><span class="cx">     if ($className eq &quot;JSSVGElementInstance&quot;) {
</span><span class="lines">@@ -1063,7 +1063,7 @@
</span><span class="cx">             push(@headerContent, &quot;JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n&quot;);
</span><span class="cx">             if (!IsReadonly($attribute)) {
</span><span class="cx">                 my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
</span><del>-                push(@headerContent, &quot;void ${setter}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);\n&quot;);
</del><ins>+                push(@headerContent, &quot;void ${setter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n&quot;);
</ins><span class="cx">             }
</span><span class="cx">             push(@headerContent, &quot;#endif\n&quot;) if $conditionalString;
</span><span class="cx">         }
</span><span class="lines">@@ -1075,7 +1075,7 @@
</span><span class="cx"> 
</span><span class="cx">         if ($interface-&gt;extendedAttributes-&gt;{&quot;ReplaceableConstructor&quot;}) {
</span><span class="cx">             my $constructorFunctionName = &quot;setJS&quot; . $interfaceName . &quot;Constructor&quot;;
</span><del>-            push(@headerContent, &quot;void ${constructorFunctionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);\n&quot;);
</del><ins>+            push(@headerContent, &quot;void ${constructorFunctionName}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n&quot;);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2152,28 +2152,33 @@
</span><span class="cx">                         my $attributeConditionalString = $codeGenerator-&gt;GenerateConditionalString($attribute-&gt;signature);
</span><span class="cx">                         push(@implContent, &quot;#if ${attributeConditionalString}\n&quot;) if $attributeConditionalString;
</span><span class="cx"> 
</span><del>-                        push(@implContent, &quot;void ${putFunctionName}(ExecState* exec, JSObject*&quot;);
-                        push(@implContent, &quot; thisObject&quot;) if !$attribute-&gt;isStatic;
-                        push(@implContent, &quot;, JSValue value)\n&quot;);
</del><ins>+                        push(@implContent, &quot;void ${putFunctionName}(ExecState* exec, EncodedJSValue&quot;);
+                        push(@implContent, &quot; thisValue&quot;) if !$attribute-&gt;isStatic;
+                        push(@implContent, &quot;, EncodedJSValue encodedValue)\n&quot;);
</ins><span class="cx">                         push(@implContent, &quot;{\n&quot;);
</span><del>-
</del><ins>+                        push(@implContent, &quot;    JSValue value = JSValue::decode(encodedValue);\n&quot;);
</ins><span class="cx">                         push(@implContent, &quot;    UNUSED_PARAM(exec);\n&quot;);
</span><del>-
</del><ins>+                        if (!$attribute-&gt;isStatic) {
+                            push(@implContent, &quot;    ${className}* castedThis = jsDynamicCast&lt;${className}*&gt;(JSValue::decode(thisValue));\n&quot;);
+                            push(@implContent, &quot;    if (!castedThis) {\n&quot;);
+                            push(@implContent, &quot;        throwVMTypeError(exec);\n&quot;);
+                            push(@implContent, &quot;        return;\n&quot;);
+                            push(@implContent, &quot;    }\n&quot;);
+                        }
</ins><span class="cx">                         if ($interface-&gt;extendedAttributes-&gt;{&quot;CheckSecurity&quot;} &amp;&amp; !$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DoNotCheckSecurity&quot;}) {
</span><span class="cx">                             if ($interfaceName eq &quot;DOMWindow&quot;) {
</span><del>-                                push(@implContent, &quot;    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast&lt;$className*&gt;(thisObject)-&gt;impl()))\n&quot;);
</del><ins>+                                push(@implContent, &quot;    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast&lt;$className*&gt;(castedThis)-&gt;impl()))\n&quot;);
</ins><span class="cx">                             } else {
</span><del>-                                push(@implContent, &quot;    if (!shouldAllowAccessToFrame(exec, jsCast&lt;$className*&gt;(thisObject)-&gt;impl().frame()))\n&quot;);
</del><ins>+                                push(@implContent, &quot;    if (!shouldAllowAccessToFrame(exec, jsCast&lt;$className*&gt;(castedThis)-&gt;impl().frame()))\n&quot;);
</ins><span class="cx">                             }
</span><span class="cx">                             push(@implContent, &quot;        return;\n&quot;);
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (HasCustomSetter($attribute-&gt;signature-&gt;extendedAttributes)) {
</span><del>-                            push(@implContent, &quot;    jsCast&lt;$className*&gt;(thisObject)-&gt;set$implSetterFunctionName(exec, value);\n&quot;);
</del><ins>+                            push(@implContent, &quot;    castedThis-&gt;set$implSetterFunctionName(exec, value);\n&quot;);
</ins><span class="cx">                         } elsif ($type eq &quot;EventListener&quot;) {
</span><span class="cx">                             $implIncludes{&quot;JSEventListener.h&quot;} = 1;
</span><span class="cx">                             push(@implContent, &quot;    UNUSED_PARAM(exec);\n&quot;);
</span><del>-                            push(@implContent, &quot;    ${className}* castedThis = jsCast&lt;${className}*&gt;(thisObject);\n&quot;);
</del><span class="cx">                             my $windowEventListener = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;JSWindowEventListener&quot;};
</span><span class="cx">                             if ($windowEventListener) {
</span><span class="cx">                                 push(@implContent, &quot;    JSDOMGlobalObject* globalObject = castedThis-&gt;globalObject();\n&quot;);
</span><span class="lines">@@ -2181,7 +2186,7 @@
</span><span class="cx">                             push(@implContent, &quot;    $interfaceName&amp; impl = castedThis-&gt;impl();\n&quot;);
</span><span class="cx">                             if ((($interfaceName eq &quot;DOMWindow&quot;) or ($interfaceName eq &quot;WorkerGlobalScope&quot;)) and $name eq &quot;onerror&quot;) {
</span><span class="cx">                                 $implIncludes{&quot;JSErrorHandler.h&quot;} = 1;
</span><del>-                                push(@implContent, &quot;    impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, thisObject));\n&quot;);
</del><ins>+                                push(@implContent, &quot;    impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, castedThis));\n&quot;);
</ins><span class="cx">                             } else {
</span><span class="cx">                                 push(@implContent, GenerateAttributeEventListenerCall($className, $implSetterFunctionName, $windowEventListener));
</span><span class="cx">                             }
</span><span class="lines">@@ -2197,16 +2202,15 @@
</span><span class="cx">                             push(@implContent, &quot;    // Shadowing a built-in constructor\n&quot;);
</span><span class="cx">                             if ($interfaceName eq &quot;DOMWindow&quot; &amp;&amp; $className eq &quot;JSblah&quot;) {
</span><span class="cx">                                 # FIXME: This branch never executes and should be removed.
</span><del>-                                push(@implContent, &quot;    jsCast&lt;$className*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), exec-&gt;propertyNames().constructor, value);\n&quot;);
</del><ins>+                                push(@implContent, &quot;    castedThis-&gt;putDirect(exec-&gt;vm(), exec-&gt;propertyNames().constructor, value);\n&quot;);
</ins><span class="cx">                             } else {
</span><del>-                                push(@implContent, &quot;    jsCast&lt;$className*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, \&quot;$name\&quot;), value);\n&quot;);
</del><ins>+                                push(@implContent, &quot;    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, \&quot;$name\&quot;), value);\n&quot;);
</ins><span class="cx">                             }
</span><span class="cx">                         } elsif ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Replaceable&quot;}) {
</span><span class="cx">                             push(@implContent, &quot;    // Shadowing a built-in object\n&quot;);
</span><del>-                            push(@implContent, &quot;    jsCast&lt;$className*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, \&quot;$name\&quot;), value);\n&quot;);
</del><ins>+                            push(@implContent, &quot;    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, \&quot;$name\&quot;), value);\n&quot;);
</ins><span class="cx">                         } else {
</span><span class="cx">                             if (!$attribute-&gt;isStatic) {
</span><del>-                                push(@implContent, &quot;    $className* castedThis = jsCast&lt;$className*&gt;(thisObject);\n&quot;);
</del><span class="cx">                                 push(@implContent, &quot;    $implType&amp; impl = castedThis-&gt;impl();\n&quot;);
</span><span class="cx">                             }
</span><span class="cx">                             push(@implContent, &quot;    ExceptionCode ec = 0;\n&quot;) if $setterRaisesException;
</span><span class="lines">@@ -2304,13 +2308,19 @@
</span><span class="cx">         if ($interface-&gt;extendedAttributes-&gt;{&quot;ReplaceableConstructor&quot;}) {
</span><span class="cx">             my $constructorFunctionName = &quot;setJS&quot; . $interfaceName . &quot;Constructor&quot;;
</span><span class="cx"> 
</span><del>-            push(@implContent, &quot;void ${constructorFunctionName}(ExecState* exec, JSObject* thisObject, JSValue value)\n&quot;);
</del><ins>+            push(@implContent, &quot;void ${constructorFunctionName}(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;{\n&quot;);
</span><ins>+            push(@implContent, &quot;    JSValue value = JSValue::decode(encodedValue);&quot;);
+            push(@implContent, &quot;    ${className}* castedThis = jsDynamicCast&lt;${className}*&gt;(JSValue::decode(thisValue));\n&quot;);
+            push(@implContent, &quot;    if (!castedThis) {\n&quot;);
+            push(@implContent, &quot;        throwVMTypeError(exec);\n&quot;);
+            push(@implContent, &quot;        return;\n&quot;);
+            push(@implContent, &quot;    }\n&quot;);
</ins><span class="cx">             if ($interface-&gt;extendedAttributes-&gt;{&quot;CheckSecurity&quot;}) {
</span><span class="cx">                 if ($interfaceName eq &quot;DOMWindow&quot;) {
</span><del>-                    push(@implContent, &quot;    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast&lt;$className*&gt;(thisObject)-&gt;impl()))\n&quot;);
</del><ins>+                    push(@implContent, &quot;    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis-&gt;impl()))\n&quot;);
</ins><span class="cx">                 } else {
</span><del>-                    push(@implContent, &quot;    if (!shouldAllowAccessToFrame(exec, jsCast&lt;$className*&gt;(thisObject)-&gt;impl().frame()))\n&quot;);
</del><ins>+                    push(@implContent, &quot;    if (!shouldAllowAccessToFrame(exec, castedThis-&gt;impl().frame()))\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx">                 push(@implContent, &quot;        return;\n&quot;);
</span><span class="cx">             }
</span><span class="lines">@@ -2318,7 +2328,7 @@
</span><span class="cx">             push(@implContent, &quot;    // Shadowing a built-in constructor\n&quot;);
</span><span class="cx"> 
</span><span class="cx">             if ($interfaceName eq &quot;DOMWindow&quot;) {
</span><del>-                push(@implContent, &quot;    jsCast&lt;$className*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), exec-&gt;propertyNames().constructor, value);\n&quot;);
</del><ins>+                push(@implContent, &quot;    castedThis-&gt;putDirect(exec-&gt;vm(), exec-&gt;propertyNames().constructor, value);\n&quot;);
</ins><span class="cx">             } else {
</span><span class="cx">                 die &quot;No way to handle interface with ReplaceableConstructor extended attribute: $interfaceName&quot;;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -462,8 +462,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><del>-void setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, JSObject*, JSValue value)
</del><ins>+void setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -474,10 +475,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><del>-void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceImplementsStr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestInterface* castedThis = jsCast&lt;JSTestInterface*&gt;(thisObject);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -488,19 +494,30 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><del>-void setJSTestInterfaceImplementsStr3(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceImplementsStr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    jsCast&lt;JSTestInterface*&gt;(thisObject)-&gt;setImplementsStr3(exec, value);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
+    castedThis-&gt;setImplementsStr3(exec, value);
</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>-void setJSTestInterfaceImplementsNode(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestInterface* castedThis = jsCast&lt;JSTestInterface*&gt;(thisObject);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     Node* nativeValue(toNode(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -511,8 +528,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><del>-void setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, JSObject*, JSValue value)
</del><ins>+void setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -523,10 +541,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><del>-void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestInterface* castedThis = jsCast&lt;JSTestInterface*&gt;(thisObject);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -537,19 +560,30 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><del>-void setJSTestInterfaceSupplementalStr3(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceSupplementalStr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    jsCast&lt;JSTestInterface*&gt;(thisObject)-&gt;setSupplementalStr3(exec, value);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
+    castedThis-&gt;setSupplementalStr3(exec, value);
</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>-void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestInterface* castedThis = jsCast&lt;JSTestInterface*&gt;(thisObject);
</del><ins>+    JSTestInterface* castedThis = jsDynamicCast&lt;JSTestInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     Node* nativeValue(toNode(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -202,44 +202,44 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceImplementsStr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceImplementsStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceImplementsStr2(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceImplementsStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceImplementsStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceImplementsStr3(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceImplementsStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceImplementsNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceImplementsNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceImplementsNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceSupplementalStr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12)
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceSupplementalNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> JSC::EncodedJSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> // Constants
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -1322,8 +1322,9 @@
</span><span class="cx">     lookupPut&lt;JSTestObj, Base&gt;(exec, propertyName, value, JSTestObjTable, thisObject, slot);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void setJSTestObjConstructorStaticStringAttr(ExecState* exec, JSObject*, JSValue value)
</del><ins>+void setJSTestObjConstructorStaticStringAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1332,18 +1333,29 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     // Shadowing a built-in constructor
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;TestSubObjEnabledBySetting&quot;), value);
</del><ins>+    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;TestSubObjEnabledBySetting&quot;), value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjEnumAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjEnumAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1354,10 +1366,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjByteAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjByteAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int8_t nativeValue(toInt8(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1366,10 +1383,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjOctetAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjOctetAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1378,10 +1400,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjShortAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int16_t nativeValue(toInt16(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1390,10 +1417,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjUnsignedShortAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     uint16_t nativeValue(toUInt16(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1402,10 +1434,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1414,10 +1451,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     long long nativeValue(toInt64(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1426,10 +1468,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjUnsignedLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1438,10 +1485,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1450,10 +1502,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjTestObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjTestObjAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1462,10 +1519,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjXMLObjAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1474,10 +1536,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjCreate(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjCreate(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     bool nativeValue(value.toBoolean(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1486,10 +1553,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(valueToStringWithNullCheck(exec, value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1498,10 +1570,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1510,10 +1587,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     unsigned nativeValue(toUInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1522,10 +1604,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedBooleanAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     bool nativeValue(value.toBoolean(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1534,10 +1621,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedURLAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(valueToStringWithNullCheck(exec, value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1546,10 +1638,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(valueToStringWithNullCheck(exec, value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1558,10 +1655,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1570,10 +1672,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     bool nativeValue(value.toBoolean(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1582,10 +1689,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReflectedCustomURLAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(valueToStringWithNullCheck(exec, value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1594,10 +1706,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjTypedArrayAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     RefPtr&lt;Float32Array&gt; nativeValue(toFloat32Array(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1606,10 +1723,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1618,10 +1740,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="lines">@@ -1632,10 +1759,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjStringAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1644,10 +1776,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjStringAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="lines">@@ -1658,17 +1795,28 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjCustomAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjCustomAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;setCustomAttr(exec, value);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
+    castedThis-&gt;setCustomAttr(exec, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptStateAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1677,10 +1825,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1692,10 +1845,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1704,10 +1862,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1719,10 +1882,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1734,10 +1902,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1749,10 +1922,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1764,10 +1942,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     TestObj* nativeValue(toTestObj(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1777,10 +1960,15 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><del>-void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr1(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1791,10 +1979,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
</span><del>-void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1805,10 +1998,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><del>-void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1819,39 +2017,62 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><del>-void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr4Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     // Shadowing a built-in constructor
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr4&quot;), value);
</del><ins>+    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr4&quot;), value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
</span><del>-void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr5Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     // Shadowing a built-in constructor
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr5&quot;), value);
</del><ins>+    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr5&quot;), value);
</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><del>-void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjConditionalAttr6Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     // Shadowing a built-in constructor
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr6&quot;), value);
</del><ins>+    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;conditionalAttr6&quot;), value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void setJSTestObjAnyAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjAnyAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     Deprecated::ScriptValue nativeValue(exec-&gt;vm(), value);
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1860,10 +2081,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjMutablePoint(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjMutablePoint(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     SVGPropertyTearOff&lt;SVGPoint&gt;* nativeValue(toSVGPoint(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1872,10 +2098,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjImmutablePoint(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjImmutablePoint(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     SVGPropertyTearOff&lt;SVGPoint&gt;* nativeValue(toSVGPoint(value));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1884,10 +2115,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjStrawberry(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjStrawberry(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1896,10 +2132,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjStrictFloat(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjStrictFloat(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     float nativeValue(value.toFloat(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1908,10 +2149,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjId(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjId(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1920,18 +2166,29 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjReplaceableAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjReplaceableAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     // Shadowing a built-in object
</span><del>-    jsCast&lt;JSTestObj*&gt;(thisObject)-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;replaceableAttribute&quot;), value);
</del><ins>+    castedThis-&gt;putDirect(exec-&gt;vm(), Identifier(exec, &quot;replaceableAttribute&quot;), value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjNullableLongSettableAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1940,10 +2197,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjNullableStringValue(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjNullableStringValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -1952,10 +2214,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestObj* castedThis = jsCast&lt;JSTestObj*&gt;(thisObject);
</del><ins>+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestObj&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -239,134 +239,134 @@
</span><span class="cx"> JSC::EncodedJSValue jsTestObjReadOnlyTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjEnumAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjByteAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjOctetAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(Condition1) || ENABLE(Condition2)
</span><span class="cx"> JSC::EncodedJSValue jsTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> #endif
</span><span class="cx"> JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjAnyAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjContentDocument(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjMutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjImmutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjStrawberry(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjStrictFloat(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjStrictFloat(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjStrictFloat(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjDescription(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjNullableDoubleAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjNullableLongAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjNullableBooleanAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> // Constants
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -215,10 +215,15 @@
</span><span class="cx">     lookupPut&lt;JSTestSerializedScriptValueInterface, Base&gt;(exec, propertyName, value, JSTestSerializedScriptValueInterfaceTable, thisObject, slot);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestSerializedScriptValueInterface* castedThis = jsCast&lt;JSTestSerializedScriptValueInterface*&gt;(thisObject);
</del><ins>+    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast&lt;JSTestSerializedScriptValueInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestSerializedScriptValueInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     RefPtr&lt;SerializedScriptValue&gt; nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -227,10 +232,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestSerializedScriptValueInterface* castedThis = jsCast&lt;JSTestSerializedScriptValueInterface*&gt;(thisObject);
</del><ins>+    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast&lt;JSTestSerializedScriptValueInterface*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestSerializedScriptValueInterface&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     RefPtr&lt;SerializedScriptValue&gt; nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -147,10 +147,10 @@
</span><span class="cx"> // Attributes
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -281,10 +281,15 @@
</span><span class="cx">     lookupPut&lt;JSTestTypedefs, Base&gt;(exec, propertyName, value, JSTestTypedefsTable, thisObject, slot);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -293,10 +298,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     RefPtr&lt;SerializedScriptValue&gt; nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -305,10 +315,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -317,10 +332,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     int nativeValue(toInt32(exec, value, NormalConversion));
</span><span class="lines">@@ -331,10 +351,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -343,10 +368,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value)
</del><ins>+void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
</ins><span class="cx"> {
</span><ins>+    JSValue value = JSValue::decode(encodedValue);
</ins><span class="cx">     UNUSED_PARAM(exec);
</span><del>-    JSTestTypedefs* castedThis = jsCast&lt;JSTestTypedefs*&gt;(thisObject);
</del><ins>+    JSTestTypedefs* castedThis = jsDynamicCast&lt;JSTestTypedefs*&gt;(JSValue::decode(thisValue));
+    if (!castedThis) {
+        throwVMTypeError(exec);
+        return;
+    }
</ins><span class="cx">     TestTypedefs&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     const String&amp; nativeValue(value.isEmpty() ? String() : value.toString(exec)-&gt;value(exec));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h (161008 => 161009)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2013-12-23 19:43:08 UTC (rev 161008)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h        2013-12-23 19:51:38 UTC (rev 161009)
</span><span class="lines">@@ -156,18 +156,18 @@
</span><span class="cx"> // Attributes
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> JSC::EncodedJSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><del>-void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
</del><ins>+void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</ins><span class="cx"> JSC::EncodedJSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>