Changeset 160879 in webkit


Ignore:
Timestamp:
Dec 19, 2013 4:52:06 PM (10 years ago)
Author:
oliver@apple.com
Message:

DOM bindings should use thisValue for attributes
https://bugs.webkit.org/show_bug.cgi?id=126011

Reviewed by Antti Koivisto.

Source/WebCore:

Make all standard DOM attributes use the thisValue instead
of the slot object. This requires using a dynamic cast in
the attribute getters. Happily for normal uses this a single
indirect load and pointer compare, and we were already doing
it for many attributes.

Alas it's too expensive to do this on the window object still
due to the proxy indirection that intercepts global variable
access. I'll correct this in a follow on patch (bug 126013).

A number of custom getters have also been updated to use the
thisValue and full type checks.

This patch still leaves the index and generic named getters
on the slot based model as fixing these cases requires more
complicated changes.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
(WebCore::cssPropertyGetterCallback):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementPropertyGetter):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::jsTestActiveDOMObjectExcitingAttr):
(WebCore::jsTestActiveDOMObjectConstructor):

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:

(WebCore::jsTestCustomNamedGetterConstructor):

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::jsTestEventConstructorAttr1):
(WebCore::jsTestEventConstructorAttr2):
(WebCore::jsTestEventConstructorConstructor):

  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::jsTestEventTargetConstructor):

  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::jsTestExceptionName):
(WebCore::jsTestExceptionConstructor):

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::jsTestGenerateIsReachableConstructor):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
(WebCore::jsTestInterfaceImplementsStr1):
(WebCore::jsTestInterfaceImplementsStr2):
(WebCore::jsTestInterfaceImplementsStr3):
(WebCore::jsTestInterfaceImplementsNode):
(WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::jsTestInterfaceSupplementalStr1):
(WebCore::jsTestInterfaceSupplementalStr2):
(WebCore::jsTestInterfaceSupplementalStr3):
(WebCore::jsTestInterfaceSupplementalNode):
(WebCore::jsTestInterfaceConstructor):

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::jsTestMediaQueryListListenerConstructor):

  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::jsTestNamedConstructorConstructor):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::jsTestNodeConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjReadOnlyLongAttr):
(WebCore::jsTestObjReadOnlyStringAttr):
(WebCore::jsTestObjReadOnlyTestObjAttr):
(WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
(WebCore::jsTestObjConstructorStaticStringAttr):
(WebCore::jsTestObjConstructorTestSubObj):
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::jsTestObjEnumAttr):
(WebCore::jsTestObjByteAttr):
(WebCore::jsTestObjOctetAttr):
(WebCore::jsTestObjShortAttr):
(WebCore::jsTestObjUnsignedShortAttr):
(WebCore::jsTestObjLongAttr):
(WebCore::jsTestObjLongLongAttr):
(WebCore::jsTestObjUnsignedLongLongAttr):
(WebCore::jsTestObjStringAttr):
(WebCore::jsTestObjTestObjAttr):
(WebCore::jsTestObjXMLObjAttr):
(WebCore::jsTestObjCreate):
(WebCore::jsTestObjReflectedStringAttr):
(WebCore::jsTestObjReflectedIntegralAttr):
(WebCore::jsTestObjReflectedUnsignedIntegralAttr):
(WebCore::jsTestObjReflectedBooleanAttr):
(WebCore::jsTestObjReflectedURLAttr):
(WebCore::jsTestObjReflectedCustomIntegralAttr):
(WebCore::jsTestObjReflectedCustomBooleanAttr):
(WebCore::jsTestObjReflectedCustomURLAttr):
(WebCore::jsTestObjTypedArrayAttr):
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjAttrWithSetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithSetterException):
(WebCore::jsTestObjCustomAttr):
(WebCore::jsTestObjWithScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAttribute):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::jsTestObjConditionalAttr1):
(WebCore::jsTestObjConditionalAttr2):
(WebCore::jsTestObjConditionalAttr3):
(WebCore::jsTestObjConditionalAttr4Constructor):
(WebCore::jsTestObjConditionalAttr5Constructor):
(WebCore::jsTestObjConditionalAttr6Constructor):
(WebCore::jsTestObjCachedAttribute1):
(WebCore::jsTestObjCachedAttribute2):
(WebCore::jsTestObjAnyAttribute):
(WebCore::jsTestObjContentDocument):
(WebCore::jsTestObjMutablePoint):
(WebCore::jsTestObjImmutablePoint):
(WebCore::jsTestObjStrawberry):
(WebCore::jsTestObjStrictFloat):
(WebCore::jsTestObjDescription):
(WebCore::jsTestObjId):
(WebCore::jsTestObjHash):
(WebCore::jsTestObjReplaceableAttribute):
(WebCore::jsTestObjNullableDoubleAttribute):
(WebCore::jsTestObjNullableLongAttribute):
(WebCore::jsTestObjNullableBooleanAttribute):
(WebCore::jsTestObjNullableStringAttribute):
(WebCore::jsTestObjNullableLongSettableAttribute):
(WebCore::jsTestObjNullableStringValue):
(WebCore::jsTestObjAttribute):
(WebCore::jsTestObjAttributeWithReservedEnumType):
(WebCore::jsTestObjConstructor):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::jsTestOverloadedConstructorsConstructor):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::jsTestSerializedScriptValueInterfaceValue):
(WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
(WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
(WebCore::jsTestSerializedScriptValueInterfacePorts):
(WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
(WebCore::jsTestSerializedScriptValueInterfaceConstructor):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::jsTestTypedefsUnsignedLongLongAttr):
(WebCore::jsTestTypedefsImmutableSerializedScriptValue):
(WebCore::jsTestTypedefsConstructorTestSubObj):
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsAttrWithSetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithSetterException):
(WebCore::jsTestTypedefsConstructor):

  • bindings/scripts/test/JS/JSattribute.cpp:

(WebCore::jsattributeReadonly):
(WebCore::jsattributeConstructor):

  • bindings/scripts/test/JS/JSreadonly.cpp:

(WebCore::jsreadonlyConstructor):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::lengthGetter):

  • bridge/runtime_method.cpp:

(JSC::RuntimeMethod::lengthGetter):

LayoutTests:

  • js/dom/dom-attributes-on-mismatch-type.html: Added.
  • js/dom/dom-attributes-on-mismatch-type-expected.txt: Added.
