Changeset 161009 in webkit
- Timestamp:
- Dec 23, 2013 11:51:38 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r161003 r161009 1 2013-12-23 Oliver Hunt <oliver@apple.com> 2 3 Update custom setter implementations to perform type checks 4 https://bugs.webkit.org/show_bug.cgi?id=126171 5 6 Reviewed by Daniel Bates. 7 8 Modify the setter function signature to take encoded values 9 as we're changing the setter usage everywhere anyway. 10 11 * runtime/Lookup.h: 12 (JSC::putEntry): 13 1 14 2013-12-23 Lucas Forschler <lforschler@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/Lookup.h
r160092 r161009 42 42 // ie. typedef JSValue (*GetFunction)(ExecState*, JSObject* baseObject) 43 43 typedef PropertySlot::GetValueFunc GetFunction; 44 typedef void (*PutFunction)(ExecState*, JSObject* baseObject,JSValue value);44 typedef void (*PutFunction)(ExecState*, EncodedJSValue base, EncodedJSValue value); 45 45 46 46 class HashEntry { … … 298 298 thisObj->putDirect(exec->vm(), propertyName, value); 299 299 else if (!(entry->attributes() & ReadOnly)) 300 entry->propertyPutter()(exec, thisObj, value);300 entry->propertyPutter()(exec, JSValue::encode(thisObj), JSValue::encode(value)); 301 301 else if (shouldThrow) 302 302 throwTypeError(exec, StrictModeReadonlyPropertyWriteError); -
trunk/Source/WebCore/ChangeLog
r161003 r161009 1 2013-12-23 Oliver Hunt <oliver@apple.com> 2 3 Update custom setter implementations to perform type checks 4 https://bugs.webkit.org/show_bug.cgi?id=126171 5 6 Reviewed by Daniel Bates. 7 8 Update the bindings code generator for setters so that they perform a real 9 type check. 10 11 * bindings/scripts/CodeGeneratorJS.pm: 12 (GenerateAttributeEventListenerCall): 13 (GenerateHeader): 14 (GenerateImplementation): 15 * bindings/scripts/test/JS/JSTestInterface.cpp: 16 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr): 17 (WebCore::setJSTestInterfaceImplementsStr2): 18 (WebCore::setJSTestInterfaceImplementsStr3): 19 (WebCore::setJSTestInterfaceImplementsNode): 20 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr): 21 (WebCore::setJSTestInterfaceSupplementalStr2): 22 (WebCore::setJSTestInterfaceSupplementalStr3): 23 (WebCore::setJSTestInterfaceSupplementalNode): 24 * bindings/scripts/test/JS/JSTestInterface.h: 25 * bindings/scripts/test/JS/JSTestObj.cpp: 26 (WebCore::setJSTestObjConstructorStaticStringAttr): 27 (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor): 28 (WebCore::setJSTestObjEnumAttr): 29 (WebCore::setJSTestObjByteAttr): 30 (WebCore::setJSTestObjOctetAttr): 31 (WebCore::setJSTestObjShortAttr): 32 (WebCore::setJSTestObjUnsignedShortAttr): 33 (WebCore::setJSTestObjLongAttr): 34 (WebCore::setJSTestObjLongLongAttr): 35 (WebCore::setJSTestObjUnsignedLongLongAttr): 36 (WebCore::setJSTestObjStringAttr): 37 (WebCore::setJSTestObjTestObjAttr): 38 (WebCore::setJSTestObjXMLObjAttr): 39 (WebCore::setJSTestObjCreate): 40 (WebCore::setJSTestObjReflectedStringAttr): 41 (WebCore::setJSTestObjReflectedIntegralAttr): 42 (WebCore::setJSTestObjReflectedUnsignedIntegralAttr): 43 (WebCore::setJSTestObjReflectedBooleanAttr): 44 (WebCore::setJSTestObjReflectedURLAttr): 45 (WebCore::setJSTestObjReflectedCustomIntegralAttr): 46 (WebCore::setJSTestObjReflectedCustomBooleanAttr): 47 (WebCore::setJSTestObjReflectedCustomURLAttr): 48 (WebCore::setJSTestObjTypedArrayAttr): 49 (WebCore::setJSTestObjAttrWithGetterException): 50 (WebCore::setJSTestObjAttrWithSetterException): 51 (WebCore::setJSTestObjStringAttrWithGetterException): 52 (WebCore::setJSTestObjStringAttrWithSetterException): 53 (WebCore::setJSTestObjCustomAttr): 54 (WebCore::setJSTestObjWithScriptStateAttribute): 55 (WebCore::setJSTestObjWithScriptExecutionContextAttribute): 56 (WebCore::setJSTestObjWithScriptStateAttributeRaises): 57 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises): 58 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute): 59 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): 60 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): 61 (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): 62 (WebCore::setJSTestObjConditionalAttr1): 63 (WebCore::setJSTestObjConditionalAttr2): 64 (WebCore::setJSTestObjConditionalAttr3): 65 (WebCore::setJSTestObjConditionalAttr4Constructor): 66 (WebCore::setJSTestObjConditionalAttr5Constructor): 67 (WebCore::setJSTestObjConditionalAttr6Constructor): 68 (WebCore::setJSTestObjAnyAttribute): 69 (WebCore::setJSTestObjMutablePoint): 70 (WebCore::setJSTestObjImmutablePoint): 71 (WebCore::setJSTestObjStrawberry): 72 (WebCore::setJSTestObjStrictFloat): 73 (WebCore::setJSTestObjId): 74 (WebCore::setJSTestObjReplaceableAttribute): 75 (WebCore::setJSTestObjNullableLongSettableAttribute): 76 (WebCore::setJSTestObjNullableStringValue): 77 (WebCore::setJSTestObjAttributeWithReservedEnumType): 78 * bindings/scripts/test/JS/JSTestObj.h: 79 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 80 (WebCore::setJSTestSerializedScriptValueInterfaceValue): 81 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue): 82 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: 83 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 84 (WebCore::setJSTestTypedefsUnsignedLongLongAttr): 85 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue): 86 (WebCore::setJSTestTypedefsAttrWithGetterException): 87 (WebCore::setJSTestTypedefsAttrWithSetterException): 88 (WebCore::setJSTestTypedefsStringAttrWithGetterException): 89 (WebCore::setJSTestTypedefsStringAttrWithSetterException): 90 * bindings/scripts/test/JS/JSTestTypedefs.h: 91 1 92 2013-12-23 Lucas Forschler <lforschler@apple.com> 2 93 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r160879 r161009 112 112 my $windowEventListener = shift; 113 113 114 my $wrapperObject = $windowEventListener ? "globalObject" : " thisObject";114 my $wrapperObject = $windowEventListener ? "globalObject" : "castedThis"; 115 115 my @GenerateEventListenerImpl = (); 116 116 … … 1064 1064 if (!IsReadonly($attribute)) { 1065 1065 my $setter = GetAttributeSetterName($interfaceName, $className, $attribute); 1066 push(@headerContent, "void ${setter}(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);\n");1066 push(@headerContent, "void ${setter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n"); 1067 1067 } 1068 1068 push(@headerContent, "#endif\n") if $conditionalString; … … 1076 1076 if ($interface->extendedAttributes->{"ReplaceableConstructor"}) { 1077 1077 my $constructorFunctionName = "setJS" . $interfaceName . "Constructor"; 1078 push(@headerContent, "void ${constructorFunctionName}(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);\n");1078 push(@headerContent, "void ${constructorFunctionName}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n"); 1079 1079 } 1080 1080 } … … 2153 2153 push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString; 2154 2154 2155 push(@implContent, "void ${putFunctionName}(ExecState* exec, JSObject*");2156 push(@implContent, " this Object") if !$attribute->isStatic;2157 push(@implContent, ", JSValue value)\n");2155 push(@implContent, "void ${putFunctionName}(ExecState* exec, EncodedJSValue"); 2156 push(@implContent, " thisValue") if !$attribute->isStatic; 2157 push(@implContent, ", EncodedJSValue encodedValue)\n"); 2158 2158 push(@implContent, "{\n"); 2159 2159 push(@implContent, " JSValue value = JSValue::decode(encodedValue);\n"); 2160 2160 push(@implContent, " UNUSED_PARAM(exec);\n"); 2161 2161 if (!$attribute->isStatic) { 2162 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2163 push(@implContent, " if (!castedThis) {\n"); 2164 push(@implContent, " throwVMTypeError(exec);\n"); 2165 push(@implContent, " return;\n"); 2166 push(@implContent, " }\n"); 2167 } 2162 2168 if ($interface->extendedAttributes->{"CheckSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"}) { 2163 2169 if ($interfaceName eq "DOMWindow") { 2164 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast<$className*>( thisObject)->impl()))\n");2170 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast<$className*>(castedThis)->impl()))\n"); 2165 2171 } else { 2166 push(@implContent, " if (!shouldAllowAccessToFrame(exec, jsCast<$className*>( thisObject)->impl().frame()))\n");2172 push(@implContent, " if (!shouldAllowAccessToFrame(exec, jsCast<$className*>(castedThis)->impl().frame()))\n"); 2167 2173 } 2168 2174 push(@implContent, " return;\n"); … … 2170 2176 2171 2177 if (HasCustomSetter($attribute->signature->extendedAttributes)) { 2172 push(@implContent, " jsCast<$className*>(thisObject)->set$implSetterFunctionName(exec, value);\n");2178 push(@implContent, " castedThis->set$implSetterFunctionName(exec, value);\n"); 2173 2179 } elsif ($type eq "EventListener") { 2174 2180 $implIncludes{"JSEventListener.h"} = 1; 2175 2181 push(@implContent, " UNUSED_PARAM(exec);\n"); 2176 push(@implContent, " ${className}* castedThis = jsCast<${className}*>(thisObject);\n");2177 2182 my $windowEventListener = $attribute->signature->extendedAttributes->{"JSWindowEventListener"}; 2178 2183 if ($windowEventListener) { … … 2182 2187 if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerGlobalScope")) and $name eq "onerror") { 2183 2188 $implIncludes{"JSErrorHandler.h"} = 1; 2184 push(@implContent, " impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, thisObject));\n");2189 push(@implContent, " impl.set$implSetterFunctionName(createJSErrorHandler(exec, value, castedThis));\n"); 2185 2190 } else { 2186 2191 push(@implContent, GenerateAttributeEventListenerCall($className, $implSetterFunctionName, $windowEventListener)); … … 2198 2203 if ($interfaceName eq "DOMWindow" && $className eq "JSblah") { 2199 2204 # FIXME: This branch never executes and should be removed. 2200 push(@implContent, " jsCast<$className*>(thisObject)->putDirect(exec->vm(), exec->propertyNames().constructor, value);\n");2205 push(@implContent, " castedThis->putDirect(exec->vm(), exec->propertyNames().constructor, value);\n"); 2201 2206 } else { 2202 push(@implContent, " jsCast<$className*>(thisObject)->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");2207 push(@implContent, " castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n"); 2203 2208 } 2204 2209 } elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) { 2205 2210 push(@implContent, " // Shadowing a built-in object\n"); 2206 push(@implContent, " jsCast<$className*>(thisObject)->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n");2211 push(@implContent, " castedThis->putDirect(exec->vm(), Identifier(exec, \"$name\"), value);\n"); 2207 2212 } else { 2208 2213 if (!$attribute->isStatic) { 2209 push(@implContent, " $className* castedThis = jsCast<$className*>(thisObject);\n");2210 2214 push(@implContent, " $implType& impl = castedThis->impl();\n"); 2211 2215 } … … 2305 2309 my $constructorFunctionName = "setJS" . $interfaceName . "Constructor"; 2306 2310 2307 push(@implContent, "void ${constructorFunctionName}(ExecState* exec, JSObject* thisObject, JSValue value)\n");2311 push(@implContent, "void ${constructorFunctionName}(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)\n"); 2308 2312 push(@implContent, "{\n"); 2313 push(@implContent, " JSValue value = JSValue::decode(encodedValue);"); 2314 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2315 push(@implContent, " if (!castedThis) {\n"); 2316 push(@implContent, " throwVMTypeError(exec);\n"); 2317 push(@implContent, " return;\n"); 2318 push(@implContent, " }\n"); 2309 2319 if ($interface->extendedAttributes->{"CheckSecurity"}) { 2310 2320 if ($interfaceName eq "DOMWindow") { 2311 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, jsCast<$className*>(thisObject)->impl()))\n");2321 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))\n"); 2312 2322 } else { 2313 push(@implContent, " if (!shouldAllowAccessToFrame(exec, jsCast<$className*>(thisObject)->impl().frame()))\n");2323 push(@implContent, " if (!shouldAllowAccessToFrame(exec, castedThis->impl().frame()))\n"); 2314 2324 } 2315 2325 push(@implContent, " return;\n"); … … 2319 2329 2320 2330 if ($interfaceName eq "DOMWindow") { 2321 push(@implContent, " jsCast<$className*>(thisObject)->putDirect(exec->vm(), exec->propertyNames().constructor, value);\n");2331 push(@implContent, " castedThis->putDirect(exec->vm(), exec->propertyNames().constructor, value);\n"); 2322 2332 } else { 2323 2333 die "No way to handle interface with ReplaceableConstructor extended attribute: $interfaceName"; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r160879 r161009 463 463 464 464 #if ENABLE(Condition22) || ENABLE(Condition23) 465 void setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, JSObject*, JSValue value) 466 { 465 void setJSTestInterfaceConstructorImplementsStaticAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue) 466 { 467 JSValue value = JSValue::decode(encodedValue); 467 468 UNUSED_PARAM(exec); 468 469 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 475 476 476 477 #if ENABLE(Condition22) || ENABLE(Condition23) 477 void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* thisObject, JSValue value) 478 { 479 UNUSED_PARAM(exec); 480 JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); 478 void setJSTestInterfaceImplementsStr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 479 { 480 JSValue value = JSValue::decode(encodedValue); 481 UNUSED_PARAM(exec); 482 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 483 if (!castedThis) { 484 throwVMTypeError(exec); 485 return; 486 } 481 487 TestInterface& impl = castedThis->impl(); 482 488 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 489 495 490 496 #if ENABLE(Condition22) || ENABLE(Condition23) 491 void setJSTestInterfaceImplementsStr3(ExecState* exec, JSObject* thisObject, JSValue value) 492 { 493 UNUSED_PARAM(exec); 494 jsCast<JSTestInterface*>(thisObject)->setImplementsStr3(exec, value); 495 } 496 497 #endif 498 499 #if ENABLE(Condition22) || ENABLE(Condition23) 500 void setJSTestInterfaceImplementsNode(ExecState* exec, JSObject* thisObject, JSValue value) 501 { 502 UNUSED_PARAM(exec); 503 JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); 497 void setJSTestInterfaceImplementsStr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 498 { 499 JSValue value = JSValue::decode(encodedValue); 500 UNUSED_PARAM(exec); 501 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 502 if (!castedThis) { 503 throwVMTypeError(exec); 504 return; 505 } 506 castedThis->setImplementsStr3(exec, value); 507 } 508 509 #endif 510 511 #if ENABLE(Condition22) || ENABLE(Condition23) 512 void setJSTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 513 { 514 JSValue value = JSValue::decode(encodedValue); 515 UNUSED_PARAM(exec); 516 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 517 if (!castedThis) { 518 throwVMTypeError(exec); 519 return; 520 } 504 521 TestInterface& impl = castedThis->impl(); 505 522 Node* nativeValue(toNode(value)); … … 512 529 513 530 #if ENABLE(Condition11) || ENABLE(Condition12) 514 void setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, JSObject*, JSValue value) 515 { 531 void setJSTestInterfaceConstructorSupplementalStaticAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue) 532 { 533 JSValue value = JSValue::decode(encodedValue); 516 534 UNUSED_PARAM(exec); 517 535 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 524 542 525 543 #if ENABLE(Condition11) || ENABLE(Condition12) 526 void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, JSValue value) 527 { 528 UNUSED_PARAM(exec); 529 JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); 544 void setJSTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 545 { 546 JSValue value = JSValue::decode(encodedValue); 547 UNUSED_PARAM(exec); 548 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 549 if (!castedThis) { 550 throwVMTypeError(exec); 551 return; 552 } 530 553 TestInterface& impl = castedThis->impl(); 531 554 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 538 561 539 562 #if ENABLE(Condition11) || ENABLE(Condition12) 540 void setJSTestInterfaceSupplementalStr3(ExecState* exec, JSObject* thisObject, JSValue value) 541 { 542 UNUSED_PARAM(exec); 543 jsCast<JSTestInterface*>(thisObject)->setSupplementalStr3(exec, value); 544 } 545 546 #endif 547 548 #if ENABLE(Condition11) || ENABLE(Condition12) 549 void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value) 550 { 551 UNUSED_PARAM(exec); 552 JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject); 563 void setJSTestInterfaceSupplementalStr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 564 { 565 JSValue value = JSValue::decode(encodedValue); 566 UNUSED_PARAM(exec); 567 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 568 if (!castedThis) { 569 throwVMTypeError(exec); 570 return; 571 } 572 castedThis->setSupplementalStr3(exec, value); 573 } 574 575 #endif 576 577 #if ENABLE(Condition11) || ENABLE(Condition12) 578 void setJSTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 579 { 580 JSValue value = JSValue::decode(encodedValue); 581 UNUSED_PARAM(exec); 582 JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue)); 583 if (!castedThis) { 584 throwVMTypeError(exec); 585 return; 586 } 553 587 TestInterface& impl = castedThis->impl(); 554 588 Node* nativeValue(toNode(value)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r160208 r161009 203 203 #if ENABLE(Condition22) || ENABLE(Condition23) 204 204 JSC::EncodedJSValue jsTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 205 void setJSTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);205 void setJSTestInterfaceConstructorImplementsStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 206 206 #endif 207 207 #if ENABLE(Condition22) || ENABLE(Condition23) … … 210 210 #if ENABLE(Condition22) || ENABLE(Condition23) 211 211 JSC::EncodedJSValue jsTestInterfaceImplementsStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 212 void setJSTestInterfaceImplementsStr2(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);212 void setJSTestInterfaceImplementsStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 213 213 #endif 214 214 #if ENABLE(Condition22) || ENABLE(Condition23) 215 215 JSC::EncodedJSValue jsTestInterfaceImplementsStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 216 void setJSTestInterfaceImplementsStr3(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);216 void setJSTestInterfaceImplementsStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 217 217 #endif 218 218 #if ENABLE(Condition22) || ENABLE(Condition23) 219 219 JSC::EncodedJSValue jsTestInterfaceImplementsNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 220 void setJSTestInterfaceImplementsNode(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);220 void setJSTestInterfaceImplementsNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 221 221 #endif 222 222 #if ENABLE(Condition11) || ENABLE(Condition12) … … 225 225 #if ENABLE(Condition11) || ENABLE(Condition12) 226 226 JSC::EncodedJSValue jsTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 227 void setJSTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);227 void setJSTestInterfaceConstructorSupplementalStaticAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 228 228 #endif 229 229 #if ENABLE(Condition11) || ENABLE(Condition12) … … 232 232 #if ENABLE(Condition11) || ENABLE(Condition12) 233 233 JSC::EncodedJSValue jsTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 234 void setJSTestInterfaceSupplementalStr2(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);234 void setJSTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 235 235 #endif 236 236 #if ENABLE(Condition11) || ENABLE(Condition12) 237 237 JSC::EncodedJSValue jsTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 238 void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);238 void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 239 239 #endif 240 240 #if ENABLE(Condition11) || ENABLE(Condition12) 241 241 JSC::EncodedJSValue jsTestInterfaceSupplementalNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 242 void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);242 void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 243 243 #endif 244 244 JSC::EncodedJSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r160879 r161009 1323 1323 } 1324 1324 1325 void setJSTestObjConstructorStaticStringAttr(ExecState* exec, JSObject*, JSValue value) 1326 { 1325 void setJSTestObjConstructorStaticStringAttr(ExecState* exec, EncodedJSValue, EncodedJSValue encodedValue) 1326 { 1327 JSValue value = JSValue::decode(encodedValue); 1327 1328 UNUSED_PARAM(exec); 1328 1329 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 1333 1334 1334 1335 1335 void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* thisObject, JSValue value) 1336 { 1337 UNUSED_PARAM(exec); 1336 void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1337 { 1338 JSValue value = JSValue::decode(encodedValue); 1339 UNUSED_PARAM(exec); 1340 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1341 if (!castedThis) { 1342 throwVMTypeError(exec); 1343 return; 1344 } 1338 1345 // Shadowing a built-in constructor 1339 jsCast<JSTestObj*>(thisObject)->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value); 1340 } 1341 1342 1343 void setJSTestObjEnumAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1344 { 1345 UNUSED_PARAM(exec); 1346 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1346 castedThis->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value); 1347 } 1348 1349 1350 void setJSTestObjEnumAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1351 { 1352 JSValue value = JSValue::decode(encodedValue); 1353 UNUSED_PARAM(exec); 1354 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1355 if (!castedThis) { 1356 throwVMTypeError(exec); 1357 return; 1358 } 1347 1359 TestObj& impl = castedThis->impl(); 1348 1360 const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 1355 1367 1356 1368 1357 void setJSTestObjByteAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1358 { 1359 UNUSED_PARAM(exec); 1360 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1369 void setJSTestObjByteAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1370 { 1371 JSValue value = JSValue::decode(encodedValue); 1372 UNUSED_PARAM(exec); 1373 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1374 if (!castedThis) { 1375 throwVMTypeError(exec); 1376 return; 1377 } 1361 1378 TestObj& impl = castedThis->impl(); 1362 1379 int8_t nativeValue(toInt8(exec, value, NormalConversion)); … … 1367 1384 1368 1385 1369 void setJSTestObjOctetAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1370 { 1371 UNUSED_PARAM(exec); 1372 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1386 void setJSTestObjOctetAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1387 { 1388 JSValue value = JSValue::decode(encodedValue); 1389 UNUSED_PARAM(exec); 1390 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1391 if (!castedThis) { 1392 throwVMTypeError(exec); 1393 return; 1394 } 1373 1395 TestObj& impl = castedThis->impl(); 1374 1396 uint8_t nativeValue(toUInt8(exec, value, NormalConversion)); … … 1379 1401 1380 1402 1381 void setJSTestObjShortAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1382 { 1383 UNUSED_PARAM(exec); 1384 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1403 void setJSTestObjShortAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1404 { 1405 JSValue value = JSValue::decode(encodedValue); 1406 UNUSED_PARAM(exec); 1407 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1408 if (!castedThis) { 1409 throwVMTypeError(exec); 1410 return; 1411 } 1385 1412 TestObj& impl = castedThis->impl(); 1386 1413 int16_t nativeValue(toInt16(exec, value, NormalConversion)); … … 1391 1418 1392 1419 1393 void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1394 { 1395 UNUSED_PARAM(exec); 1396 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1420 void setJSTestObjUnsignedShortAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1421 { 1422 JSValue value = JSValue::decode(encodedValue); 1423 UNUSED_PARAM(exec); 1424 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1425 if (!castedThis) { 1426 throwVMTypeError(exec); 1427 return; 1428 } 1397 1429 TestObj& impl = castedThis->impl(); 1398 1430 uint16_t nativeValue(toUInt16(exec, value, NormalConversion)); … … 1403 1435 1404 1436 1405 void setJSTestObjLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1406 { 1407 UNUSED_PARAM(exec); 1408 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1437 void setJSTestObjLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1438 { 1439 JSValue value = JSValue::decode(encodedValue); 1440 UNUSED_PARAM(exec); 1441 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1442 if (!castedThis) { 1443 throwVMTypeError(exec); 1444 return; 1445 } 1409 1446 TestObj& impl = castedThis->impl(); 1410 1447 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1415 1452 1416 1453 1417 void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1418 { 1419 UNUSED_PARAM(exec); 1420 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1454 void setJSTestObjLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1455 { 1456 JSValue value = JSValue::decode(encodedValue); 1457 UNUSED_PARAM(exec); 1458 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1459 if (!castedThis) { 1460 throwVMTypeError(exec); 1461 return; 1462 } 1421 1463 TestObj& impl = castedThis->impl(); 1422 1464 long long nativeValue(toInt64(exec, value, NormalConversion)); … … 1427 1469 1428 1470 1429 void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1430 { 1431 UNUSED_PARAM(exec); 1432 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1471 void setJSTestObjUnsignedLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1472 { 1473 JSValue value = JSValue::decode(encodedValue); 1474 UNUSED_PARAM(exec); 1475 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1476 if (!castedThis) { 1477 throwVMTypeError(exec); 1478 return; 1479 } 1433 1480 TestObj& impl = castedThis->impl(); 1434 1481 unsigned long long nativeValue(toUInt64(exec, value, NormalConversion)); … … 1439 1486 1440 1487 1441 void setJSTestObjStringAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1442 { 1443 UNUSED_PARAM(exec); 1444 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1488 void setJSTestObjStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1489 { 1490 JSValue value = JSValue::decode(encodedValue); 1491 UNUSED_PARAM(exec); 1492 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1493 if (!castedThis) { 1494 throwVMTypeError(exec); 1495 return; 1496 } 1445 1497 TestObj& impl = castedThis->impl(); 1446 1498 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 1451 1503 1452 1504 1453 void setJSTestObjTestObjAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1454 { 1455 UNUSED_PARAM(exec); 1456 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1505 void setJSTestObjTestObjAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1506 { 1507 JSValue value = JSValue::decode(encodedValue); 1508 UNUSED_PARAM(exec); 1509 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1510 if (!castedThis) { 1511 throwVMTypeError(exec); 1512 return; 1513 } 1457 1514 TestObj& impl = castedThis->impl(); 1458 1515 TestObj* nativeValue(toTestObj(value)); … … 1463 1520 1464 1521 1465 void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1466 { 1467 UNUSED_PARAM(exec); 1468 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1522 void setJSTestObjXMLObjAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1523 { 1524 JSValue value = JSValue::decode(encodedValue); 1525 UNUSED_PARAM(exec); 1526 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1527 if (!castedThis) { 1528 throwVMTypeError(exec); 1529 return; 1530 } 1469 1531 TestObj& impl = castedThis->impl(); 1470 1532 TestObj* nativeValue(toTestObj(value)); … … 1475 1537 1476 1538 1477 void setJSTestObjCreate(ExecState* exec, JSObject* thisObject, JSValue value) 1478 { 1479 UNUSED_PARAM(exec); 1480 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1539 void setJSTestObjCreate(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1540 { 1541 JSValue value = JSValue::decode(encodedValue); 1542 UNUSED_PARAM(exec); 1543 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1544 if (!castedThis) { 1545 throwVMTypeError(exec); 1546 return; 1547 } 1481 1548 TestObj& impl = castedThis->impl(); 1482 1549 bool nativeValue(value.toBoolean(exec)); … … 1487 1554 1488 1555 1489 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1490 { 1491 UNUSED_PARAM(exec); 1492 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1556 void setJSTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1557 { 1558 JSValue value = JSValue::decode(encodedValue); 1559 UNUSED_PARAM(exec); 1560 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1561 if (!castedThis) { 1562 throwVMTypeError(exec); 1563 return; 1564 } 1493 1565 TestObj& impl = castedThis->impl(); 1494 1566 const String& nativeValue(valueToStringWithNullCheck(exec, value)); … … 1499 1571 1500 1572 1501 void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1502 { 1503 UNUSED_PARAM(exec); 1504 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1573 void setJSTestObjReflectedIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1574 { 1575 JSValue value = JSValue::decode(encodedValue); 1576 UNUSED_PARAM(exec); 1577 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1578 if (!castedThis) { 1579 throwVMTypeError(exec); 1580 return; 1581 } 1505 1582 TestObj& impl = castedThis->impl(); 1506 1583 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1511 1588 1512 1589 1513 void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1514 { 1515 UNUSED_PARAM(exec); 1516 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1590 void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1591 { 1592 JSValue value = JSValue::decode(encodedValue); 1593 UNUSED_PARAM(exec); 1594 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1595 if (!castedThis) { 1596 throwVMTypeError(exec); 1597 return; 1598 } 1517 1599 TestObj& impl = castedThis->impl(); 1518 1600 unsigned nativeValue(toUInt32(exec, value, NormalConversion)); … … 1523 1605 1524 1606 1525 void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1526 { 1527 UNUSED_PARAM(exec); 1528 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1607 void setJSTestObjReflectedBooleanAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1608 { 1609 JSValue value = JSValue::decode(encodedValue); 1610 UNUSED_PARAM(exec); 1611 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1612 if (!castedThis) { 1613 throwVMTypeError(exec); 1614 return; 1615 } 1529 1616 TestObj& impl = castedThis->impl(); 1530 1617 bool nativeValue(value.toBoolean(exec)); … … 1535 1622 1536 1623 1537 void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1538 { 1539 UNUSED_PARAM(exec); 1540 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1624 void setJSTestObjReflectedURLAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1625 { 1626 JSValue value = JSValue::decode(encodedValue); 1627 UNUSED_PARAM(exec); 1628 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1629 if (!castedThis) { 1630 throwVMTypeError(exec); 1631 return; 1632 } 1541 1633 TestObj& impl = castedThis->impl(); 1542 1634 const String& nativeValue(valueToStringWithNullCheck(exec, value)); … … 1547 1639 1548 1640 1549 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1550 { 1551 UNUSED_PARAM(exec); 1552 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1641 void setJSTestObjReflectedStringAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1642 { 1643 JSValue value = JSValue::decode(encodedValue); 1644 UNUSED_PARAM(exec); 1645 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1646 if (!castedThis) { 1647 throwVMTypeError(exec); 1648 return; 1649 } 1553 1650 TestObj& impl = castedThis->impl(); 1554 1651 const String& nativeValue(valueToStringWithNullCheck(exec, value)); … … 1559 1656 1560 1657 1561 void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1562 { 1563 UNUSED_PARAM(exec); 1564 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1658 void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1659 { 1660 JSValue value = JSValue::decode(encodedValue); 1661 UNUSED_PARAM(exec); 1662 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1663 if (!castedThis) { 1664 throwVMTypeError(exec); 1665 return; 1666 } 1565 1667 TestObj& impl = castedThis->impl(); 1566 1668 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1571 1673 1572 1674 1573 void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1574 { 1575 UNUSED_PARAM(exec); 1576 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1675 void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1676 { 1677 JSValue value = JSValue::decode(encodedValue); 1678 UNUSED_PARAM(exec); 1679 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1680 if (!castedThis) { 1681 throwVMTypeError(exec); 1682 return; 1683 } 1577 1684 TestObj& impl = castedThis->impl(); 1578 1685 bool nativeValue(value.toBoolean(exec)); … … 1583 1690 1584 1691 1585 void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1586 { 1587 UNUSED_PARAM(exec); 1588 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1692 void setJSTestObjReflectedCustomURLAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1693 { 1694 JSValue value = JSValue::decode(encodedValue); 1695 UNUSED_PARAM(exec); 1696 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1697 if (!castedThis) { 1698 throwVMTypeError(exec); 1699 return; 1700 } 1589 1701 TestObj& impl = castedThis->impl(); 1590 1702 const String& nativeValue(valueToStringWithNullCheck(exec, value)); … … 1595 1707 1596 1708 1597 void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1598 { 1599 UNUSED_PARAM(exec); 1600 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1709 void setJSTestObjTypedArrayAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1710 { 1711 JSValue value = JSValue::decode(encodedValue); 1712 UNUSED_PARAM(exec); 1713 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1714 if (!castedThis) { 1715 throwVMTypeError(exec); 1716 return; 1717 } 1601 1718 TestObj& impl = castedThis->impl(); 1602 1719 RefPtr<Float32Array> nativeValue(toFloat32Array(value)); … … 1607 1724 1608 1725 1609 void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 1610 { 1611 UNUSED_PARAM(exec); 1612 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1726 void setJSTestObjAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1727 { 1728 JSValue value = JSValue::decode(encodedValue); 1729 UNUSED_PARAM(exec); 1730 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1731 if (!castedThis) { 1732 throwVMTypeError(exec); 1733 return; 1734 } 1613 1735 TestObj& impl = castedThis->impl(); 1614 1736 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1619 1741 1620 1742 1621 void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value) 1622 { 1623 UNUSED_PARAM(exec); 1624 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1743 void setJSTestObjAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1744 { 1745 JSValue value = JSValue::decode(encodedValue); 1746 UNUSED_PARAM(exec); 1747 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1748 if (!castedThis) { 1749 throwVMTypeError(exec); 1750 return; 1751 } 1625 1752 TestObj& impl = castedThis->impl(); 1626 1753 ExceptionCode ec = 0; … … 1633 1760 1634 1761 1635 void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 1636 { 1637 UNUSED_PARAM(exec); 1638 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1762 void setJSTestObjStringAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1763 { 1764 JSValue value = JSValue::decode(encodedValue); 1765 UNUSED_PARAM(exec); 1766 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1767 if (!castedThis) { 1768 throwVMTypeError(exec); 1769 return; 1770 } 1639 1771 TestObj& impl = castedThis->impl(); 1640 1772 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 1645 1777 1646 1778 1647 void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value) 1648 { 1649 UNUSED_PARAM(exec); 1650 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1779 void setJSTestObjStringAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1780 { 1781 JSValue value = JSValue::decode(encodedValue); 1782 UNUSED_PARAM(exec); 1783 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1784 if (!castedThis) { 1785 throwVMTypeError(exec); 1786 return; 1787 } 1651 1788 TestObj& impl = castedThis->impl(); 1652 1789 ExceptionCode ec = 0; … … 1659 1796 1660 1797 1661 void setJSTestObjCustomAttr(ExecState* exec, JSObject* thisObject, JSValue value) 1662 { 1663 UNUSED_PARAM(exec); 1664 jsCast<JSTestObj*>(thisObject)->setCustomAttr(exec, value); 1665 } 1666 1667 1668 void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1669 { 1670 UNUSED_PARAM(exec); 1671 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1798 void setJSTestObjCustomAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1799 { 1800 JSValue value = JSValue::decode(encodedValue); 1801 UNUSED_PARAM(exec); 1802 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1803 if (!castedThis) { 1804 throwVMTypeError(exec); 1805 return; 1806 } 1807 castedThis->setCustomAttr(exec, value); 1808 } 1809 1810 1811 void setJSTestObjWithScriptStateAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1812 { 1813 JSValue value = JSValue::decode(encodedValue); 1814 UNUSED_PARAM(exec); 1815 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1816 if (!castedThis) { 1817 throwVMTypeError(exec); 1818 return; 1819 } 1672 1820 TestObj& impl = castedThis->impl(); 1673 1821 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1678 1826 1679 1827 1680 void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1681 { 1682 UNUSED_PARAM(exec); 1683 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1828 void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1829 { 1830 JSValue value = JSValue::decode(encodedValue); 1831 UNUSED_PARAM(exec); 1832 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1833 if (!castedThis) { 1834 throwVMTypeError(exec); 1835 return; 1836 } 1684 1837 TestObj& impl = castedThis->impl(); 1685 1838 TestObj* nativeValue(toTestObj(value)); … … 1693 1846 1694 1847 1695 void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value) 1696 { 1697 UNUSED_PARAM(exec); 1698 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1848 void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1849 { 1850 JSValue value = JSValue::decode(encodedValue); 1851 UNUSED_PARAM(exec); 1852 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1853 if (!castedThis) { 1854 throwVMTypeError(exec); 1855 return; 1856 } 1699 1857 TestObj& impl = castedThis->impl(); 1700 1858 TestObj* nativeValue(toTestObj(value)); … … 1705 1863 1706 1864 1707 void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value) 1708 { 1709 UNUSED_PARAM(exec); 1710 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1865 void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1866 { 1867 JSValue value = JSValue::decode(encodedValue); 1868 UNUSED_PARAM(exec); 1869 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1870 if (!castedThis) { 1871 throwVMTypeError(exec); 1872 return; 1873 } 1711 1874 TestObj& impl = castedThis->impl(); 1712 1875 TestObj* nativeValue(toTestObj(value)); … … 1720 1883 1721 1884 1722 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1723 { 1724 UNUSED_PARAM(exec); 1725 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1885 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1886 { 1887 JSValue value = JSValue::decode(encodedValue); 1888 UNUSED_PARAM(exec); 1889 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1890 if (!castedThis) { 1891 throwVMTypeError(exec); 1892 return; 1893 } 1726 1894 TestObj& impl = castedThis->impl(); 1727 1895 TestObj* nativeValue(toTestObj(value)); … … 1735 1903 1736 1904 1737 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* thisObject, JSValue value) 1738 { 1739 UNUSED_PARAM(exec); 1740 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1905 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1906 { 1907 JSValue value = JSValue::decode(encodedValue); 1908 UNUSED_PARAM(exec); 1909 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1910 if (!castedThis) { 1911 throwVMTypeError(exec); 1912 return; 1913 } 1741 1914 TestObj& impl = castedThis->impl(); 1742 1915 TestObj* nativeValue(toTestObj(value)); … … 1750 1923 1751 1924 1752 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1753 { 1754 UNUSED_PARAM(exec); 1755 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1925 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1926 { 1927 JSValue value = JSValue::decode(encodedValue); 1928 UNUSED_PARAM(exec); 1929 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1930 if (!castedThis) { 1931 throwVMTypeError(exec); 1932 return; 1933 } 1756 1934 TestObj& impl = castedThis->impl(); 1757 1935 TestObj* nativeValue(toTestObj(value)); … … 1765 1943 1766 1944 1767 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1768 { 1769 UNUSED_PARAM(exec); 1770 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1945 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1946 { 1947 JSValue value = JSValue::decode(encodedValue); 1948 UNUSED_PARAM(exec); 1949 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1950 if (!castedThis) { 1951 throwVMTypeError(exec); 1952 return; 1953 } 1771 1954 TestObj& impl = castedThis->impl(); 1772 1955 TestObj* nativeValue(toTestObj(value)); … … 1778 1961 1779 1962 #if ENABLE(Condition1) 1780 void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* thisObject, JSValue value) 1781 { 1782 UNUSED_PARAM(exec); 1783 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1963 void setJSTestObjConditionalAttr1(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1964 { 1965 JSValue value = JSValue::decode(encodedValue); 1966 UNUSED_PARAM(exec); 1967 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1968 if (!castedThis) { 1969 throwVMTypeError(exec); 1970 return; 1971 } 1784 1972 TestObj& impl = castedThis->impl(); 1785 1973 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1792 1980 1793 1981 #if ENABLE(Condition1) && ENABLE(Condition2) 1794 void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* thisObject, JSValue value) 1795 { 1796 UNUSED_PARAM(exec); 1797 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1982 void setJSTestObjConditionalAttr2(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 1983 { 1984 JSValue value = JSValue::decode(encodedValue); 1985 UNUSED_PARAM(exec); 1986 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 1987 if (!castedThis) { 1988 throwVMTypeError(exec); 1989 return; 1990 } 1798 1991 TestObj& impl = castedThis->impl(); 1799 1992 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1806 1999 1807 2000 #if ENABLE(Condition1) || ENABLE(Condition2) 1808 void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* thisObject, JSValue value) 1809 { 1810 UNUSED_PARAM(exec); 1811 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2001 void setJSTestObjConditionalAttr3(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2002 { 2003 JSValue value = JSValue::decode(encodedValue); 2004 UNUSED_PARAM(exec); 2005 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2006 if (!castedThis) { 2007 throwVMTypeError(exec); 2008 return; 2009 } 1812 2010 TestObj& impl = castedThis->impl(); 1813 2011 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1820 2018 1821 2019 #if ENABLE(Condition1) 1822 void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* thisObject, JSValue value) 1823 { 1824 UNUSED_PARAM(exec); 2020 void setJSTestObjConditionalAttr4Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2021 { 2022 JSValue value = JSValue::decode(encodedValue); 2023 UNUSED_PARAM(exec); 2024 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2025 if (!castedThis) { 2026 throwVMTypeError(exec); 2027 return; 2028 } 1825 2029 // Shadowing a built-in constructor 1826 jsCast<JSTestObj*>(thisObject)->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value);2030 castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value); 1827 2031 } 1828 2032 … … 1830 2034 1831 2035 #if ENABLE(Condition1) && ENABLE(Condition2) 1832 void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* thisObject, JSValue value) 1833 { 1834 UNUSED_PARAM(exec); 2036 void setJSTestObjConditionalAttr5Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2037 { 2038 JSValue value = JSValue::decode(encodedValue); 2039 UNUSED_PARAM(exec); 2040 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2041 if (!castedThis) { 2042 throwVMTypeError(exec); 2043 return; 2044 } 1835 2045 // Shadowing a built-in constructor 1836 jsCast<JSTestObj*>(thisObject)->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value);2046 castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value); 1837 2047 } 1838 2048 … … 1840 2050 1841 2051 #if ENABLE(Condition1) || ENABLE(Condition2) 1842 void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* thisObject, JSValue value) 1843 { 1844 UNUSED_PARAM(exec); 2052 void setJSTestObjConditionalAttr6Constructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2053 { 2054 JSValue value = JSValue::decode(encodedValue); 2055 UNUSED_PARAM(exec); 2056 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2057 if (!castedThis) { 2058 throwVMTypeError(exec); 2059 return; 2060 } 1845 2061 // Shadowing a built-in constructor 1846 jsCast<JSTestObj*>(thisObject)->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value); 1847 } 1848 1849 #endif 1850 1851 void setJSTestObjAnyAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1852 { 1853 UNUSED_PARAM(exec); 1854 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2062 castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value); 2063 } 2064 2065 #endif 2066 2067 void setJSTestObjAnyAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2068 { 2069 JSValue value = JSValue::decode(encodedValue); 2070 UNUSED_PARAM(exec); 2071 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2072 if (!castedThis) { 2073 throwVMTypeError(exec); 2074 return; 2075 } 1855 2076 TestObj& impl = castedThis->impl(); 1856 2077 Deprecated::ScriptValue nativeValue(exec->vm(), value); … … 1861 2082 1862 2083 1863 void setJSTestObjMutablePoint(ExecState* exec, JSObject* thisObject, JSValue value) 1864 { 1865 UNUSED_PARAM(exec); 1866 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2084 void setJSTestObjMutablePoint(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2085 { 2086 JSValue value = JSValue::decode(encodedValue); 2087 UNUSED_PARAM(exec); 2088 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2089 if (!castedThis) { 2090 throwVMTypeError(exec); 2091 return; 2092 } 1867 2093 TestObj& impl = castedThis->impl(); 1868 2094 SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value)); … … 1873 2099 1874 2100 1875 void setJSTestObjImmutablePoint(ExecState* exec, JSObject* thisObject, JSValue value) 1876 { 1877 UNUSED_PARAM(exec); 1878 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2101 void setJSTestObjImmutablePoint(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2102 { 2103 JSValue value = JSValue::decode(encodedValue); 2104 UNUSED_PARAM(exec); 2105 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2106 if (!castedThis) { 2107 throwVMTypeError(exec); 2108 return; 2109 } 1879 2110 TestObj& impl = castedThis->impl(); 1880 2111 SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value)); … … 1885 2116 1886 2117 1887 void setJSTestObjStrawberry(ExecState* exec, JSObject* thisObject, JSValue value) 1888 { 1889 UNUSED_PARAM(exec); 1890 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2118 void setJSTestObjStrawberry(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2119 { 2120 JSValue value = JSValue::decode(encodedValue); 2121 UNUSED_PARAM(exec); 2122 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2123 if (!castedThis) { 2124 throwVMTypeError(exec); 2125 return; 2126 } 1891 2127 TestObj& impl = castedThis->impl(); 1892 2128 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1897 2133 1898 2134 1899 void setJSTestObjStrictFloat(ExecState* exec, JSObject* thisObject, JSValue value) 1900 { 1901 UNUSED_PARAM(exec); 1902 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2135 void setJSTestObjStrictFloat(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2136 { 2137 JSValue value = JSValue::decode(encodedValue); 2138 UNUSED_PARAM(exec); 2139 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2140 if (!castedThis) { 2141 throwVMTypeError(exec); 2142 return; 2143 } 1903 2144 TestObj& impl = castedThis->impl(); 1904 2145 float nativeValue(value.toFloat(exec)); … … 1909 2150 1910 2151 1911 void setJSTestObjId(ExecState* exec, JSObject* thisObject, JSValue value) 1912 { 1913 UNUSED_PARAM(exec); 1914 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2152 void setJSTestObjId(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2153 { 2154 JSValue value = JSValue::decode(encodedValue); 2155 UNUSED_PARAM(exec); 2156 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2157 if (!castedThis) { 2158 throwVMTypeError(exec); 2159 return; 2160 } 1915 2161 TestObj& impl = castedThis->impl(); 1916 2162 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1921 2167 1922 2168 1923 void setJSTestObjReplaceableAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1924 { 1925 UNUSED_PARAM(exec); 2169 void setJSTestObjReplaceableAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2170 { 2171 JSValue value = JSValue::decode(encodedValue); 2172 UNUSED_PARAM(exec); 2173 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2174 if (!castedThis) { 2175 throwVMTypeError(exec); 2176 return; 2177 } 1926 2178 // Shadowing a built-in object 1927 jsCast<JSTestObj*>(thisObject)->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value); 1928 } 1929 1930 1931 void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* thisObject, JSValue value) 1932 { 1933 UNUSED_PARAM(exec); 1934 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2179 castedThis->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value); 2180 } 2181 2182 2183 void setJSTestObjNullableLongSettableAttribute(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2184 { 2185 JSValue value = JSValue::decode(encodedValue); 2186 UNUSED_PARAM(exec); 2187 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2188 if (!castedThis) { 2189 throwVMTypeError(exec); 2190 return; 2191 } 1935 2192 TestObj& impl = castedThis->impl(); 1936 2193 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1941 2198 1942 2199 1943 void setJSTestObjNullableStringValue(ExecState* exec, JSObject* thisObject, JSValue value) 1944 { 1945 UNUSED_PARAM(exec); 1946 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2200 void setJSTestObjNullableStringValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2201 { 2202 JSValue value = JSValue::decode(encodedValue); 2203 UNUSED_PARAM(exec); 2204 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2205 if (!castedThis) { 2206 throwVMTypeError(exec); 2207 return; 2208 } 1947 2209 TestObj& impl = castedThis->impl(); 1948 2210 int nativeValue(toInt32(exec, value, NormalConversion)); … … 1953 2215 1954 2216 1955 void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* thisObject, JSValue value) 1956 { 1957 UNUSED_PARAM(exec); 1958 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 2217 void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 2218 { 2219 JSValue value = JSValue::decode(encodedValue); 2220 UNUSED_PARAM(exec); 2221 JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue)); 2222 if (!castedThis) { 2223 throwVMTypeError(exec); 2224 return; 2225 } 1959 2226 TestObj& impl = castedThis->impl(); 1960 2227 const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r160208 r161009 240 240 JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 241 241 JSC::EncodedJSValue jsTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 242 void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);242 void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 243 243 JSC::EncodedJSValue jsTestObjConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 244 244 JSC::EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 245 void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);245 void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 246 246 JSC::EncodedJSValue jsTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 247 void setJSTestObjEnumAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);247 void setJSTestObjEnumAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 248 248 JSC::EncodedJSValue jsTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 249 void setJSTestObjByteAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);249 void setJSTestObjByteAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 250 250 JSC::EncodedJSValue jsTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 251 void setJSTestObjOctetAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);251 void setJSTestObjOctetAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 252 252 JSC::EncodedJSValue jsTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 253 void setJSTestObjShortAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);253 void setJSTestObjShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 254 254 JSC::EncodedJSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 255 void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);255 void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 256 256 JSC::EncodedJSValue jsTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 257 void setJSTestObjLongAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);257 void setJSTestObjLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 258 258 JSC::EncodedJSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 259 void setJSTestObjLongLongAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);259 void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 260 260 JSC::EncodedJSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 261 void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);261 void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 262 262 JSC::EncodedJSValue jsTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 263 void setJSTestObjStringAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);263 void setJSTestObjStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 264 264 JSC::EncodedJSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 265 void setJSTestObjTestObjAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);265 void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 266 266 JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 267 void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);267 void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 268 268 JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 269 void setJSTestObjCreate(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);269 void setJSTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 270 270 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 271 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);271 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 272 272 JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 273 void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);273 void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 274 274 JSC::EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 275 void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);275 void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 276 276 JSC::EncodedJSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 277 void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);277 void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 278 278 JSC::EncodedJSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 279 void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);279 void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 280 280 JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 281 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);281 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 282 282 JSC::EncodedJSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 283 void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);283 void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 284 284 JSC::EncodedJSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 285 void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);285 void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 286 286 JSC::EncodedJSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 287 void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);287 void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 288 288 JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 289 void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);289 void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 290 290 JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 291 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);291 void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 292 292 JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 293 void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);293 void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 294 294 JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 295 void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);295 void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 296 296 JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 297 void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);297 void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 298 298 JSC::EncodedJSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 299 void setJSTestObjCustomAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);299 void setJSTestObjCustomAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 300 300 JSC::EncodedJSValue jsTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 301 void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);301 void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 302 302 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 303 void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);303 void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 304 304 JSC::EncodedJSValue jsTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 305 void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);305 void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 306 306 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 307 void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);307 void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 308 308 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 309 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);309 void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 310 310 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 311 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);311 void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 312 312 JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 313 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);313 void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 314 314 JSC::EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 315 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);315 void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 316 316 #if ENABLE(Condition1) 317 317 JSC::EncodedJSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 318 void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);318 void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 319 319 #endif 320 320 #if ENABLE(Condition1) && ENABLE(Condition2) 321 321 JSC::EncodedJSValue jsTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 322 void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);322 void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 323 323 #endif 324 324 #if ENABLE(Condition1) || ENABLE(Condition2) 325 325 JSC::EncodedJSValue jsTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 326 void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);326 void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 327 327 #endif 328 328 #if ENABLE(Condition1) 329 329 JSC::EncodedJSValue jsTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 330 void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);330 void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 331 331 #endif 332 332 #if ENABLE(Condition1) && ENABLE(Condition2) 333 333 JSC::EncodedJSValue jsTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 334 void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);334 void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 335 335 #endif 336 336 #if ENABLE(Condition1) || ENABLE(Condition2) 337 337 JSC::EncodedJSValue jsTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 338 void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);338 void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 339 339 #endif 340 340 JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 341 341 JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 342 342 JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 343 void setJSTestObjAnyAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);343 void setJSTestObjAnyAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 344 344 JSC::EncodedJSValue jsTestObjContentDocument(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 345 345 JSC::EncodedJSValue jsTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 346 void setJSTestObjMutablePoint(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);346 void setJSTestObjMutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 347 347 JSC::EncodedJSValue jsTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 348 void setJSTestObjImmutablePoint(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);348 void setJSTestObjImmutablePoint(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 349 349 JSC::EncodedJSValue jsTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 350 void setJSTestObjStrawberry(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);350 void setJSTestObjStrawberry(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 351 351 JSC::EncodedJSValue jsTestObjStrictFloat(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 352 void setJSTestObjStrictFloat(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);352 void setJSTestObjStrictFloat(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 353 353 JSC::EncodedJSValue jsTestObjDescription(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 354 354 JSC::EncodedJSValue jsTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 355 void setJSTestObjId(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);355 void setJSTestObjId(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 356 356 JSC::EncodedJSValue jsTestObjHash(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 357 357 JSC::EncodedJSValue jsTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 358 void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);358 void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 359 359 JSC::EncodedJSValue jsTestObjNullableDoubleAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 360 360 JSC::EncodedJSValue jsTestObjNullableLongAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); … … 362 362 JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 363 363 JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 364 void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);364 void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 365 365 JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 366 void setJSTestObjNullableStringValue(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);366 void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 367 367 JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 368 368 JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 369 void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);369 void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 370 370 JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 371 371 // Constants -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r160879 r161009 216 216 } 217 217 218 void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, JSObject* thisObject, JSValue value) 219 { 220 UNUSED_PARAM(exec); 221 JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(thisObject); 218 void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 219 { 220 JSValue value = JSValue::decode(encodedValue); 221 UNUSED_PARAM(exec); 222 JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue)); 223 if (!castedThis) { 224 throwVMTypeError(exec); 225 return; 226 } 222 227 TestSerializedScriptValueInterface& impl = castedThis->impl(); 223 228 RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); … … 228 233 229 234 230 void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, JSObject* thisObject, JSValue value) 231 { 232 UNUSED_PARAM(exec); 233 JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(thisObject); 235 void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 236 { 237 JSValue value = JSValue::decode(encodedValue); 238 UNUSED_PARAM(exec); 239 JSTestSerializedScriptValueInterface* castedThis = jsDynamicCast<JSTestSerializedScriptValueInterface*>(JSValue::decode(thisValue)); 240 if (!castedThis) { 241 throwVMTypeError(exec); 242 return; 243 } 234 244 TestSerializedScriptValueInterface& impl = castedThis->impl(); 235 245 RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r160208 r161009 148 148 149 149 JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 150 void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);150 void setJSTestSerializedScriptValueInterfaceValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 151 151 JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 152 152 JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 153 void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);153 void setJSTestSerializedScriptValueInterfaceCachedValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 154 154 JSC::EncodedJSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 155 155 JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r160879 r161009 282 282 } 283 283 284 void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 285 { 286 UNUSED_PARAM(exec); 287 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 284 void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 285 { 286 JSValue value = JSValue::decode(encodedValue); 287 UNUSED_PARAM(exec); 288 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 289 if (!castedThis) { 290 throwVMTypeError(exec); 291 return; 292 } 288 293 TestTypedefs& impl = castedThis->impl(); 289 294 unsigned long long nativeValue(toUInt64(exec, value, NormalConversion)); … … 294 299 295 300 296 void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* thisObject, JSValue value) 297 { 298 UNUSED_PARAM(exec); 299 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 301 void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 302 { 303 JSValue value = JSValue::decode(encodedValue); 304 UNUSED_PARAM(exec); 305 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 306 if (!castedThis) { 307 throwVMTypeError(exec); 308 return; 309 } 300 310 TestTypedefs& impl = castedThis->impl(); 301 311 RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0)); … … 306 316 307 317 308 void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 309 { 310 UNUSED_PARAM(exec); 311 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 318 void setJSTestTypedefsAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 319 { 320 JSValue value = JSValue::decode(encodedValue); 321 UNUSED_PARAM(exec); 322 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 323 if (!castedThis) { 324 throwVMTypeError(exec); 325 return; 326 } 312 327 TestTypedefs& impl = castedThis->impl(); 313 328 int nativeValue(toInt32(exec, value, NormalConversion)); … … 318 333 319 334 320 void setJSTestTypedefsAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value) 321 { 322 UNUSED_PARAM(exec); 323 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 335 void setJSTestTypedefsAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 336 { 337 JSValue value = JSValue::decode(encodedValue); 338 UNUSED_PARAM(exec); 339 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 340 if (!castedThis) { 341 throwVMTypeError(exec); 342 return; 343 } 324 344 TestTypedefs& impl = castedThis->impl(); 325 345 ExceptionCode ec = 0; … … 332 352 333 353 334 void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* thisObject, JSValue value) 335 { 336 UNUSED_PARAM(exec); 337 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 354 void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 355 { 356 JSValue value = JSValue::decode(encodedValue); 357 UNUSED_PARAM(exec); 358 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 359 if (!castedThis) { 360 throwVMTypeError(exec); 361 return; 362 } 338 363 TestTypedefs& impl = castedThis->impl(); 339 364 const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec)); … … 344 369 345 370 346 void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* thisObject, JSValue value) 347 { 348 UNUSED_PARAM(exec); 349 JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject); 371 void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue) 372 { 373 JSValue value = JSValue::decode(encodedValue); 374 UNUSED_PARAM(exec); 375 JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue)); 376 if (!castedThis) { 377 throwVMTypeError(exec); 378 return; 379 } 350 380 TestTypedefs& impl = castedThis->impl(); 351 381 ExceptionCode ec = 0; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
r160208 r161009 157 157 158 158 JSC::EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 159 void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);159 void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 160 160 JSC::EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 161 void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);161 void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 162 162 JSC::EncodedJSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 163 163 JSC::EncodedJSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 164 void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);164 void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 165 165 JSC::EncodedJSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 166 void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);166 void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 167 167 JSC::EncodedJSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 168 void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);168 void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 169 169 JSC::EncodedJSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 170 void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC:: JSObject*, JSC::JSValue);170 void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 171 171 JSC::EncodedJSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName); 172 172
Note: See TracChangeset
for help on using the changeset viewer.