Changeset 168385 in webkit
- Timestamp:
- May 6, 2014, 3:17:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168380 r168385 1 2014-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 1 16 2014-05-06 David Hyatt <hyatt@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r168383 r168385 1 2014-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 1 97 2014-05-06 Andreas Kling <akling@apple.com> 2 98 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r167605 r168385 577 577 return JSValue::encode(jsUndefined()); 578 578 } 579 580 void 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 } 579 585 580 586 JSC::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 68 68 69 69 JSC::EncodedJSValue reportDeprecatedGetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName); 70 void reportDeprecatedSetterError(JSC::ExecState&, const char* interfaceName, const char* attributeName); 70 71 71 72 void throwArrayElementTypeError(JSC::ExecState&); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r168302 r168385 2484 2484 } 2485 2485 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"); 2487 2490 push(@implContent, " return;\n"); 2488 2491 push(@implContent, " }\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r167466 r168385 626 626 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 627 627 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"); 629 632 return; 630 633 } … … 644 647 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 645 648 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"); 647 653 return; 648 654 } … … 658 664 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 659 665 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"); 661 670 return; 662 671 } … … 688 697 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 689 698 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"); 691 703 return; 692 704 } … … 706 718 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 707 719 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"); 709 724 return; 710 725 } … … 720 735 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 721 736 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"); 723 741 return; 724 742 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
r167466 r168385 340 340 JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue)); 341 341 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"); 343 346 return; 344 347 } … … 356 359 JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue)); 357 360 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"); 359 365 return; 360 366 } … … 372 378 JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue)); 373 379 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"); 375 384 return; 376 385 } … … 388 397 JSTestNondeterministic* castedThis = jsDynamicCast<JSTestNondeterministic*>(JSValue::decode(thisValue)); 389 398 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"); 391 403 return; 392 404 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r167466 r168385 2027 2027 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2028 2028 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"); 2030 2033 return; 2031 2034 } … … 2040 2043 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2041 2044 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"); 2043 2049 return; 2044 2050 } … … 2058 2064 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2059 2065 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"); 2061 2070 return; 2062 2071 } … … 2074 2083 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2075 2084 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"); 2077 2089 return; 2078 2090 } … … 2090 2102 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2091 2103 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"); 2093 2108 return; 2094 2109 } … … 2106 2121 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2107 2122 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"); 2109 2127 return; 2110 2128 } … … 2122 2140 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2123 2141 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"); 2125 2146 return; 2126 2147 } … … 2138 2159 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2139 2160 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"); 2141 2165 return; 2142 2166 } … … 2154 2178 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2155 2179 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"); 2157 2184 return; 2158 2185 } … … 2170 2197 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2171 2198 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"); 2173 2203 return; 2174 2204 } … … 2186 2216 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2187 2217 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"); 2189 2222 return; 2190 2223 } … … 2202 2235 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2203 2236 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"); 2205 2241 return; 2206 2242 } … … 2218 2254 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2219 2255 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"); 2221 2260 return; 2222 2261 } … … 2234 2273 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2235 2274 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"); 2237 2279 return; 2238 2280 } … … 2250 2292 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2251 2293 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"); 2253 2298 return; 2254 2299 } … … 2266 2311 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2267 2312 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"); 2269 2317 return; 2270 2318 } … … 2282 2330 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2283 2331 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"); 2285 2336 return; 2286 2337 } … … 2298 2349 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2299 2350 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"); 2301 2355 return; 2302 2356 } … … 2314 2368 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2315 2369 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"); 2317 2374 return; 2318 2375 } … … 2330 2387 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2331 2388 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"); 2333 2393 return; 2334 2394 } … … 2346 2406 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2347 2407 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"); 2349 2412 return; 2350 2413 } … … 2362 2425 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2363 2426 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"); 2365 2431 return; 2366 2432 } … … 2378 2444 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2379 2445 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"); 2381 2450 return; 2382 2451 } … … 2394 2463 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2395 2464 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"); 2397 2469 return; 2398 2470 } … … 2410 2482 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2411 2483 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"); 2413 2488 return; 2414 2489 } … … 2428 2503 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2429 2504 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"); 2431 2509 return; 2432 2510 } … … 2444 2522 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2445 2523 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"); 2447 2528 return; 2448 2529 } … … 2462 2543 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2463 2544 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"); 2465 2549 return; 2466 2550 } … … 2474 2558 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2475 2559 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"); 2477 2564 return; 2478 2565 } … … 2490 2577 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2491 2578 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"); 2493 2583 return; 2494 2584 } … … 2509 2599 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2510 2600 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"); 2512 2605 return; 2513 2606 } … … 2525 2618 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2526 2619 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"); 2528 2624 return; 2529 2625 } … … 2544 2640 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2545 2641 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"); 2547 2646 return; 2548 2647 } … … 2563 2662 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2564 2663 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"); 2566 2668 return; 2567 2669 } … … 2582 2684 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2583 2685 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"); 2585 2690 return; 2586 2691 } … … 2601 2706 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2602 2707 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"); 2604 2712 return; 2605 2713 } … … 2618 2726 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2619 2727 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"); 2621 2732 return; 2622 2733 } … … 2636 2747 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2637 2748 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"); 2639 2753 return; 2640 2754 } … … 2654 2768 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2655 2769 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"); 2657 2774 return; 2658 2775 } … … 2672 2789 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2673 2790 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"); 2675 2795 return; 2676 2796 } … … 2687 2807 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2688 2808 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"); 2690 2813 return; 2691 2814 } … … 2702 2825 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2703 2826 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"); 2705 2831 return; 2706 2832 } … … 2716 2842 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2717 2843 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"); 2719 2848 return; 2720 2849 } … … 2732 2861 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2733 2862 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"); 2735 2867 return; 2736 2868 } … … 2748 2880 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2749 2881 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"); 2751 2886 return; 2752 2887 } … … 2764 2899 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2765 2900 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"); 2767 2905 return; 2768 2906 } … … 2780 2918 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2781 2919 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"); 2783 2924 return; 2784 2925 } … … 2796 2937 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2797 2938 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"); 2799 2943 return; 2800 2944 } … … 2812 2956 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2813 2957 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"); 2815 2962 return; 2816 2963 } … … 2825 2972 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2826 2973 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"); 2828 2978 return; 2829 2979 } … … 2841 2991 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2842 2992 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"); 2844 2997 return; 2845 2998 } … … 2857 3010 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2858 3011 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"); 2860 3016 return; 2861 3017 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r167466 r168385 237 237 JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue)); 238 238 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"); 240 243 return; 241 244 } … … 253 256 JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue)); 254 257 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"); 256 262 return; 257 263 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r167466 r168385 364 364 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 365 365 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"); 367 370 return; 368 371 } … … 380 383 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 381 384 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"); 383 389 return; 384 390 } … … 396 402 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 397 403 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"); 399 408 return; 400 409 } … … 412 421 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 413 422 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"); 415 427 return; 416 428 } … … 430 442 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 431 443 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"); 433 448 return; 434 449 } … … 446 461 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 447 462 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"); 449 467 return; 450 468 }
Note:
See TracChangeset
for help on using the changeset viewer.