Location:
trunk
Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r160876 r160879  
     12013-12-19  Oliver Hunt  <oliver@apple.com>
     2
     3        DOM bindings should use thisValue for attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=126011
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * js/dom/dom-attributes-on-mismatch-type.html: Added.
     9        * js/dom/dom-attributes-on-mismatch-type-expected.txt: Added.
     10
    1112013-12-19  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r160877 r160879  
     12013-12-19  Oliver Hunt  <oliver@apple.com>
     2
     3        DOM bindings should use thisValue for attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=126011
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Make all standard DOM attributes use the thisValue instead
     9        of the slot object.  This requires using a dynamic cast in
     10        the attribute getters. Happily for normal uses this a single
     11        indirect load and pointer compare, and we were already doing
     12        it for many attributes.
     13
     14        Alas it's too expensive to do this on the window object still
     15        due to the proxy indirection that intercepts global variable
     16        access.  I'll correct this in a follow on patch (bug 126013).
     17
     18        A number of custom getters have also been updated to use the
     19        thisValue and full type checks.
     20
     21        This patch still leaves the index and generic named getters
     22        on the slot based model as fixing these cases requires more
     23        complicated changes.
     24
     25        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
     26        (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
     27        (WebCore::cssPropertyGetterCallback):
     28        * bindings/js/JSPluginElementFunctions.cpp:
     29        (WebCore::pluginElementPropertyGetter):
     30        * bindings/scripts/CodeGeneratorJS.pm:
     31        (GenerateImplementation):
     32        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
     33        (WebCore::jsTestActiveDOMObjectExcitingAttr):
     34        (WebCore::jsTestActiveDOMObjectConstructor):
     35        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
     36        (WebCore::jsTestCustomNamedGetterConstructor):
     37        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
     38        (WebCore::jsTestEventConstructorAttr1):
     39        (WebCore::jsTestEventConstructorAttr2):
     40        (WebCore::jsTestEventConstructorConstructor):
     41        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
     42        (WebCore::jsTestEventTargetConstructor):
     43        * bindings/scripts/test/JS/JSTestException.cpp:
     44        (WebCore::jsTestExceptionName):
     45        (WebCore::jsTestExceptionConstructor):
     46        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
     47        (WebCore::jsTestGenerateIsReachableConstructor):
     48        * bindings/scripts/test/JS/JSTestInterface.cpp:
     49        (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
     50        (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
     51        (WebCore::jsTestInterfaceImplementsStr1):
     52        (WebCore::jsTestInterfaceImplementsStr2):
     53        (WebCore::jsTestInterfaceImplementsStr3):
     54        (WebCore::jsTestInterfaceImplementsNode):
     55        (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
     56        (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
     57        (WebCore::jsTestInterfaceSupplementalStr1):
     58        (WebCore::jsTestInterfaceSupplementalStr2):
     59        (WebCore::jsTestInterfaceSupplementalStr3):
     60        (WebCore::jsTestInterfaceSupplementalNode):
     61        (WebCore::jsTestInterfaceConstructor):
     62        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
     63        (WebCore::jsTestMediaQueryListListenerConstructor):
     64        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
     65        (WebCore::jsTestNamedConstructorConstructor):
     66        * bindings/scripts/test/JS/JSTestNode.cpp:
     67        (WebCore::jsTestNodeConstructor):
     68        * bindings/scripts/test/JS/JSTestObj.cpp:
     69        (WebCore::jsTestObjReadOnlyLongAttr):
     70        (WebCore::jsTestObjReadOnlyStringAttr):
     71        (WebCore::jsTestObjReadOnlyTestObjAttr):
     72        (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
     73        (WebCore::jsTestObjConstructorStaticStringAttr):
     74        (WebCore::jsTestObjConstructorTestSubObj):
     75        (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
     76        (WebCore::jsTestObjEnumAttr):
     77        (WebCore::jsTestObjByteAttr):
     78        (WebCore::jsTestObjOctetAttr):
     79        (WebCore::jsTestObjShortAttr):
     80        (WebCore::jsTestObjUnsignedShortAttr):
     81        (WebCore::jsTestObjLongAttr):
     82        (WebCore::jsTestObjLongLongAttr):
     83        (WebCore::jsTestObjUnsignedLongLongAttr):
     84        (WebCore::jsTestObjStringAttr):
     85        (WebCore::jsTestObjTestObjAttr):
     86        (WebCore::jsTestObjXMLObjAttr):
     87        (WebCore::jsTestObjCreate):
     88        (WebCore::jsTestObjReflectedStringAttr):
     89        (WebCore::jsTestObjReflectedIntegralAttr):
     90        (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
     91        (WebCore::jsTestObjReflectedBooleanAttr):
     92        (WebCore::jsTestObjReflectedURLAttr):
     93        (WebCore::jsTestObjReflectedCustomIntegralAttr):
     94        (WebCore::jsTestObjReflectedCustomBooleanAttr):
     95        (WebCore::jsTestObjReflectedCustomURLAttr):
     96        (WebCore::jsTestObjTypedArrayAttr):
     97        (WebCore::jsTestObjAttrWithGetterException):
     98        (WebCore::jsTestObjAttrWithSetterException):
     99        (WebCore::jsTestObjStringAttrWithGetterException):
     100        (WebCore::jsTestObjStringAttrWithSetterException):
     101        (WebCore::jsTestObjCustomAttr):
     102        (WebCore::jsTestObjWithScriptStateAttribute):
     103        (WebCore::jsTestObjWithScriptExecutionContextAttribute):
     104        (WebCore::jsTestObjWithScriptStateAttributeRaises):
     105        (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
     106        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
     107        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
     108        (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
     109        (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
     110        (WebCore::jsTestObjConditionalAttr1):
     111        (WebCore::jsTestObjConditionalAttr2):
     112        (WebCore::jsTestObjConditionalAttr3):
     113        (WebCore::jsTestObjConditionalAttr4Constructor):
     114        (WebCore::jsTestObjConditionalAttr5Constructor):
     115        (WebCore::jsTestObjConditionalAttr6Constructor):
     116        (WebCore::jsTestObjCachedAttribute1):
     117        (WebCore::jsTestObjCachedAttribute2):
     118        (WebCore::jsTestObjAnyAttribute):
     119        (WebCore::jsTestObjContentDocument):
     120        (WebCore::jsTestObjMutablePoint):
     121        (WebCore::jsTestObjImmutablePoint):
     122        (WebCore::jsTestObjStrawberry):
     123        (WebCore::jsTestObjStrictFloat):
     124        (WebCore::jsTestObjDescription):
     125        (WebCore::jsTestObjId):
     126        (WebCore::jsTestObjHash):
     127        (WebCore::jsTestObjReplaceableAttribute):
     128        (WebCore::jsTestObjNullableDoubleAttribute):
     129        (WebCore::jsTestObjNullableLongAttribute):
     130        (WebCore::jsTestObjNullableBooleanAttribute):
     131        (WebCore::jsTestObjNullableStringAttribute):
     132        (WebCore::jsTestObjNullableLongSettableAttribute):
     133        (WebCore::jsTestObjNullableStringValue):
     134        (WebCore::jsTestObjAttribute):
     135        (WebCore::jsTestObjAttributeWithReservedEnumType):
     136        (WebCore::jsTestObjConstructor):
     137        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
     138        (WebCore::jsTestOverloadedConstructorsConstructor):
     139        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
     140        (WebCore::jsTestSerializedScriptValueInterfaceValue):
     141        (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
     142        (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
     143        (WebCore::jsTestSerializedScriptValueInterfacePorts):
     144        (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
     145        (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
     146        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
     147        (WebCore::jsTestTypedefsUnsignedLongLongAttr):
     148        (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
     149        (WebCore::jsTestTypedefsConstructorTestSubObj):
     150        (WebCore::jsTestTypedefsAttrWithGetterException):
     151        (WebCore::jsTestTypedefsAttrWithSetterException):
     152        (WebCore::jsTestTypedefsStringAttrWithGetterException):
     153        (WebCore::jsTestTypedefsStringAttrWithSetterException):
     154        (WebCore::jsTestTypedefsConstructor):
     155        * bindings/scripts/test/JS/JSattribute.cpp:
     156        (WebCore::jsattributeReadonly):
     157        (WebCore::jsattributeConstructor):
     158        * bindings/scripts/test/JS/JSreadonly.cpp:
     159        (WebCore::jsreadonlyConstructor):
     160        * bridge/runtime_array.cpp:
     161        (JSC::RuntimeArray::lengthGetter):
     162        * bridge/runtime_method.cpp:
     163        (JSC::RuntimeMethod::lengthGetter):
     164
    11652013-12-19  Andy Estes  <aestes@apple.com>
    2166
  • trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp

    r160208 r160879  
    304304}
    305305
    306 static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)
    307 {
    308     return JSValue::encode(cssPropertyGetterPixelOrPosPrefix(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));
     306static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, unsigned propertyID)
     307{
     308    JSCSSStyleDeclaration* thisObject = jsDynamicCast<JSCSSStyleDeclaration*>(JSValue::decode(thisValue));
     309    if (!thisObject)
     310        return throwVMTypeError(exec);
     311    return JSValue::encode(cssPropertyGetterPixelOrPosPrefix(exec, thisObject, propertyID));
    309312}
    310313
     
    318321}
    319322
    320 static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)
    321 {
    322     return JSValue::encode(cssPropertyGetter(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));
     323static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, unsigned propertyID)
     324{
     325    JSCSSStyleDeclaration* thisObject = jsDynamicCast<JSCSSStyleDeclaration*>(JSValue::decode(thisValue));
     326    if (!thisObject)
     327        return throwVMTypeError(exec);
     328    return JSValue::encode(cssPropertyGetter(exec, thisObject, propertyID));
    323329}
    324330
  • trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp

    r160208 r160879  
    101101}
    102102   
    103 EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
     103EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName propertyName)
    104104{
    105     JSHTMLElement* element = jsCast<JSHTMLElement*>(JSValue::decode(slotBase));
    106     JSObject* scriptObject = pluginScriptObject(exec, element);
     105
     106    JSHTMLElement* thisObject = jsDynamicCast<JSHTMLElement*>(JSValue::decode(thisValue));
     107    if (!thisObject)
     108        return throwVMTypeError(exec);
     109    JSObject* scriptObject = pluginScriptObject(exec, thisObject);
    107110    if (!scriptObject)
    108111        return JSValue::encode(jsUndefined());
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r160793 r160879  
    18881888            push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
    18891889
    1890             push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)\n");
     1890            push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)\n");
    18911891            push(@implContent, "{\n");
    18921892
    18931893            if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
    1894                 push(@implContent, "    ${className}* castedThis = jsDynamicCast<$className*>(JSValue::decode(slotBase));\n");
     1894                if ($interfaceName eq "DOMWindow") {
     1895                    push(@implContent, "    ${className}* castedThis = jsCast<$className*>(JSValue::decode(slotBase));\n");
     1896                    push(@implContent, "    UNUSED_PARAM(thisValue);\n");
     1897                } else {
     1898                    push(@implContent, "    ${className}* castedThis = jsDynamicCast<$className*>(JSValue::decode(thisValue));\n");
     1899                    push(@implContent, "    UNUSED_PARAM(slotBase);\n");
     1900                    push(@implContent, "    if (!castedThis)\n");
     1901                    push(@implContent, "        return throwVMTypeError(exec);\n");
     1902                }
    18951903            } else {
     1904                push(@implContent, "    UNUSED_PARAM(thisValue);\n");
    18961905                push(@implContent, "    UNUSED_PARAM(slotBase);\n");
    18971906            }
     
    20592068            push(@implContent, "{\n");
    20602069            push(@implContent, "    ${className}* domObject = jsDynamicCast<$className*>(JSValue::decode(slotBase));\n");
     2070            push(@implContent, "    if (!domObject)\n");
     2071            push(@implContent, "        return throwVMTypeError(exec);\n");
    20612072
    20622073            if ($interface->extendedAttributes->{"CheckSecurity"}) {
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r160208 r160879  
    131131}
    132132
    133 EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    134 {
    135     JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(slotBase));
     133EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     134{
     135    JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
     136    UNUSED_PARAM(slotBase);
     137    if (!castedThis)
     138        return throwVMTypeError(exec);
    136139    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
    137140        return JSValue::encode(jsUndefined());
     
    146149{
    147150    JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(slotBase));
     151    if (!domObject)
     152        return throwVMTypeError(exec);
    148153    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, domObject->impl()))
    149154        return JSValue::encode(jsUndefined());
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r160208 r160879  
    148148{
    149149    JSTestCustomNamedGetter* domObject = jsDynamicCast<JSTestCustomNamedGetter*>(JSValue::decode(slotBase));
     150    if (!domObject)
     151        return throwVMTypeError(exec);
    150152    return JSValue::encode(JSTestCustomNamedGetter::getConstructor(exec->vm(), domObject->globalObject()));
    151153}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r160208 r160879  
    168168}
    169169
    170 EncodedJSValue jsTestEventConstructorAttr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    171 {
    172     JSTestEventConstructor* castedThis = jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(slotBase));
     170EncodedJSValue jsTestEventConstructorAttr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     171{
     172    JSTestEventConstructor* castedThis = jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(thisValue));
     173    UNUSED_PARAM(slotBase);
     174    if (!castedThis)
     175        return throwVMTypeError(exec);
    173176    UNUSED_PARAM(exec);
    174177    TestEventConstructor& impl = castedThis->impl();
     
    178181
    179182
    180 EncodedJSValue jsTestEventConstructorAttr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    181 {
    182     JSTestEventConstructor* castedThis = jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(slotBase));
     183EncodedJSValue jsTestEventConstructorAttr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     184{
     185    JSTestEventConstructor* castedThis = jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(thisValue));
     186    UNUSED_PARAM(slotBase);
     187    if (!castedThis)
     188        return throwVMTypeError(exec);
    183189    UNUSED_PARAM(exec);
    184190    TestEventConstructor& impl = castedThis->impl();
     
    191197{
    192198    JSTestEventConstructor* domObject = jsDynamicCast<JSTestEventConstructor*>(JSValue::decode(slotBase));
     199    if (!domObject)
     200        return throwVMTypeError(exec);
    193201    return JSValue::encode(JSTestEventConstructor::getConstructor(exec->vm(), domObject->globalObject()));
    194202}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r160208 r160879  
    173173{
    174174    JSTestEventTarget* domObject = jsDynamicCast<JSTestEventTarget*>(JSValue::decode(slotBase));
     175    if (!domObject)
     176        return throwVMTypeError(exec);
    175177    return JSValue::encode(JSTestEventTarget::getConstructor(exec->vm(), domObject->globalObject()));
    176178}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r160208 r160879  
    121121}
    122122
    123 EncodedJSValue jsTestExceptionName(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    124 {
    125     JSTestException* castedThis = jsDynamicCast<JSTestException*>(JSValue::decode(slotBase));
     123EncodedJSValue jsTestExceptionName(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     124{
     125    JSTestException* castedThis = jsDynamicCast<JSTestException*>(JSValue::decode(thisValue));
     126    UNUSED_PARAM(slotBase);
     127    if (!castedThis)
     128        return throwVMTypeError(exec);
    126129    UNUSED_PARAM(exec);
    127130    TestException& impl = castedThis->impl();
     
    134137{
    135138    JSTestException* domObject = jsDynamicCast<JSTestException*>(JSValue::decode(slotBase));
     139    if (!domObject)
     140        return throwVMTypeError(exec);
    136141    return JSValue::encode(JSTestException::getConstructor(exec->vm(), domObject->globalObject()));
    137142}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp

    r160208 r160879  
    121121{
    122122    JSTestGenerateIsReachable* domObject = jsDynamicCast<JSTestGenerateIsReachable*>(JSValue::decode(slotBase));
     123    if (!domObject)
     124        return throwVMTypeError(exec);
    123125    return JSValue::encode(JSTestGenerateIsReachable::getConstructor(exec->vm(), domObject->globalObject()));
    124126}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r160208 r160879  
    273273
    274274#if ENABLE(Condition22) || ENABLE(Condition23)
    275 EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    276 {
     275EncodedJSValue jsTestInterfaceConstructorImplementsStaticReadOnlyAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     276{
     277    UNUSED_PARAM(thisValue);
    277278    UNUSED_PARAM(slotBase);
    278279    UNUSED_PARAM(exec);
     
    284285
    285286#if ENABLE(Condition22) || ENABLE(Condition23)
    286 EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    287 {
     287EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     288{
     289    UNUSED_PARAM(thisValue);
    288290    UNUSED_PARAM(slotBase);
    289291    UNUSED_PARAM(exec);
     
    295297
    296298#if ENABLE(Condition22) || ENABLE(Condition23)
    297 EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    298 {
    299     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     299EncodedJSValue jsTestInterfaceImplementsStr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     300{
     301    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     302    UNUSED_PARAM(slotBase);
     303    if (!castedThis)
     304        return throwVMTypeError(exec);
    300305    UNUSED_PARAM(exec);
    301306    TestInterface& impl = castedThis->impl();
     
    307312
    308313#if ENABLE(Condition22) || ENABLE(Condition23)
    309 EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    310 {
    311     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     314EncodedJSValue jsTestInterfaceImplementsStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     315{
     316    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     317    UNUSED_PARAM(slotBase);
     318    if (!castedThis)
     319        return throwVMTypeError(exec);
    312320    UNUSED_PARAM(exec);
    313321    TestInterface& impl = castedThis->impl();
     
    319327
    320328#if ENABLE(Condition22) || ENABLE(Condition23)
    321 EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    322 {
    323     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     329EncodedJSValue jsTestInterfaceImplementsStr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     330{
     331    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     332    UNUSED_PARAM(slotBase);
     333    if (!castedThis)
     334        return throwVMTypeError(exec);
    324335    return JSValue::encode(castedThis->implementsStr3(exec));
    325336}
     
    328339
    329340#if ENABLE(Condition22) || ENABLE(Condition23)
    330 EncodedJSValue jsTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    331 {
    332     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     341EncodedJSValue jsTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     342{
     343    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     344    UNUSED_PARAM(slotBase);
     345    if (!castedThis)
     346        return throwVMTypeError(exec);
    333347    UNUSED_PARAM(exec);
    334348    TestInterface& impl = castedThis->impl();
     
    340354
    341355#if ENABLE(Condition11) || ENABLE(Condition12)
    342 EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    343 {
     356EncodedJSValue jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     357{
     358    UNUSED_PARAM(thisValue);
    344359    UNUSED_PARAM(slotBase);
    345360    UNUSED_PARAM(exec);
     
    351366
    352367#if ENABLE(Condition11) || ENABLE(Condition12)
    353 EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    354 {
     368EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     369{
     370    UNUSED_PARAM(thisValue);
    355371    UNUSED_PARAM(slotBase);
    356372    UNUSED_PARAM(exec);
     
    362378
    363379#if ENABLE(Condition11) || ENABLE(Condition12)
    364 EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    365 {
    366     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     380EncodedJSValue jsTestInterfaceSupplementalStr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     381{
     382    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     383    UNUSED_PARAM(slotBase);
     384    if (!castedThis)
     385        return throwVMTypeError(exec);
    367386    UNUSED_PARAM(exec);
    368387    TestInterface& impl = castedThis->impl();
     
    374393
    375394#if ENABLE(Condition11) || ENABLE(Condition12)
    376 EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    377 {
    378     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     395EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     396{
     397    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     398    UNUSED_PARAM(slotBase);
     399    if (!castedThis)
     400        return throwVMTypeError(exec);
    379401    UNUSED_PARAM(exec);
    380402    TestInterface& impl = castedThis->impl();
     
    386408
    387409#if ENABLE(Condition11) || ENABLE(Condition12)
    388 EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    389 {
    390     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     410EncodedJSValue jsTestInterfaceSupplementalStr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     411{
     412    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     413    UNUSED_PARAM(slotBase);
     414    if (!castedThis)
     415        return throwVMTypeError(exec);
    391416    return JSValue::encode(castedThis->supplementalStr3(exec));
    392417}
     
    395420
    396421#if ENABLE(Condition11) || ENABLE(Condition12)
    397 EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    398 {
    399     JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     422EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     423{
     424    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
     425    UNUSED_PARAM(slotBase);
     426    if (!castedThis)
     427        return throwVMTypeError(exec);
    400428    UNUSED_PARAM(exec);
    401429    TestInterface& impl = castedThis->impl();
     
    409437{
    410438    JSTestInterface* domObject = jsDynamicCast<JSTestInterface*>(JSValue::decode(slotBase));
     439    if (!domObject)
     440        return throwVMTypeError(exec);
    411441    return JSValue::encode(JSTestInterface::getConstructor(exec->vm(), domObject->globalObject()));
    412442}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r160208 r160879  
    132132{
    133133    JSTestMediaQueryListListener* domObject = jsDynamicCast<JSTestMediaQueryListListener*>(JSValue::decode(slotBase));
     134    if (!domObject)
     135        return throwVMTypeError(exec);
    134136    return JSValue::encode(JSTestMediaQueryListListener::getConstructor(exec->vm(), domObject->globalObject()));
    135137}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r160208 r160879  
    168168{
    169169    JSTestNamedConstructor* domObject = jsDynamicCast<JSTestNamedConstructor*>(JSValue::decode(slotBase));
     170    if (!domObject)
     171        return throwVMTypeError(exec);
    170172    return JSValue::encode(JSTestNamedConstructor::getConstructor(exec->vm(), domObject->globalObject()));
    171173}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r160208 r160879  
    125125{
    126126    JSTestNode* domObject = jsDynamicCast<JSTestNode*>(JSValue::decode(slotBase));
     127    if (!domObject)
     128        return throwVMTypeError(exec);
    127129    return JSValue::encode(JSTestNode::getConstructor(exec->vm(), domObject->globalObject()));
    128130}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r160457 r160879  
    393393}
    394394
    395 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    396 {
    397     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     395EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     396{
     397    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     398    UNUSED_PARAM(slotBase);
     399    if (!castedThis)
     400        return throwVMTypeError(exec);
    398401    UNUSED_PARAM(exec);
    399402    TestObj& impl = castedThis->impl();
     
    403406
    404407
    405 EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    406 {
    407     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     408EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     409{
     410    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     411    UNUSED_PARAM(slotBase);
     412    if (!castedThis)
     413        return throwVMTypeError(exec);
    408414    UNUSED_PARAM(exec);
    409415    TestObj& impl = castedThis->impl();
     
    413419
    414420
    415 EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    416 {
    417     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     421EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     422{
     423    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     424    UNUSED_PARAM(slotBase);
     425    if (!castedThis)
     426        return throwVMTypeError(exec);
    418427    UNUSED_PARAM(exec);
    419428    TestObj& impl = castedThis->impl();
     
    423432
    424433
    425 EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    426 {
     434EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     435{
     436    UNUSED_PARAM(thisValue);
    427437    UNUSED_PARAM(slotBase);
    428438    UNUSED_PARAM(exec);
     
    432442
    433443
    434 EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    435 {
     444EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     445{
     446    UNUSED_PARAM(thisValue);
    436447    UNUSED_PARAM(slotBase);
    437448    UNUSED_PARAM(exec);
     
    441452
    442453
    443 EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    444 {
    445     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     454EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     455{
     456    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     457    UNUSED_PARAM(slotBase);
     458    if (!castedThis)
     459        return throwVMTypeError(exec);
    446460    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
    447461}
    448462
    449463
    450 EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    451 {
    452     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     464EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     465{
     466    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     467    UNUSED_PARAM(slotBase);
     468    if (!castedThis)
     469        return throwVMTypeError(exec);
    453470    if (!castedThis->impl().frame())
    454471        return JSValue::encode(jsUndefined());
     
    460477
    461478
    462 EncodedJSValue jsTestObjEnumAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    463 {
    464     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     479EncodedJSValue jsTestObjEnumAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     480{
     481    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     482    UNUSED_PARAM(slotBase);
     483    if (!castedThis)
     484        return throwVMTypeError(exec);
    465485    UNUSED_PARAM(exec);
    466486    TestObj& impl = castedThis->impl();
     
    470490
    471491
    472 EncodedJSValue jsTestObjByteAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    473 {
    474     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     492EncodedJSValue jsTestObjByteAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     493{
     494    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     495    UNUSED_PARAM(slotBase);
     496    if (!castedThis)
     497        return throwVMTypeError(exec);
    475498    UNUSED_PARAM(exec);
    476499    TestObj& impl = castedThis->impl();
     
    480503
    481504
    482 EncodedJSValue jsTestObjOctetAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    483 {
    484     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     505EncodedJSValue jsTestObjOctetAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     506{
     507    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     508    UNUSED_PARAM(slotBase);
     509    if (!castedThis)
     510        return throwVMTypeError(exec);
    485511    UNUSED_PARAM(exec);
    486512    TestObj& impl = castedThis->impl();
     
    490516
    491517
    492 EncodedJSValue jsTestObjShortAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    493 {
    494     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     518EncodedJSValue jsTestObjShortAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     519{
     520    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     521    UNUSED_PARAM(slotBase);
     522    if (!castedThis)
     523        return throwVMTypeError(exec);
    495524    UNUSED_PARAM(exec);
    496525    TestObj& impl = castedThis->impl();
     
    500529
    501530
    502 EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    503 {
    504     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     531EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     532{
     533    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     534    UNUSED_PARAM(slotBase);
     535    if (!castedThis)
     536        return throwVMTypeError(exec);
    505537    UNUSED_PARAM(exec);
    506538    TestObj& impl = castedThis->impl();
     
    510542
    511543
    512 EncodedJSValue jsTestObjLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    513 {
    514     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     544EncodedJSValue jsTestObjLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     545{
     546    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     547    UNUSED_PARAM(slotBase);
     548    if (!castedThis)
     549        return throwVMTypeError(exec);
    515550    UNUSED_PARAM(exec);
    516551    TestObj& impl = castedThis->impl();
     
    520555
    521556
    522 EncodedJSValue jsTestObjLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    523 {
    524     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     557EncodedJSValue jsTestObjLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     558{
     559    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     560    UNUSED_PARAM(slotBase);
     561    if (!castedThis)
     562        return throwVMTypeError(exec);
    525563    UNUSED_PARAM(exec);
    526564    TestObj& impl = castedThis->impl();
     
    530568
    531569
    532 EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    533 {
    534     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     570EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     571{
     572    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     573    UNUSED_PARAM(slotBase);
     574    if (!castedThis)
     575        return throwVMTypeError(exec);
    535576    UNUSED_PARAM(exec);
    536577    TestObj& impl = castedThis->impl();
     
    540581
    541582
    542 EncodedJSValue jsTestObjStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    543 {
    544     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     583EncodedJSValue jsTestObjStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     584{
     585    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     586    UNUSED_PARAM(slotBase);
     587    if (!castedThis)
     588        return throwVMTypeError(exec);
    545589    UNUSED_PARAM(exec);
    546590    TestObj& impl = castedThis->impl();
     
    550594
    551595
    552 EncodedJSValue jsTestObjTestObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    553 {
    554     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     596EncodedJSValue jsTestObjTestObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     597{
     598    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     599    UNUSED_PARAM(slotBase);
     600    if (!castedThis)
     601        return throwVMTypeError(exec);
    555602    UNUSED_PARAM(exec);
    556603    TestObj& impl = castedThis->impl();
     
    560607
    561608
    562 EncodedJSValue jsTestObjXMLObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    563 {
    564     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     609EncodedJSValue jsTestObjXMLObjAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     610{
     611    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     612    UNUSED_PARAM(slotBase);
     613    if (!castedThis)
     614        return throwVMTypeError(exec);
    565615    UNUSED_PARAM(exec);
    566616    TestObj& impl = castedThis->impl();
     
    570620
    571621
    572 EncodedJSValue jsTestObjCreate(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    573 {
    574     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     622EncodedJSValue jsTestObjCreate(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     623{
     624    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     625    UNUSED_PARAM(slotBase);
     626    if (!castedThis)
     627        return throwVMTypeError(exec);
    575628    UNUSED_PARAM(exec);
    576629    TestObj& impl = castedThis->impl();
     
    580633
    581634
    582 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    583 {
    584     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     635EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     636{
     637    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     638    UNUSED_PARAM(slotBase);
     639    if (!castedThis)
     640        return throwVMTypeError(exec);
    585641    UNUSED_PARAM(exec);
    586642    TestObj& impl = castedThis->impl();
     
    590646
    591647
    592 EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    593 {
    594     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     648EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     649{
     650    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     651    UNUSED_PARAM(slotBase);
     652    if (!castedThis)
     653        return throwVMTypeError(exec);
    595654    UNUSED_PARAM(exec);
    596655    TestObj& impl = castedThis->impl();
     
    600659
    601660
    602 EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    603 {
    604     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     661EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     662{
     663    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     664    UNUSED_PARAM(slotBase);
     665    if (!castedThis)
     666        return throwVMTypeError(exec);
    605667    UNUSED_PARAM(exec);
    606668    TestObj& impl = castedThis->impl();
     
    610672
    611673
    612 EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    613 {
    614     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     674EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     675{
     676    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     677    UNUSED_PARAM(slotBase);
     678    if (!castedThis)
     679        return throwVMTypeError(exec);
    615680    UNUSED_PARAM(exec);
    616681    TestObj& impl = castedThis->impl();
     
    620685
    621686
    622 EncodedJSValue jsTestObjReflectedURLAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    623 {
    624     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     687EncodedJSValue jsTestObjReflectedURLAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     688{
     689    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     690    UNUSED_PARAM(slotBase);
     691    if (!castedThis)
     692        return throwVMTypeError(exec);
    625693    UNUSED_PARAM(exec);
    626694    TestObj& impl = castedThis->impl();
     
    630698
    631699
    632 EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    633 {
    634     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     700EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     701{
     702    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     703    UNUSED_PARAM(slotBase);
     704    if (!castedThis)
     705        return throwVMTypeError(exec);
    635706    UNUSED_PARAM(exec);
    636707    TestObj& impl = castedThis->impl();
     
    640711
    641712
    642 EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    643 {
    644     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     713EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     714{
     715    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     716    UNUSED_PARAM(slotBase);
     717    if (!castedThis)
     718        return throwVMTypeError(exec);
    645719    UNUSED_PARAM(exec);
    646720    TestObj& impl = castedThis->impl();
     
    650724
    651725
    652 EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    653 {
    654     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     726EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     727{
     728    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     729    UNUSED_PARAM(slotBase);
     730    if (!castedThis)
     731        return throwVMTypeError(exec);
    655732    UNUSED_PARAM(exec);
    656733    TestObj& impl = castedThis->impl();
     
    660737
    661738
    662 EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    663 {
    664     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     739EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     740{
     741    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     742    UNUSED_PARAM(slotBase);
     743    if (!castedThis)
     744        return throwVMTypeError(exec);
    665745    UNUSED_PARAM(exec);
    666746    TestObj& impl = castedThis->impl();
     
    670750
    671751
    672 EncodedJSValue jsTestObjTypedArrayAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    673 {
    674     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     752EncodedJSValue jsTestObjTypedArrayAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     753{
     754    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     755    UNUSED_PARAM(slotBase);
     756    if (!castedThis)
     757        return throwVMTypeError(exec);
    675758    UNUSED_PARAM(exec);
    676759    TestObj& impl = castedThis->impl();
     
    680763
    681764
    682 EncodedJSValue jsTestObjAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    683 {
    684     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     765EncodedJSValue jsTestObjAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     766{
     767    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     768    UNUSED_PARAM(slotBase);
     769    if (!castedThis)
     770        return throwVMTypeError(exec);
    685771    ExceptionCode ec = 0;
    686772    TestObj& impl = castedThis->impl();
     
    691777
    692778
    693 EncodedJSValue jsTestObjAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    694 {
    695     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     779EncodedJSValue jsTestObjAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     780{
     781    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     782    UNUSED_PARAM(slotBase);
     783    if (!castedThis)
     784        return throwVMTypeError(exec);
    696785    UNUSED_PARAM(exec);
    697786    TestObj& impl = castedThis->impl();
     
    701790
    702791
    703 EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    704 {
    705     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     792EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     793{
     794    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     795    UNUSED_PARAM(slotBase);
     796    if (!castedThis)
     797        return throwVMTypeError(exec);
    706798    ExceptionCode ec = 0;
    707799    TestObj& impl = castedThis->impl();
     
    712804
    713805
    714 EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    715 {
    716     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     806EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     807{
     808    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     809    UNUSED_PARAM(slotBase);
     810    if (!castedThis)
     811        return throwVMTypeError(exec);
    717812    UNUSED_PARAM(exec);
    718813    TestObj& impl = castedThis->impl();
     
    722817
    723818
    724 EncodedJSValue jsTestObjCustomAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    725 {
    726     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     819EncodedJSValue jsTestObjCustomAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     820{
     821    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     822    UNUSED_PARAM(slotBase);
     823    if (!castedThis)
     824        return throwVMTypeError(exec);
    727825    return JSValue::encode(castedThis->customAttr(exec));
    728826}
    729827
    730828
    731 EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    732 {
    733     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     829EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     830{
     831    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     832    UNUSED_PARAM(slotBase);
     833    if (!castedThis)
     834        return throwVMTypeError(exec);
    734835    TestObj& impl = castedThis->impl();
    735836    JSValue result = jsNumber(impl.withScriptStateAttribute(exec));
     
    738839
    739840
    740 EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    741 {
    742     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     841EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     842{
     843    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     844    UNUSED_PARAM(slotBase);
     845    if (!castedThis)
     846        return throwVMTypeError(exec);
    743847    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    744848    if (!scriptContext)
     
    750854
    751855
    752 EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    753 {
    754     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     856EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     857{
     858    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     859    UNUSED_PARAM(slotBase);
     860    if (!castedThis)
     861        return throwVMTypeError(exec);
    755862    ExceptionCode ec = 0;
    756863    TestObj& impl = castedThis->impl();
     
    761868
    762869
    763 EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    764 {
    765     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     870EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     871{
     872    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     873    UNUSED_PARAM(slotBase);
     874    if (!castedThis)
     875        return throwVMTypeError(exec);
    766876    ExceptionCode ec = 0;
    767877    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     
    775885
    776886
    777 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    778 {
    779     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     887EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     888{
     889    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     890    UNUSED_PARAM(slotBase);
     891    if (!castedThis)
     892        return throwVMTypeError(exec);
    780893    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    781894    if (!scriptContext)
     
    787900
    788901
    789 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    790 {
    791     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     902EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     903{
     904    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     905    UNUSED_PARAM(slotBase);
     906    if (!castedThis)
     907        return throwVMTypeError(exec);
    792908    ExceptionCode ec = 0;
    793909    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     
    801917
    802918
    803 EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    804 {
    805     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     919EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     920{
     921    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     922    UNUSED_PARAM(slotBase);
     923    if (!castedThis)
     924        return throwVMTypeError(exec);
    806925    ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
    807926    if (!scriptContext)
     
    813932
    814933
    815 EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    816 {
    817     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     934EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     935{
     936    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     937    UNUSED_PARAM(slotBase);
     938    if (!castedThis)
     939        return throwVMTypeError(exec);
    818940    TestObj& impl = castedThis->impl();
    819941    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
     
    823945
    824946#if ENABLE(Condition1)
    825 EncodedJSValue jsTestObjConditionalAttr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    826 {
    827     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     947EncodedJSValue jsTestObjConditionalAttr1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     948{
     949    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     950    UNUSED_PARAM(slotBase);
     951    if (!castedThis)
     952        return throwVMTypeError(exec);
    828953    UNUSED_PARAM(exec);
    829954    TestObj& impl = castedThis->impl();
     
    835960
    836961#if ENABLE(Condition1) && ENABLE(Condition2)
    837 EncodedJSValue jsTestObjConditionalAttr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    838 {
    839     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     962EncodedJSValue jsTestObjConditionalAttr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     963{
     964    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     965    UNUSED_PARAM(slotBase);
     966    if (!castedThis)
     967        return throwVMTypeError(exec);
    840968    UNUSED_PARAM(exec);
    841969    TestObj& impl = castedThis->impl();
     
    847975
    848976#if ENABLE(Condition1) || ENABLE(Condition2)
    849 EncodedJSValue jsTestObjConditionalAttr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    850 {
    851     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     977EncodedJSValue jsTestObjConditionalAttr3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     978{
     979    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     980    UNUSED_PARAM(slotBase);
     981    if (!castedThis)
     982        return throwVMTypeError(exec);
    852983    UNUSED_PARAM(exec);
    853984    TestObj& impl = castedThis->impl();
     
    859990
    860991#if ENABLE(Condition1)
    861 EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    862 {
    863     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     992EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     993{
     994    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     995    UNUSED_PARAM(slotBase);
     996    if (!castedThis)
     997        return throwVMTypeError(exec);
    864998    return JSValue::encode(JSTestObjectA::getConstructor(exec->vm(), castedThis->globalObject()));
    865999}
     
    8681002
    8691003#if ENABLE(Condition1) && ENABLE(Condition2)
    870 EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    871 {
    872     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1004EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1005{
     1006    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1007    UNUSED_PARAM(slotBase);
     1008    if (!castedThis)
     1009        return throwVMTypeError(exec);
    8731010    return JSValue::encode(JSTestObjectB::getConstructor(exec->vm(), castedThis->globalObject()));
    8741011}
     
    8771014
    8781015#if ENABLE(Condition1) || ENABLE(Condition2)
    879 EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    880 {
    881     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1016EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1017{
     1018    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1019    UNUSED_PARAM(slotBase);
     1020    if (!castedThis)
     1021        return throwVMTypeError(exec);
    8821022    return JSValue::encode(JSTestObjectC::getConstructor(exec->vm(), castedThis->globalObject()));
    8831023}
     
    8851025#endif
    8861026
    887 EncodedJSValue jsTestObjCachedAttribute1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    888 {
    889     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1027EncodedJSValue jsTestObjCachedAttribute1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1028{
     1029    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1030    UNUSED_PARAM(slotBase);
     1031    if (!castedThis)
     1032        return throwVMTypeError(exec);
    8901033    UNUSED_PARAM(exec);
    8911034    if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
     
    8981041
    8991042
    900 EncodedJSValue jsTestObjCachedAttribute2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    901 {
    902     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1043EncodedJSValue jsTestObjCachedAttribute2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1044{
     1045    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1046    UNUSED_PARAM(slotBase);
     1047    if (!castedThis)
     1048        return throwVMTypeError(exec);
    9031049    UNUSED_PARAM(exec);
    9041050    if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
     
    9111057
    9121058
    913 EncodedJSValue jsTestObjAnyAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    914 {
    915     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1059EncodedJSValue jsTestObjAnyAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1060{
     1061    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1062    UNUSED_PARAM(slotBase);
     1063    if (!castedThis)
     1064        return throwVMTypeError(exec);
    9161065    UNUSED_PARAM(exec);
    9171066    TestObj& impl = castedThis->impl();
     
    9211070
    9221071
    923 EncodedJSValue jsTestObjContentDocument(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    924 {
    925     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1072EncodedJSValue jsTestObjContentDocument(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1073{
     1074    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1075    UNUSED_PARAM(slotBase);
     1076    if (!castedThis)
     1077        return throwVMTypeError(exec);
    9261078    TestObj& impl = castedThis->impl();
    9271079    return JSValue::encode(shouldAllowAccessToNode(exec, impl.contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
     
    9291081
    9301082
    931 EncodedJSValue jsTestObjMutablePoint(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    932 {
    933     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1083EncodedJSValue jsTestObjMutablePoint(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1084{
     1085    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1086    UNUSED_PARAM(slotBase);
     1087    if (!castedThis)
     1088        return throwVMTypeError(exec);
    9341089    UNUSED_PARAM(exec);
    9351090    TestObj& impl = castedThis->impl();
     
    9391094
    9401095
    941 EncodedJSValue jsTestObjImmutablePoint(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    942 {
    943     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1096EncodedJSValue jsTestObjImmutablePoint(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1097{
     1098    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1099    UNUSED_PARAM(slotBase);
     1100    if (!castedThis)
     1101        return throwVMTypeError(exec);
    9441102    UNUSED_PARAM(exec);
    9451103    TestObj& impl = castedThis->impl();
     
    9491107
    9501108
    951 EncodedJSValue jsTestObjStrawberry(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    952 {
    953     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1109EncodedJSValue jsTestObjStrawberry(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1110{
     1111    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1112    UNUSED_PARAM(slotBase);
     1113    if (!castedThis)
     1114        return throwVMTypeError(exec);
    9541115    UNUSED_PARAM(exec);
    9551116    TestObj& impl = castedThis->impl();
     
    9591120
    9601121
    961 EncodedJSValue jsTestObjStrictFloat(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    962 {
    963     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1122EncodedJSValue jsTestObjStrictFloat(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1123{
     1124    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1125    UNUSED_PARAM(slotBase);
     1126    if (!castedThis)
     1127        return throwVMTypeError(exec);
    9641128    UNUSED_PARAM(exec);
    9651129    TestObj& impl = castedThis->impl();
     
    9691133
    9701134
    971 EncodedJSValue jsTestObjDescription(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    972 {
    973     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1135EncodedJSValue jsTestObjDescription(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1136{
     1137    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1138    UNUSED_PARAM(slotBase);
     1139    if (!castedThis)
     1140        return throwVMTypeError(exec);
    9741141    UNUSED_PARAM(exec);
    9751142    TestObj& impl = castedThis->impl();
     
    9791146
    9801147
    981 EncodedJSValue jsTestObjId(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    982 {
    983     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1148EncodedJSValue jsTestObjId(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1149{
     1150    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1151    UNUSED_PARAM(slotBase);
     1152    if (!castedThis)
     1153        return throwVMTypeError(exec);
    9841154    UNUSED_PARAM(exec);
    9851155    TestObj& impl = castedThis->impl();
     
    9891159
    9901160
    991 EncodedJSValue jsTestObjHash(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    992 {
    993     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1161EncodedJSValue jsTestObjHash(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1162{
     1163    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1164    UNUSED_PARAM(slotBase);
     1165    if (!castedThis)
     1166        return throwVMTypeError(exec);
    9941167    UNUSED_PARAM(exec);
    9951168    TestObj& impl = castedThis->impl();
     
    9991172
    10001173
    1001 EncodedJSValue jsTestObjReplaceableAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1002 {
    1003     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1174EncodedJSValue jsTestObjReplaceableAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1175{
     1176    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1177    UNUSED_PARAM(slotBase);
     1178    if (!castedThis)
     1179        return throwVMTypeError(exec);
    10041180    UNUSED_PARAM(exec);
    10051181    TestObj& impl = castedThis->impl();
     
    10091185
    10101186
    1011 EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1012 {
    1013     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1187EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1188{
     1189    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1190    UNUSED_PARAM(slotBase);
     1191    if (!castedThis)
     1192        return throwVMTypeError(exec);
    10141193    UNUSED_PARAM(exec);
    10151194    bool isNull = false;
     
    10221201
    10231202
    1024 EncodedJSValue jsTestObjNullableLongAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1025 {
    1026     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1203EncodedJSValue jsTestObjNullableLongAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1204{
     1205    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1206    UNUSED_PARAM(slotBase);
     1207    if (!castedThis)
     1208        return throwVMTypeError(exec);
    10271209    UNUSED_PARAM(exec);
    10281210    bool isNull = false;
     
    10351217
    10361218
    1037 EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1038 {
    1039     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1219EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1220{
     1221    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1222    UNUSED_PARAM(slotBase);
     1223    if (!castedThis)
     1224        return throwVMTypeError(exec);
    10401225    UNUSED_PARAM(exec);
    10411226    bool isNull = false;
     
    10481233
    10491234
    1050 EncodedJSValue jsTestObjNullableStringAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1051 {
    1052     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1235EncodedJSValue jsTestObjNullableStringAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1236{
     1237    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1238    UNUSED_PARAM(slotBase);
     1239    if (!castedThis)
     1240        return throwVMTypeError(exec);
    10531241    UNUSED_PARAM(exec);
    10541242    bool isNull = false;
     
    10611249
    10621250
    1063 EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1064 {
    1065     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1251EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1252{
     1253    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1254    UNUSED_PARAM(slotBase);
     1255    if (!castedThis)
     1256        return throwVMTypeError(exec);
    10661257    UNUSED_PARAM(exec);
    10671258    bool isNull = false;
     
    10741265
    10751266
    1076 EncodedJSValue jsTestObjNullableStringValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1077 {
    1078     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1267EncodedJSValue jsTestObjNullableStringValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1268{
     1269    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1270    UNUSED_PARAM(slotBase);
     1271    if (!castedThis)
     1272        return throwVMTypeError(exec);
    10791273    ExceptionCode ec = 0;
    10801274    bool isNull = false;
     
    10881282
    10891283
    1090 EncodedJSValue jsTestObjAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1091 {
    1092     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1284EncodedJSValue jsTestObjAttribute(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1285{
     1286    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1287    UNUSED_PARAM(slotBase);
     1288    if (!castedThis)
     1289        return throwVMTypeError(exec);
    10931290    UNUSED_PARAM(exec);
    10941291    TestObj& impl = castedThis->impl();
     
    10981295
    10991296
    1100 EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    1101 {
    1102     JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1297EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     1298{
     1299    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
     1300    UNUSED_PARAM(slotBase);
     1301    if (!castedThis)
     1302        return throwVMTypeError(exec);
    11031303    UNUSED_PARAM(exec);
    11041304    TestObj& impl = castedThis->impl();
     
    11111311{
    11121312    JSTestObj* domObject = jsDynamicCast<JSTestObj*>(JSValue::decode(slotBase));
     1313    if (!domObject)
     1314        return throwVMTypeError(exec);
    11131315    return JSValue::encode(JSTestObj::getConstructor(exec->vm(), domObject->globalObject()));
    11141316}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r160208 r160879  
    196196{
    197197    JSTestOverloadedConstructors* domObject = jsDynamicCast<JSTestOverloadedConstructors*>(JSValue::decode(slotBase));
     198    if (!domObject)
     199        return throwVMTypeError(exec);
    198200    return JSValue::encode(JSTestOverloadedConstructors::getConstructor(exec->vm(), domObject->globalObject()));
    199201}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r160208 r160879  
    130130}
    131131
    132 EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    133 {
    134     JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     132EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     133{
     134    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     135    UNUSED_PARAM(slotBase);
     136    if (!castedThis)
     137        return throwVMTypeError(exec);
    135138    UNUSED_PARAM(exec);
    136139    TestSerializedScriptValueInterface& impl = castedThis->impl();
     
    140143
    141144
    142 EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    143 {
    144     JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     145EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     146{
     147    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     148    UNUSED_PARAM(slotBase);
     149    if (!castedThis)
     150        return throwVMTypeError(exec);
    145151    UNUSED_PARAM(exec);
    146152    TestSerializedScriptValueInterface& impl = castedThis->impl();
     
    150156
    151157
    152 EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    153 {
    154     JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     158EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     159{
     160    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     161    UNUSED_PARAM(slotBase);
     162    if (!castedThis)
     163        return throwVMTypeError(exec);
    155164    UNUSED_PARAM(exec);
    156165    if (JSValue cachedValue = castedThis->m_cachedValue.get())
     
    163172
    164173
    165 EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    166 {
    167     JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     174EncodedJSValue jsTestSerializedScriptValueInterfacePorts(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     175{
     176    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     177    UNUSED_PARAM(slotBase);
     178    if (!castedThis)
     179        return throwVMTypeError(exec);
    168180    UNUSED_PARAM(exec);
    169181    TestSerializedScriptValueInterface& impl = castedThis->impl();
     
    173185
    174186
    175 EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    176 {
    177     JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     187EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     188{
     189    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
     190    UNUSED_PARAM(slotBase);
     191    if (!castedThis)
     192        return throwVMTypeError(exec);
    178193    UNUSED_PARAM(exec);
    179194    if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
     
    189204{
    190205    JSTestSerializedScriptValueInterface* domObject = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(slotBase));
     206    if (!domObject)
     207        return throwVMTypeError(exec);
    191208    return JSValue::encode(JSTestSerializedScriptValueInterface::getConstructor(exec->vm(), domObject->globalObject()));
    192209}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r160208 r160879  
    177177}
    178178
    179 EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    180 {
    181     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     179EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     180{
     181    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     182    UNUSED_PARAM(slotBase);
     183    if (!castedThis)
     184        return throwVMTypeError(exec);
    182185    UNUSED_PARAM(exec);
    183186    TestTypedefs& impl = castedThis->impl();
     
    187190
    188191
    189 EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    190 {
    191     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     192EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     193{
     194    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     195    UNUSED_PARAM(slotBase);
     196    if (!castedThis)
     197        return throwVMTypeError(exec);
    192198    UNUSED_PARAM(exec);
    193199    TestTypedefs& impl = castedThis->impl();
     
    197203
    198204
    199 EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    200 {
    201     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     205EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     206{
     207    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     208    UNUSED_PARAM(slotBase);
     209    if (!castedThis)
     210        return throwVMTypeError(exec);
    202211    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
    203212}
    204213
    205214
    206 EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    207 {
    208     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     215EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     216{
     217    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     218    UNUSED_PARAM(slotBase);
     219    if (!castedThis)
     220        return throwVMTypeError(exec);
    209221    ExceptionCode ec = 0;
    210222    TestTypedefs& impl = castedThis->impl();
     
    215227
    216228
    217 EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    218 {
    219     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     229EncodedJSValue jsTestTypedefsAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     230{
     231    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     232    UNUSED_PARAM(slotBase);
     233    if (!castedThis)
     234        return throwVMTypeError(exec);
    220235    UNUSED_PARAM(exec);
    221236    TestTypedefs& impl = castedThis->impl();
     
    225240
    226241
    227 EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    228 {
    229     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     242EncodedJSValue jsTestTypedefsStringAttrWithGetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     243{
     244    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     245    UNUSED_PARAM(slotBase);
     246    if (!castedThis)
     247        return throwVMTypeError(exec);
    230248    ExceptionCode ec = 0;
    231249    TestTypedefs& impl = castedThis->impl();
     
    236254
    237255
    238 EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    239 {
    240     JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     256EncodedJSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     257{
     258    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
     259    UNUSED_PARAM(slotBase);
     260    if (!castedThis)
     261        return throwVMTypeError(exec);
    241262    UNUSED_PARAM(exec);
    242263    TestTypedefs& impl = castedThis->impl();
     
    249270{
    250271    JSTestTypedefs* domObject = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
     272    if (!domObject)
     273        return throwVMTypeError(exec);
    251274    return JSValue::encode(JSTestTypedefs::getConstructor(exec->vm(), domObject->globalObject()));
    252275}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp

    r160208 r160879  
    121121}
    122122
    123 EncodedJSValue jsattributeReadonly(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
    124 {
    125     JSattribute* castedThis = jsDynamicCast<JSattribute*>(JSValue::decode(slotBase));
     123EncodedJSValue jsattributeReadonly(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
     124{
     125    JSattribute* castedThis = jsDynamicCast<JSattribute*>(JSValue::decode(thisValue));
     126    UNUSED_PARAM(slotBase);
     127    if (!castedThis)
     128        return throwVMTypeError(exec);
    126129    UNUSED_PARAM(exec);
    127130    attribute& impl = castedThis->impl();
     
    134137{
    135138    JSattribute* domObject = jsDynamicCast<JSattribute*>(JSValue::decode(slotBase));
     139    if (!domObject)
     140        return throwVMTypeError(exec);
    136141    return JSValue::encode(JSattribute::getConstructor(exec->vm(), domObject->globalObject()));
    137142}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp

    r160208 r160879  
    121121{
    122122    JSreadonly* domObject = jsDynamicCast<JSreadonly*>(JSValue::decode(slotBase));
     123    if (!domObject)
     124        return throwVMTypeError(exec);
    123125    return JSValue::encode(JSreadonly::getConstructor(exec->vm(), domObject->globalObject()));
    124126}
  • trunk/Source/WebCore/bridge/runtime_array.cpp

    r160208 r160879  
    6161}
    6262
    63 EncodedJSValue RuntimeArray::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     63EncodedJSValue RuntimeArray::lengthGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName)
    6464{
    65     RuntimeArray* thisObj = jsCast<RuntimeArray*>(JSValue::decode(slotBase));
    66     return JSValue::encode(jsNumber(thisObj->getLength()));
     65    RuntimeArray* thisObject = jsDynamicCast<RuntimeArray*>(JSValue::decode(thisValue));
     66    if (!thisObject)
     67        return throwVMTypeError(exec);
     68    return JSValue::encode(jsNumber(thisObject->getLength()));
    6769}
    6870
  • trunk/Source/WebCore/bridge/runtime_method.cpp

    r160208 r160879  
    5555}
    5656
    57 EncodedJSValue RuntimeMethod::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
     57EncodedJSValue RuntimeMethod::lengthGetter(ExecState* exec, EncodedJSValue, EncodedJSValue thisValue, PropertyName)
    5858{
    59     RuntimeMethod* thisObj = jsCast<RuntimeMethod*>(JSValue::decode(slotBase));
    60 
    61     return JSValue::encode(jsNumber(thisObj->m_method->numParameters()));
     59    RuntimeMethod* thisObject = jsDynamicCast<RuntimeMethod*>(JSValue::decode(thisValue));
     60    if (!thisObject)
     61        return throwVMTypeError(exec);
     62    return JSValue::encode(jsNumber(thisObject->m_method->numParameters()));
    6263}
    6364
Note: See TracChangeset for help on using the changeset viewer.