Changeset 168385 in webkit


Ignore:
Timestamp:
May 6, 2014, 3:17:04 PM (11 years ago)
Author:
oliver@apple.com
Message:

Can't make a booking at virginamerica.com
https://bugs.webkit.org/show_bug.cgi?id=132626

Reviewed by Geoffrey Garen.

Source/WebCore:
Test: fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent.html

We can't throw an exception when a site incorrectly attempts
to use a dom property setter directly on the prototype as
there are sites that do this as compatibility workarounds
for old browsers. Instead we treat use of the setter on
the prototype object in the same way we do getters, and just
log a warning to the console.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::reportDeprecatedSetterError):

  • bindings/js/JSDOMBinding.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

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

(WebCore::setJSTestInterfaceImplementsStr2):
(WebCore::setJSTestInterfaceImplementsStr3):
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceSupplementalStr2):
(WebCore::setJSTestInterfaceSupplementalStr3):
(WebCore::setJSTestInterfaceSupplementalNode):

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

(WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
(WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
(WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
(WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):

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

(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjEnumAttr):
(WebCore::setJSTestObjByteAttr):
(WebCore::setJSTestObjOctetAttr):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjLongAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjTypedArrayAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjCustomAttr):
(WebCore::setJSTestObjWithScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjConditionalAttr4Constructor):
(WebCore::setJSTestObjConditionalAttr5Constructor):
(WebCore::setJSTestObjConditionalAttr6Constructor):
(WebCore::setJSTestObjAnyAttribute):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::setJSTestObjStrawberry):
(WebCore::setJSTestObjStrictFloat):
(WebCore::setJSTestObjId):
(WebCore::setJSTestObjReplaceableAttribute):
(WebCore::setJSTestObjNullableLongSettableAttribute):
(WebCore::setJSTestObjNullableStringValue):
(WebCore::setJSTestObjAttributeWithReservedEnumType):

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

(WebCore::setJSTestSerializedScriptValueInterfaceValue):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):

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

(WebCore::setJSTestTypedefsUnsignedLongLongAttr):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
(WebCore::setJSTestTypedefsAttrWithGetterException):
(WebCore::setJSTestTypedefsAttrWithSetterException):
(WebCore::setJSTestTypedefsStringAttrWithGetterException):
(WebCore::setJSTestTypedefsStringAttrWithSetterException):

LayoutTests:
Add testcase to make sure that we are silently ignoring usage
of prototype setters and the prototype itself. We dump a warning
to the console as throwing an exception breaks sites that used
to rely on essentially no-op behavior.

  • fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent-expected.txt: Added.
  • fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent.html: Added.
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168380 r168385  
     12014-05-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Can't make a booking at virginamerica.com
     4        https://bugs.webkit.org/show_bug.cgi?id=132626
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Add testcase to make sure that we are silently ignoring usage
     9        of prototype setters and the prototype itself. We dump a warning
     10        to the console as throwing an exception breaks sites that used
     11        to rely on essentially no-op behavior.
     12
     13        * fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent-expected.txt: Added.
     14        * fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent.html: Added.
     15
    1162014-05-06  David Hyatt  <hyatt@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r168383 r168385  
     12014-05-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Can't make a booking at virginamerica.com
     4        https://bugs.webkit.org/show_bug.cgi?id=132626
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Test: fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent.html
     9
     10        We can't throw an exception when a site incorrectly attempts
     11        to use a dom property setter directly on the prototype as
     12        there are sites that do this as compatibility workarounds
     13        for old browsers. Instead we treat use of the setter on
     14        the prototype object in the same way we do getters, and just
     15        log a warning to the console.
     16
     17        * bindings/js/JSDOMBinding.cpp:
     18        (WebCore::reportDeprecatedSetterError):
     19        * bindings/js/JSDOMBinding.h:
     20        * bindings/scripts/CodeGeneratorJS.pm:
     21        (GenerateImplementation):
     22        * bindings/scripts/test/JS/JSTestInterface.cpp:
     23        (WebCore::setJSTestInterfaceImplementsStr2):
     24        (WebCore::setJSTestInterfaceImplementsStr3):
     25        (WebCore::setJSTestInterfaceImplementsNode):
     26        (WebCore::setJSTestInterfaceSupplementalStr2):
     27        (WebCore::setJSTestInterfaceSupplementalStr3):
     28        (WebCore::setJSTestInterfaceSupplementalNode):
     29        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
     30        (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
     31        (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
     32        (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
     33        (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
     34        * bindings/scripts/test/JS/JSTestObj.cpp:
     35        (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
     36        (WebCore::setJSTestObjEnumAttr):
     37        (WebCore::setJSTestObjByteAttr):
     38        (WebCore::setJSTestObjOctetAttr):
     39        (WebCore::setJSTestObjShortAttr):
     40        (WebCore::setJSTestObjUnsignedShortAttr):
     41        (WebCore::setJSTestObjLongAttr):
     42        (WebCore::setJSTestObjLongLongAttr):
     43        (WebCore::setJSTestObjUnsignedLongLongAttr):
     44        (WebCore::setJSTestObjStringAttr):
     45        (WebCore::setJSTestObjTestObjAttr):
     46        (WebCore::setJSTestObjXMLObjAttr):
     47        (WebCore::setJSTestObjCreate):
     48        (WebCore::setJSTestObjReflectedStringAttr):
     49        (WebCore::setJSTestObjReflectedIntegralAttr):
     50        (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
     51        (WebCore::setJSTestObjReflectedBooleanAttr):
     52        (WebCore::setJSTestObjReflectedURLAttr):
     53        (WebCore::setJSTestObjReflectedCustomIntegralAttr):
     54        (WebCore::setJSTestObjReflectedCustomBooleanAttr):
     55        (WebCore::setJSTestObjReflectedCustomURLAttr):
     56        (WebCore::setJSTestObjTypedArrayAttr):
     57        (WebCore::setJSTestObjAttrWithGetterException):
     58        (WebCore::setJSTestObjAttrWithSetterException):
     59        (WebCore::setJSTestObjStringAttrWithGetterException):
     60        (WebCore::setJSTestObjStringAttrWithSetterException):
     61        (WebCore::setJSTestObjCustomAttr):
     62        (WebCore::setJSTestObjWithScriptStateAttribute):
     63        (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
     64        (WebCore::setJSTestObjWithScriptStateAttributeRaises):
     65        (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
     66        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
     67        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
     68        (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
     69        (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
     70        (WebCore::setJSTestObjConditionalAttr1):
     71        (WebCore::setJSTestObjConditionalAttr2):
     72        (WebCore::setJSTestObjConditionalAttr3):
     73        (WebCore::setJSTestObjConditionalAttr4Constructor):
     74        (WebCore::setJSTestObjConditionalAttr5Constructor):
     75        (WebCore::setJSTestObjConditionalAttr6Constructor):
     76        (WebCore::setJSTestObjAnyAttribute):
     77        (WebCore::setJSTestObjMutablePoint):
     78        (WebCore::setJSTestObjImmutablePoint):
     79        (WebCore::setJSTestObjStrawberry):
     80        (WebCore::setJSTestObjStrictFloat):
     81        (WebCore::setJSTestObjId):
     82        (WebCore::setJSTestObjReplaceableAttribute):
     83        (WebCore::setJSTestObjNullableLongSettableAttribute):
     84        (WebCore::setJSTestObjNullableStringValue):
     85        (WebCore::setJSTestObjAttributeWithReservedEnumType):
     86        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
     87        (WebCore::setJSTestSerializedScriptValueInterfaceValue):
     88        (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
     89        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
     90        (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
     91        (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
     92        (WebCore::setJSTestTypedefsAttrWithGetterException):
     93        (WebCore::setJSTestTypedefsAttrWithSetterException):
     94        (WebCore::setJSTestTypedefsStringAttrWithGetterException):
     95        (WebCore::setJSTestTypedefsStringAttrWithSetterException):
     96
    1972014-05-06  Andreas Kling  <akling@apple.com>
    298
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp

    r167605 r168385  
    577577    return JSValue::encode(jsUndefined());
    578578}
     579   
     580void reportDeprecatedSetterError(JSC::ExecState& state, const char* interfaceName, const char* attributeName)
     581{
     582    auto& context = *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())->scriptExecutionContext();
     583    context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Deprecated attempt to set property '", attributeName, "' on a non-", interfaceName, " object."));
     584}
    579585
    580586JSC::EncodedJSValue throwArgumentMustBeEnumError(JSC::ExecState& state, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedValues)
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.h

    r167577 r168385  
    6868
    6969JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
     70void reportDeprecatedSetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName);
    7071
    7172void throwArrayElementTypeError(JSC::ExecState&);
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r168302 r168385  
    24842484                    }
    24852485                    push(@implContent, "    if (UNLIKELY(!castedThis)) {\n");
    2486                     push(@implContent, "        throwSetterTypeError(*exec, \"$interfaceName\", \"$name\");\n");
     2486                    push(@implContent, "        if (jsDynamicCast<${className}Prototype*>(JSValue::decode(thisValue)))\n");
     2487                    push(@implContent, "            reportDeprecatedSetterError(*exec, \"$interfaceName\", \"$name\");\n");
     2488                    push(@implContent, "        else\n");
     2489                    push(@implContent, "            throwSetterTypeError(*exec, \"$interfaceName\", \"$name\");\n");
    24872490                    push(@implContent, "        return;\n");
    24882491                    push(@implContent, "    }\n");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r167466 r168385  
    626626    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    627627    if (UNLIKELY(!castedThis)) {
    628         throwSetterTypeError(*exec, "TestInterface", "implementsStr2");
     628        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     629            reportDeprecatedSetterError(*exec, "TestInterface", "implementsStr2");
     630        else
     631            throwSetterTypeError(*exec, "TestInterface", "implementsStr2");
    629632        return;
    630633    }
     
    644647    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    645648    if (UNLIKELY(!castedThis)) {
    646         throwSetterTypeError(*exec, "TestInterface", "implementsStr3");
     649        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     650            reportDeprecatedSetterError(*exec, "TestInterface", "implementsStr3");
     651        else
     652            throwSetterTypeError(*exec, "TestInterface", "implementsStr3");
    647653        return;
    648654    }
     
    658664    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    659665    if (UNLIKELY(!castedThis)) {
    660         throwSetterTypeError(*exec, "TestInterface", "implementsNode");
     666        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     667            reportDeprecatedSetterError(*exec, "TestInterface", "implementsNode");
     668        else
     669            throwSetterTypeError(*exec, "TestInterface", "implementsNode");
    661670        return;
    662671    }
     
    688697    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    689698    if (UNLIKELY(!castedThis)) {
    690         throwSetterTypeError(*exec, "TestInterface", "supplementalStr2");
     699        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     700            reportDeprecatedSetterError(*exec, "TestInterface", "supplementalStr2");
     701        else
     702            throwSetterTypeError(*exec, "TestInterface", "supplementalStr2");
    691703        return;
    692704    }
     
    706718    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    707719    if (UNLIKELY(!castedThis)) {
    708         throwSetterTypeError(*exec, "TestInterface", "supplementalStr3");
     720        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     721            reportDeprecatedSetterError(*exec, "TestInterface", "supplementalStr3");
     722        else
     723            throwSetterTypeError(*exec, "TestInterface", "supplementalStr3");
    709724        return;
    710725    }
     
    720735    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    721736    if (UNLIKELY(!castedThis)) {
    722         throwSetterTypeError(*exec, "TestInterface", "supplementalNode");
     737        if (jsDynamicCast<JSTestInterfacePrototype*>(JSValue::decode(thisValue)))
     738            reportDeprecatedSetterError(*exec, "TestInterface", "supplementalNode");
     739        else
     740            throwSetterTypeError(*exec, "TestInterface", "supplementalNode");
    723741        return;
    724742    }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r167466 r168385  
    340340    JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
    341341    if (UNLIKELY(!castedThis)) {
    342         throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicWriteableAttr");
     342        if (jsDynamicCast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue)))
     343            reportDeprecatedSetterError(*exec, "TestNondeterministic", "nondeterministicWriteableAttr");
     344        else
     345            throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicWriteableAttr");
    343346        return;
    344347    }
     
    356359    JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
    357360    if (UNLIKELY(!castedThis)) {
    358         throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicExceptionAttr");
     361        if (jsDynamicCast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue)))
     362            reportDeprecatedSetterError(*exec, "TestNondeterministic", "nondeterministicExceptionAttr");
     363        else
     364            throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicExceptionAttr");
    359365        return;
    360366    }
     
    372378    JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
    373379    if (UNLIKELY(!castedThis)) {
    374         throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
     380        if (jsDynamicCast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue)))
     381            reportDeprecatedSetterError(*exec, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
     382        else
     383            throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicGetterExceptionAttr");
    375384        return;
    376385    }
     
    388397    JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue));
    389398    if (UNLIKELY(!castedThis)) {
    390         throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
     399        if (jsDynamicCast<JSTestNondeterministicPrototype*>(JSValue::decode(thisValue)))
     400            reportDeprecatedSetterError(*exec, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
     401        else
     402            throwSetterTypeError(*exec, "TestNondeterministic", "nondeterministicSetterExceptionAttr");
    391403        return;
    392404    }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r167466 r168385  
    20272027    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    20282028    if (UNLIKELY(!castedThis)) {
    2029         throwSetterTypeError(*exec, "TestObj", "TestSubObjEnabledBySetting");
     2029        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2030            reportDeprecatedSetterError(*exec, "TestObj", "TestSubObjEnabledBySetting");
     2031        else
     2032            throwSetterTypeError(*exec, "TestObj", "TestSubObjEnabledBySetting");
    20302033        return;
    20312034    }
     
    20402043    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    20412044    if (UNLIKELY(!castedThis)) {
    2042         throwSetterTypeError(*exec, "TestObj", "enumAttr");
     2045        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2046            reportDeprecatedSetterError(*exec, "TestObj", "enumAttr");
     2047        else
     2048            throwSetterTypeError(*exec, "TestObj", "enumAttr");
    20432049        return;
    20442050    }
     
    20582064    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    20592065    if (UNLIKELY(!castedThis)) {
    2060         throwSetterTypeError(*exec, "TestObj", "byteAttr");
     2066        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2067            reportDeprecatedSetterError(*exec, "TestObj", "byteAttr");
     2068        else
     2069            throwSetterTypeError(*exec, "TestObj", "byteAttr");
    20612070        return;
    20622071    }
     
    20742083    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    20752084    if (UNLIKELY(!castedThis)) {
    2076         throwSetterTypeError(*exec, "TestObj", "octetAttr");
     2085        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2086            reportDeprecatedSetterError(*exec, "TestObj", "octetAttr");
     2087        else
     2088            throwSetterTypeError(*exec, "TestObj", "octetAttr");
    20772089        return;
    20782090    }
     
    20902102    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    20912103    if (UNLIKELY(!castedThis)) {
    2092         throwSetterTypeError(*exec, "TestObj", "shortAttr");
     2104        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2105            reportDeprecatedSetterError(*exec, "TestObj", "shortAttr");
     2106        else
     2107            throwSetterTypeError(*exec, "TestObj", "shortAttr");
    20932108        return;
    20942109    }
     
    21062121    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21072122    if (UNLIKELY(!castedThis)) {
    2108         throwSetterTypeError(*exec, "TestObj", "unsignedShortAttr");
     2123        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2124            reportDeprecatedSetterError(*exec, "TestObj", "unsignedShortAttr");
     2125        else
     2126            throwSetterTypeError(*exec, "TestObj", "unsignedShortAttr");
    21092127        return;
    21102128    }
     
    21222140    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21232141    if (UNLIKELY(!castedThis)) {
    2124         throwSetterTypeError(*exec, "TestObj", "longAttr");
     2142        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2143            reportDeprecatedSetterError(*exec, "TestObj", "longAttr");
     2144        else
     2145            throwSetterTypeError(*exec, "TestObj", "longAttr");
    21252146        return;
    21262147    }
     
    21382159    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21392160    if (UNLIKELY(!castedThis)) {
    2140         throwSetterTypeError(*exec, "TestObj", "longLongAttr");
     2161        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2162            reportDeprecatedSetterError(*exec, "TestObj", "longLongAttr");
     2163        else
     2164            throwSetterTypeError(*exec, "TestObj", "longLongAttr");
    21412165        return;
    21422166    }
     
    21542178    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21552179    if (UNLIKELY(!castedThis)) {
    2156         throwSetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
     2180        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2181            reportDeprecatedSetterError(*exec, "TestObj", "unsignedLongLongAttr");
     2182        else
     2183            throwSetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
    21572184        return;
    21582185    }
     
    21702197    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21712198    if (UNLIKELY(!castedThis)) {
    2172         throwSetterTypeError(*exec, "TestObj", "stringAttr");
     2199        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2200            reportDeprecatedSetterError(*exec, "TestObj", "stringAttr");
     2201        else
     2202            throwSetterTypeError(*exec, "TestObj", "stringAttr");
    21732203        return;
    21742204    }
     
    21862216    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    21872217    if (UNLIKELY(!castedThis)) {
    2188         throwSetterTypeError(*exec, "TestObj", "testObjAttr");
     2218        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2219            reportDeprecatedSetterError(*exec, "TestObj", "testObjAttr");
     2220        else
     2221            throwSetterTypeError(*exec, "TestObj", "testObjAttr");
    21892222        return;
    21902223    }
     
    22022235    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22032236    if (UNLIKELY(!castedThis)) {
    2204         throwSetterTypeError(*exec, "TestObj", "XMLObjAttr");
     2237        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2238            reportDeprecatedSetterError(*exec, "TestObj", "XMLObjAttr");
     2239        else
     2240            throwSetterTypeError(*exec, "TestObj", "XMLObjAttr");
    22052241        return;
    22062242    }
     
    22182254    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22192255    if (UNLIKELY(!castedThis)) {
    2220         throwSetterTypeError(*exec, "TestObj", "create");
     2256        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2257            reportDeprecatedSetterError(*exec, "TestObj", "create");
     2258        else
     2259            throwSetterTypeError(*exec, "TestObj", "create");
    22212260        return;
    22222261    }
     
    22342273    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22352274    if (UNLIKELY(!castedThis)) {
    2236         throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
     2275        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2276            reportDeprecatedSetterError(*exec, "TestObj", "reflectedStringAttr");
     2277        else
     2278            throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
    22372279        return;
    22382280    }
     
    22502292    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22512293    if (UNLIKELY(!castedThis)) {
    2252         throwSetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
     2294        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2295            reportDeprecatedSetterError(*exec, "TestObj", "reflectedIntegralAttr");
     2296        else
     2297            throwSetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
    22532298        return;
    22542299    }
     
    22662311    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22672312    if (UNLIKELY(!castedThis)) {
    2268         throwSetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
     2313        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2314            reportDeprecatedSetterError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
     2315        else
     2316            throwSetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
    22692317        return;
    22702318    }
     
    22822330    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22832331    if (UNLIKELY(!castedThis)) {
    2284         throwSetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
     2332        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2333            reportDeprecatedSetterError(*exec, "TestObj", "reflectedBooleanAttr");
     2334        else
     2335            throwSetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
    22852336        return;
    22862337    }
     
    22982349    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    22992350    if (UNLIKELY(!castedThis)) {
    2300         throwSetterTypeError(*exec, "TestObj", "reflectedURLAttr");
     2351        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2352            reportDeprecatedSetterError(*exec, "TestObj", "reflectedURLAttr");
     2353        else
     2354            throwSetterTypeError(*exec, "TestObj", "reflectedURLAttr");
    23012355        return;
    23022356    }
     
    23142368    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23152369    if (UNLIKELY(!castedThis)) {
    2316         throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
     2370        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2371            reportDeprecatedSetterError(*exec, "TestObj", "reflectedStringAttr");
     2372        else
     2373            throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
    23172374        return;
    23182375    }
     
    23302387    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23312388    if (UNLIKELY(!castedThis)) {
    2332         throwSetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
     2389        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2390            reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomIntegralAttr");
     2391        else
     2392            throwSetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
    23332393        return;
    23342394    }
     
    23462406    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23472407    if (UNLIKELY(!castedThis)) {
    2348         throwSetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
     2408        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2409            reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomBooleanAttr");
     2410        else
     2411            throwSetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
    23492412        return;
    23502413    }
     
    23622425    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23632426    if (UNLIKELY(!castedThis)) {
    2364         throwSetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
     2427        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2428            reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomURLAttr");
     2429        else
     2430            throwSetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
    23652431        return;
    23662432    }
     
    23782444    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23792445    if (UNLIKELY(!castedThis)) {
    2380         throwSetterTypeError(*exec, "TestObj", "typedArrayAttr");
     2446        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2447            reportDeprecatedSetterError(*exec, "TestObj", "typedArrayAttr");
     2448        else
     2449            throwSetterTypeError(*exec, "TestObj", "typedArrayAttr");
    23812450        return;
    23822451    }
     
    23942463    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    23952464    if (UNLIKELY(!castedThis)) {
    2396         throwSetterTypeError(*exec, "TestObj", "attrWithGetterException");
     2465        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2466            reportDeprecatedSetterError(*exec, "TestObj", "attrWithGetterException");
     2467        else
     2468            throwSetterTypeError(*exec, "TestObj", "attrWithGetterException");
    23972469        return;
    23982470    }
     
    24102482    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24112483    if (UNLIKELY(!castedThis)) {
    2412         throwSetterTypeError(*exec, "TestObj", "attrWithSetterException");
     2484        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2485            reportDeprecatedSetterError(*exec, "TestObj", "attrWithSetterException");
     2486        else
     2487            throwSetterTypeError(*exec, "TestObj", "attrWithSetterException");
    24132488        return;
    24142489    }
     
    24282503    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24292504    if (UNLIKELY(!castedThis)) {
    2430         throwSetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
     2505        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2506            reportDeprecatedSetterError(*exec, "TestObj", "stringAttrWithGetterException");
     2507        else
     2508            throwSetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
    24312509        return;
    24322510    }
     
    24442522    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24452523    if (UNLIKELY(!castedThis)) {
    2446         throwSetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
     2524        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2525            reportDeprecatedSetterError(*exec, "TestObj", "stringAttrWithSetterException");
     2526        else
     2527            throwSetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
    24472528        return;
    24482529    }
     
    24622543    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24632544    if (UNLIKELY(!castedThis)) {
    2464         throwSetterTypeError(*exec, "TestObj", "customAttr");
     2545        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2546            reportDeprecatedSetterError(*exec, "TestObj", "customAttr");
     2547        else
     2548            throwSetterTypeError(*exec, "TestObj", "customAttr");
    24652549        return;
    24662550    }
     
    24742558    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24752559    if (UNLIKELY(!castedThis)) {
    2476         throwSetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
     2560        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2561            reportDeprecatedSetterError(*exec, "TestObj", "withScriptStateAttribute");
     2562        else
     2563            throwSetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
    24772564        return;
    24782565    }
     
    24902577    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    24912578    if (UNLIKELY(!castedThis)) {
    2492         throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
     2579        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2580            reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAttribute");
     2581        else
     2582            throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
    24932583        return;
    24942584    }
     
    25092599    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    25102600    if (UNLIKELY(!castedThis)) {
    2511         throwSetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
     2601        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2602            reportDeprecatedSetterError(*exec, "TestObj", "withScriptStateAttributeRaises");
     2603        else
     2604            throwSetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
    25122605        return;
    25132606    }
     
    25252618    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    25262619    if (UNLIKELY(!castedThis)) {
    2527         throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
     2620        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2621            reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
     2622        else
     2623            throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
    25282624        return;
    25292625    }
     
    25442640    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    25452641    if (UNLIKELY(!castedThis)) {
    2546         throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
     2642        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2643            reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
     2644        else
     2645            throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
    25472646        return;
    25482647    }
     
    25632662    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    25642663    if (UNLIKELY(!castedThis)) {
    2565         throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
     2664        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2665            reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
     2666        else
     2667            throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
    25662668        return;
    25672669    }
     
    25822684    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    25832685    if (UNLIKELY(!castedThis)) {
    2584         throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
     2686        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2687            reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
     2688        else
     2689            throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
    25852690        return;
    25862691    }
     
    26012706    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26022707    if (UNLIKELY(!castedThis)) {
    2603         throwSetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
     2708        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2709            reportDeprecatedSetterError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
     2710        else
     2711            throwSetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
    26042712        return;
    26052713    }
     
    26182726    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26192727    if (UNLIKELY(!castedThis)) {
    2620         throwSetterTypeError(*exec, "TestObj", "conditionalAttr1");
     2728        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2729            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr1");
     2730        else
     2731            throwSetterTypeError(*exec, "TestObj", "conditionalAttr1");
    26212732        return;
    26222733    }
     
    26362747    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26372748    if (UNLIKELY(!castedThis)) {
    2638         throwSetterTypeError(*exec, "TestObj", "conditionalAttr2");
     2749        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2750            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr2");
     2751        else
     2752            throwSetterTypeError(*exec, "TestObj", "conditionalAttr2");
    26392753        return;
    26402754    }
     
    26542768    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26552769    if (UNLIKELY(!castedThis)) {
    2656         throwSetterTypeError(*exec, "TestObj", "conditionalAttr3");
     2770        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2771            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr3");
     2772        else
     2773            throwSetterTypeError(*exec, "TestObj", "conditionalAttr3");
    26572774        return;
    26582775    }
     
    26722789    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26732790    if (UNLIKELY(!castedThis)) {
    2674         throwSetterTypeError(*exec, "TestObj", "conditionalAttr4");
     2791        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2792            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr4");
     2793        else
     2794            throwSetterTypeError(*exec, "TestObj", "conditionalAttr4");
    26752795        return;
    26762796    }
     
    26872807    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    26882808    if (UNLIKELY(!castedThis)) {
    2689         throwSetterTypeError(*exec, "TestObj", "conditionalAttr5");
     2809        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2810            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr5");
     2811        else
     2812            throwSetterTypeError(*exec, "TestObj", "conditionalAttr5");
    26902813        return;
    26912814    }
     
    27022825    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27032826    if (UNLIKELY(!castedThis)) {
    2704         throwSetterTypeError(*exec, "TestObj", "conditionalAttr6");
     2827        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2828            reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr6");
     2829        else
     2830            throwSetterTypeError(*exec, "TestObj", "conditionalAttr6");
    27052831        return;
    27062832    }
     
    27162842    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27172843    if (UNLIKELY(!castedThis)) {
    2718         throwSetterTypeError(*exec, "TestObj", "anyAttribute");
     2844        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2845            reportDeprecatedSetterError(*exec, "TestObj", "anyAttribute");
     2846        else
     2847            throwSetterTypeError(*exec, "TestObj", "anyAttribute");
    27192848        return;
    27202849    }
     
    27322861    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27332862    if (UNLIKELY(!castedThis)) {
    2734         throwSetterTypeError(*exec, "TestObj", "mutablePoint");
     2863        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2864            reportDeprecatedSetterError(*exec, "TestObj", "mutablePoint");
     2865        else
     2866            throwSetterTypeError(*exec, "TestObj", "mutablePoint");
    27352867        return;
    27362868    }
     
    27482880    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27492881    if (UNLIKELY(!castedThis)) {
    2750         throwSetterTypeError(*exec, "TestObj", "immutablePoint");
     2882        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2883            reportDeprecatedSetterError(*exec, "TestObj", "immutablePoint");
     2884        else
     2885            throwSetterTypeError(*exec, "TestObj", "immutablePoint");
    27512886        return;
    27522887    }
     
    27642899    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27652900    if (UNLIKELY(!castedThis)) {
    2766         throwSetterTypeError(*exec, "TestObj", "strawberry");
     2901        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2902            reportDeprecatedSetterError(*exec, "TestObj", "strawberry");
     2903        else
     2904            throwSetterTypeError(*exec, "TestObj", "strawberry");
    27672905        return;
    27682906    }
     
    27802918    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27812919    if (UNLIKELY(!castedThis)) {
    2782         throwSetterTypeError(*exec, "TestObj", "strictFloat");
     2920        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2921            reportDeprecatedSetterError(*exec, "TestObj", "strictFloat");
     2922        else
     2923            throwSetterTypeError(*exec, "TestObj", "strictFloat");
    27832924        return;
    27842925    }
     
    27962937    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    27972938    if (UNLIKELY(!castedThis)) {
    2798         throwSetterTypeError(*exec, "TestObj", "id");
     2939        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2940            reportDeprecatedSetterError(*exec, "TestObj", "id");
     2941        else
     2942            throwSetterTypeError(*exec, "TestObj", "id");
    27992943        return;
    28002944    }
     
    28122956    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    28132957    if (UNLIKELY(!castedThis)) {
    2814         throwSetterTypeError(*exec, "TestObj", "replaceableAttribute");
     2958        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2959            reportDeprecatedSetterError(*exec, "TestObj", "replaceableAttribute");
     2960        else
     2961            throwSetterTypeError(*exec, "TestObj", "replaceableAttribute");
    28152962        return;
    28162963    }
     
    28252972    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    28262973    if (UNLIKELY(!castedThis)) {
    2827         throwSetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
     2974        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2975            reportDeprecatedSetterError(*exec, "TestObj", "nullableLongSettableAttribute");
     2976        else
     2977            throwSetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
    28282978        return;
    28292979    }
     
    28412991    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    28422992    if (UNLIKELY(!castedThis)) {
    2843         throwSetterTypeError(*exec, "TestObj", "nullableStringValue");
     2993        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     2994            reportDeprecatedSetterError(*exec, "TestObj", "nullableStringValue");
     2995        else
     2996            throwSetterTypeError(*exec, "TestObj", "nullableStringValue");
    28442997        return;
    28452998    }
     
    28573010    JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
    28583011    if (UNLIKELY(!castedThis)) {
    2859         throwSetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
     3012        if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
     3013            reportDeprecatedSetterError(*exec, "TestObj", "attributeWithReservedEnumType");
     3014        else
     3015            throwSetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
    28603016        return;
    28613017    }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r167466 r168385  
    237237    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
    238238    if (UNLIKELY(!castedThis)) {
    239         throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "value");
     239        if (jsDynamicCast<JSTestSerializedScriptValueInterfacePrototype*>(JSValue::decode(thisValue)))
     240            reportDeprecatedSetterError(*exec, "TestSerializedScriptValueInterface", "value");
     241        else
     242            throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "value");
    240243        return;
    241244    }
     
    253256    JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue));
    254257    if (UNLIKELY(!castedThis)) {
    255         throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "cachedValue");
     258        if (jsDynamicCast<JSTestSerializedScriptValueInterfacePrototype*>(JSValue::decode(thisValue)))
     259            reportDeprecatedSetterError(*exec, "TestSerializedScriptValueInterface", "cachedValue");
     260        else
     261            throwSetterTypeError(*exec, "TestSerializedScriptValueInterface", "cachedValue");
    256262        return;
    257263    }
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r167466 r168385  
    364364    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    365365    if (UNLIKELY(!castedThis)) {
    366         throwSetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr");
     366        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     367            reportDeprecatedSetterError(*exec, "TestTypedefs", "unsignedLongLongAttr");
     368        else
     369            throwSetterTypeError(*exec, "TestTypedefs", "unsignedLongLongAttr");
    367370        return;
    368371    }
     
    380383    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    381384    if (UNLIKELY(!castedThis)) {
    382         throwSetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
     385        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     386            reportDeprecatedSetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
     387        else
     388            throwSetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
    383389        return;
    384390    }
     
    396402    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    397403    if (UNLIKELY(!castedThis)) {
    398         throwSetterTypeError(*exec, "TestTypedefs", "attrWithGetterException");
     404        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     405            reportDeprecatedSetterError(*exec, "TestTypedefs", "attrWithGetterException");
     406        else
     407            throwSetterTypeError(*exec, "TestTypedefs", "attrWithGetterException");
    399408        return;
    400409    }
     
    412421    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    413422    if (UNLIKELY(!castedThis)) {
    414         throwSetterTypeError(*exec, "TestTypedefs", "attrWithSetterException");
     423        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     424            reportDeprecatedSetterError(*exec, "TestTypedefs", "attrWithSetterException");
     425        else
     426            throwSetterTypeError(*exec, "TestTypedefs", "attrWithSetterException");
    415427        return;
    416428    }
     
    430442    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    431443    if (UNLIKELY(!castedThis)) {
    432         throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithGetterException");
     444        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     445            reportDeprecatedSetterError(*exec, "TestTypedefs", "stringAttrWithGetterException");
     446        else
     447            throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithGetterException");
    433448        return;
    434449    }
     
    446461    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    447462    if (UNLIKELY(!castedThis)) {
    448         throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException");
     463        if (jsDynamicCast<JSTestTypedefsPrototype*>(JSValue::decode(thisValue)))
     464            reportDeprecatedSetterError(*exec, "TestTypedefs", "stringAttrWithSetterException");
     465        else
     466            throwSetterTypeError(*exec, "TestTypedefs", "stringAttrWithSetterException");
    449467        return;
    450468    }
Note: See TracChangeset for help on using the changeset viewer.