Changeset 265046 in webkit
- Timestamp:
- Jul 29, 2020 10:45:32 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r265044 r265046 1 2020-07-29 Mark Lam <mark.lam@apple.com> 2 3 CodeGeneratorJS should release the throwScope before doing a void call at end of a function. 4 https://bugs.webkit.org/show_bug.cgi?id=214924 5 6 Reviewed by Chris Dumez. 7 8 It is necessary to release the throwScope because the void call at the end of the 9 function may throw an exception. Releasing the throwScope here says that this 10 function is releasing the responsibility to handle the exception, and will allow 11 the potential exception from the trailing void call to propagate to its caller. 12 The responsibility to handle the exception is passed to this function's caller (or 13 some earlier caller in the stack). It is ok to release the throwScope here 14 because the trailing void call will effectively be the last thing that this 15 function does before returning. 16 17 Covered by existing tests. 18 19 * bindings/scripts/CodeGeneratorJS.pm: 20 (GenerateImplementationFunctionCall): 21 * bindings/scripts/test/JS/JSMapLike.cpp: 22 (WebCore::jsMapLikePrototypeFunctionClearBody): 23 * bindings/scripts/test/JS/JSSetLike.cpp: 24 (WebCore::jsSetLikePrototypeFunctionClearBody): 25 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 26 (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody): 27 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody): 28 (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body): 29 (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body): 30 * bindings/scripts/test/JS/JSTestCEReactions.cpp: 31 (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody): 32 (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeededBody): 33 * bindings/scripts/test/JS/JSTestCallTracer.cpp: 34 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody): 35 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody): 36 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody): 37 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody): 38 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody): 39 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody): 40 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody): 41 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody): 42 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: 43 (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody): 44 * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 45 (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody): 46 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body): 47 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body): 48 (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody): 49 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody): 50 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody): 51 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody): 52 (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunctionBody): 53 (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResultBody): 54 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: 55 (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody): 56 * bindings/scripts/test/JS/JSTestInterface.cpp: 57 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1Body): 58 (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4Body): 59 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1Body): 60 (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4Body): 61 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: 62 (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody): 63 (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody): 64 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: 65 (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody): 66 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: 67 (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody): 68 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: 69 (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody): 70 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: 71 (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody): 72 (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body): 73 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: 74 (WebCore::jsTestNamedSetterWithUnforgablePropertiesInstanceFunctionUnforgeableOperationBody): 75 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: 76 (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperationBody): 77 * bindings/scripts/test/JS/JSTestNode.cpp: 78 (WebCore::jsTestNodePrototypeFunctionTestWorkerPromiseBody): 79 (WebCore::jsTestNodePrototypeFunctionCalculateSecretResultBody): 80 * bindings/scripts/test/JS/JSTestObj.cpp: 81 (WebCore::callJSTestObj1): 82 (WebCore::callJSTestObj3): 83 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body): 84 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body): 85 (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody): 86 (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody): 87 (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody): 88 (WebCore::jsTestObjPrototypeFunctionCalculateSecretResultBody): 89 (WebCore::jsTestObjPrototypeFunctionVoidMethodBody): 90 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody): 91 (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody): 92 (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody): 93 (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody): 94 (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody): 95 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody): 96 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody): 97 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody): 98 (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody): 99 (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody): 100 (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody): 101 (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody): 102 (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody): 103 (WebCore::jsTestObjPrototypeFunctionSerializedValueBody): 104 (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody): 105 (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionBody): 106 (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody): 107 (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody): 108 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidBody): 109 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidExceptionBody): 110 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextBody): 111 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateBody): 112 (WebCore::jsTestObjPrototypeFunctionWithDocumentArgumentBody): 113 (WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgumentBody): 114 (WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgumentBody): 115 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody): 116 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody): 117 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody): 118 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody): 119 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody): 120 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody): 121 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody): 122 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody): 123 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody): 124 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody): 125 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody): 126 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody): 127 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody): 128 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody): 129 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody): 130 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody): 131 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody): 132 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody): 133 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody): 134 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody): 135 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody): 136 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody): 137 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody): 138 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody): 139 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody): 140 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody): 141 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody): 142 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody): 143 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody): 144 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody): 145 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody): 146 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): 147 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody): 148 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody): 149 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody): 150 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody): 151 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody): 152 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody): 153 (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody): 154 (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody): 155 (WebCore::jsTestObjPrototypeFunctionConditionalMethod2Body): 156 (WebCore::jsTestObjPrototypeFunctionConditionalMethod3Body): 157 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body): 158 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body): 159 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body): 160 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body): 161 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body): 162 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body): 163 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body): 164 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body): 165 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body): 166 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body): 167 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body): 168 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body): 169 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod13Body): 170 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body): 171 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body): 172 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body): 173 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body): 174 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body): 175 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body): 176 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body): 177 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body): 178 (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body): 179 (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body): 180 (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body): 181 (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body): 182 (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body): 183 (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body): 184 (WebCore::jsTestObjConstructorFunctionClassMethodBody): 185 (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body): 186 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body): 187 (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody): 188 (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody): 189 (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody): 190 (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody): 191 (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody): 192 (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody): 193 (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody): 194 (WebCore::jsTestObjPrototypeFunctionConvert1Body): 195 (WebCore::jsTestObjPrototypeFunctionConvert2Body): 196 (WebCore::jsTestObjPrototypeFunctionConvert3Body): 197 (WebCore::jsTestObjPrototypeFunctionConvert4Body): 198 (WebCore::jsTestObjPrototypeFunctionOrangeBody): 199 (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody): 200 (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody): 201 (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody): 202 (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody): 203 (WebCore::jsTestObjPrototypeFunctionAnyBody): 204 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionBody): 205 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody): 206 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionBody): 207 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody): 208 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body): 209 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body): 210 (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionBody): 211 (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionBody): 212 (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body): 213 (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body): 214 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body): 215 (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body): 216 (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody): 217 (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody): 218 (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody): 219 (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody): 220 (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody): 221 (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody): 222 (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowFunctionBody): 223 (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunctionBody): 224 (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunctionBody): 225 * bindings/scripts/test/JS/JSTestOperationConditional.cpp: 226 (WebCore::jsTestOperationConditionalPrototypeFunctionNonConditionalOperationBody): 227 (WebCore::jsTestOperationConditionalPrototypeFunctionConditionalOperationBody): 228 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 229 (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody): 230 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 231 (WebCore::jsTestTypedefsPrototypeFunctionFuncBody): 232 (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody): 233 (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody): 234 (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody): 235 (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody): 236 (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody): 237 (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody): 238 (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody): 239 (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody): 240 (WebCore::jsTestTypedefsPrototypeFunctionMethodWithExceptionBody): 241 1 242 2020-07-29 Darin Adler <darin@apple.com> 2 243 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r264988 r265046 6482 6482 my $returnArgumentName = GetOperationReturnedArgumentName($operation); 6483 6483 if ($returnArgumentName) { 6484 push(@$outputArray, $indent . "throwScope.release();\n") if ($hasThrowScope); 6484 6485 push(@$outputArray, $indent . "$functionString;\n"); 6485 6486 GenerateWriteBarriersForArguments($outputArray, $operation, $indent); 6486 6487 push(@$outputArray, $indent . "return JSValue::encode($returnArgumentName.value());\n"); 6487 6488 } elsif ($operation->type->name eq "void" || ($codeGenerator->IsPromiseType($operation->type) && !$operation->extendedAttributes->{PromiseProxy})) { 6489 push(@$outputArray, $indent . "throwScope.release();\n") if ($hasThrowScope); 6488 6490 push(@$outputArray, $indent . "$functionString;\n"); 6489 6491 GenerateWriteBarriersForArguments($outputArray, $operation, $indent); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp
r264855 r265046 352 352 UNUSED_PARAM(throwScope); 353 353 UNUSED_PARAM(callFrame); 354 throwScope.release(); 354 355 forwardClearToMapLike(*lexicalGlobalObject, *callFrame, *castedThis); 355 356 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSSetLike.cpp
r264855 r265046 328 328 UNUSED_PARAM(throwScope); 329 329 UNUSED_PARAM(callFrame); 330 throwScope.release(); 330 331 forwardClearToSetLike(*lexicalGlobalObject, *callFrame, *castedThis); 331 332 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r264855 r265046 248 248 auto nextChild = convert<IDLInterface<Node>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "nextChild", "TestActiveDOMObject", "excitingFunction", "Node"); }); 249 249 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 250 throwScope.release(); 250 251 impl.excitingFunction(*nextChild); 251 252 return JSValue::encode(jsUndefined()); … … 269 270 auto message = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 270 271 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 272 throwScope.release(); 271 273 impl.postMessage(WTFMove(message)); 272 274 return JSValue::encode(jsUndefined()); … … 289 291 auto param = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 290 292 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 293 throwScope.release(); 291 294 impl.overloadedMethod(WTFMove(param)); 292 295 return JSValue::encode(jsUndefined()); … … 306 309 auto param2 = convert<IDLInterface<Node>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "param2", "TestActiveDOMObject", "overloadedMethod", "Node"); }); 307 310 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 311 throwScope.release(); 308 312 impl.overloadedMethod(*param1, *param2); 309 313 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
r264855 r265046 424 424 CustomElementReactionStack customElementReactionStack(*lexicalGlobalObject); 425 425 auto& impl = castedThis->wrapped(); 426 throwScope.release(); 426 427 impl.methodWithCEReactions(); 427 428 return JSValue::encode(jsUndefined()); … … 441 442 CustomElementReactionDisallowedScope customElementReactionDisallowedScope; 442 443 auto& impl = castedThis->wrapped(); 444 throwScope.release(); 443 445 impl.methodWithCEReactionsNotNeeded(); 444 446 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp
r264855 r265046 363 363 if (UNLIKELY(impl.callTracingActive())) 364 364 CallTracer::testCallTracerInterface(impl, "testOperationInterface"_s); 365 throwScope.release(); 365 366 impl.testOperationInterface(); 366 367 return JSValue::encode(jsUndefined()); … … 381 382 if (UNLIKELY(impl.callTracingActive())) 382 383 CallTracer::testCallTracerOperation(impl, "testOperationSpecified"_s); 384 throwScope.release(); 383 385 impl.testOperationSpecified(); 384 386 return JSValue::encode(jsUndefined()); … … 410 412 if (UNLIKELY(impl.callTracingActive())) 411 413 CallTracer::testCallTracerInterface(impl, "testOperationWithArguments"_s, { a, b, c }); 414 throwScope.release(); 412 415 impl.testOperationWithArguments(WTFMove(a), WTFMove(b), WTFMove(c)); 413 416 return JSValue::encode(jsUndefined()); … … 433 436 if (UNLIKELY(impl.callTracingActive())) 434 437 CallTracer::testCallTracerInterface(impl, "testOperationWithNullableArgument"_s, { nodeNullableArg }); 438 throwScope.release(); 435 439 impl.testOperationWithNullableArgument(WTFMove(nodeNullableArg)); 436 440 return JSValue::encode(jsUndefined()); … … 456 460 if (UNLIKELY(impl.callTracingActive())) 457 461 CallTracer::testCallTracerInterface(impl, "testOperationWithVariantArgument"_s, { variantArg }); 462 throwScope.release(); 458 463 impl.testOperationWithVariantArgument(WTFMove(variantArg)); 459 464 return JSValue::encode(jsUndefined()); … … 479 484 if (UNLIKELY(impl.callTracingActive())) 480 485 CallTracer::testCallTracerInterface(impl, "testOperationWithNullableVariantArgument"_s, { variantNullableArg }); 486 throwScope.release(); 481 487 impl.testOperationWithNullableVariantArgument(WTFMove(variantNullableArg)); 482 488 return JSValue::encode(jsUndefined()); … … 500 506 if (UNLIKELY(impl.callTracingActive())) 501 507 CallTracer::testCallTracerInterface(impl, "testOperationWithOptionalVariantArgument"_s, { variantOptionalArg }); 508 throwScope.release(); 502 509 impl.testOperationWithOptionalVariantArgument(WTFMove(variantOptionalArg)); 503 510 return JSValue::encode(jsUndefined()); … … 521 528 if (UNLIKELY(impl.callTracingActive())) 522 529 CallTracer::testCallTracerInterface(impl, "testOperationWithDefaultVariantArgument"_s, { variantDefaultArg }); 530 throwScope.release(); 523 531 impl.testOperationWithDefaultVariantArgument(WTFMove(variantDefaultArg)); 524 532 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp
r264855 r265046 310 310 auto testParam = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 311 311 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 312 throwScope.release(); 312 313 impl.enabledBySettingOperation(WTFMove(testParam)); 313 314 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
r264855 r265046 2462 2462 auto testParam = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 2463 2463 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2464 throwScope.release(); 2464 2465 impl.regularOperation(WTFMove(testParam)); 2465 2466 return JSValue::encode(jsUndefined()); … … 2482 2483 auto testParam = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 2483 2484 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2485 throwScope.release(); 2484 2486 impl.enabledAtRuntimeOperation(WTFMove(testParam)); 2485 2487 return JSValue::encode(jsUndefined()); … … 2499 2501 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2500 2502 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2503 throwScope.release(); 2501 2504 impl.enabledAtRuntimeOperation(WTFMove(testParam)); 2502 2505 return JSValue::encode(jsUndefined()); … … 2546 2549 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2547 2550 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2551 throwScope.release(); 2548 2552 TestGlobalObject::enabledAtRuntimeOperationStatic(WTFMove(testParam)); 2549 2553 return JSValue::encode(jsUndefined()); … … 2569 2573 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2570 2574 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2575 throwScope.release(); 2571 2576 impl.enabledInSpecificWorld(WTFMove(testParam)); 2572 2577 return JSValue::encode(jsUndefined()); … … 2590 2595 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2591 2596 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2597 throwScope.release(); 2592 2598 impl.enabledInSpecificWorldWhenRuntimeFeatureEnabled(WTFMove(testParam)); 2593 2599 return JSValue::encode(jsUndefined()); … … 2611 2617 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2612 2618 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2619 throwScope.release(); 2613 2620 impl.enabledInSpecificWorldWhenRuntimeFeaturesEnabled(WTFMove(testParam)); 2614 2621 return JSValue::encode(jsUndefined()); … … 2628 2635 UNUSED_PARAM(callFrame); 2629 2636 auto& impl = castedThis->wrapped(); 2637 throwScope.release(); 2630 2638 impl.testPrivateFunction(); 2631 2639 return JSValue::encode(jsUndefined()); … … 2646 2654 UNUSED_PARAM(callFrame); 2647 2655 auto& impl = castedThis->wrapped(); 2656 throwScope.release(); 2648 2657 impl.calculateSecretResult(WTFMove(promise)); 2649 2658 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp
r264855 r265046 292 292 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 293 293 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 294 throwScope.release(); 294 295 impl.indexedSetter(WTFMove(index), WTFMove(value)); 295 296 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r264855 r265046 889 889 UNUSED_PARAM(callFrame); 890 890 auto& impl = castedThis->wrapped(); 891 throwScope.release(); 891 892 impl.implementsMethod1(); 892 893 return JSValue::encode(jsUndefined()); … … 953 954 UNUSED_PARAM(throwScope); 954 955 UNUSED_PARAM(callFrame); 956 throwScope.release(); 955 957 TestInterface::implementsMethod4(); 956 958 return JSValue::encode(jsUndefined()); … … 991 993 UNUSED_PARAM(callFrame); 992 994 auto& impl = castedThis->wrapped(); 995 throwScope.release(); 993 996 WebCore::TestSupplemental::supplementalMethod1(impl); 994 997 return JSValue::encode(jsUndefined()); … … 1055 1058 UNUSED_PARAM(throwScope); 1056 1059 UNUSED_PARAM(callFrame); 1060 throwScope.release(); 1057 1061 WebCore::TestSupplemental::supplementalMethod4(); 1058 1062 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp
r264855 r265046 368 368 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 369 369 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 370 throwScope.release(); 370 371 impl.namedSetter(WTFMove(name), WTFMove(value)); 371 372 return JSValue::encode(jsUndefined()); … … 392 393 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 393 394 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 395 throwScope.release(); 394 396 impl.indexedSetter(WTFMove(index), WTFMove(value)); 395 397 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp
r264855 r265046 272 272 auto name = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 273 273 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 274 throwScope.release(); 274 275 impl.namedDeleter(WTFMove(name)); 275 276 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp
r264855 r265046 320 320 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 321 321 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 322 throwScope.release(); 322 323 impl.namedSetter(WTFMove(name), WTFMove(value)); 323 324 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp
r264855 r265046 345 345 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 346 346 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 347 throwScope.release(); 347 348 impl.namedSetter(WTFMove(name), WTFMove(value)); 348 349 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp
r264855 r265046 368 368 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 369 369 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 370 throwScope.release(); 370 371 impl.namedSetter(WTFMove(name), WTFMove(value)); 371 372 return JSValue::encode(jsUndefined()); … … 390 391 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 391 392 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 393 throwScope.release(); 392 394 impl.indexedSetter(WTFMove(index), WTFMove(value)); 393 395 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp
r264855 r265046 355 355 UNUSED_PARAM(callFrame); 356 356 auto& impl = castedThis->wrapped(); 357 throwScope.release(); 357 358 impl.unforgeableOperation(); 358 359 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp
r264855 r265046 336 336 UNUSED_PARAM(callFrame); 337 337 auto& impl = castedThis->wrapped(); 338 throwScope.release(); 338 339 impl.unforgeableOperation(); 339 340 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r264855 r265046 324 324 UNUSED_PARAM(callFrame); 325 325 auto& impl = castedThis->wrapped(); 326 throwScope.release(); 326 327 impl.testWorkerPromise(WTFMove(promise)); 327 328 return JSValue::encode(jsUndefined()); … … 340 341 UNUSED_PARAM(callFrame); 341 342 auto& impl = castedThis->wrapped(); 343 throwScope.release(); 342 344 impl.calculateSecretResult(WTFMove(promise)); 343 345 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r264988 r265046 2572 2572 auto param = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 2573 2573 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 2574 throwScope.release(); 2574 2575 impl.legacyCallerNamed(WTFMove(param)); 2575 2576 return JSValue::encode(jsUndefined()); … … 2598 2599 ASSERT(castedThis); 2599 2600 auto& impl = castedThis->wrapped(); 2601 throwScope.release(); 2600 2602 impl.legacyCallerOperationFromBindings(); 2601 2603 return JSValue::encode(jsUndefined()); … … 5582 5584 auto testParam = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 5583 5585 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5586 throwScope.release(); 5584 5587 impl.enabledAtRuntimeOperation(WTFMove(testParam)); 5585 5588 return JSValue::encode(jsUndefined()); … … 5599 5602 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 5600 5603 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5604 throwScope.release(); 5601 5605 impl.enabledAtRuntimeOperation(WTFMove(testParam)); 5602 5606 return JSValue::encode(jsUndefined()); … … 5646 5650 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 5647 5651 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5652 throwScope.release(); 5648 5653 TestObj::enabledAtRuntimeOperationStatic(WTFMove(testParam)); 5649 5654 return JSValue::encode(jsUndefined()); … … 5669 5674 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 5670 5675 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5676 throwScope.release(); 5671 5677 impl.enabledInSpecificWorldWhenRuntimeFeatureEnabled(WTFMove(testParam)); 5672 5678 return JSValue::encode(jsUndefined()); … … 5690 5696 auto testParam = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 5691 5697 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5698 throwScope.release(); 5692 5699 impl.worldSpecificMethod(WTFMove(testParam)); 5693 5700 return JSValue::encode(jsUndefined()); … … 5706 5713 UNUSED_PARAM(callFrame); 5707 5714 auto& impl = castedThis->wrapped(); 5715 throwScope.release(); 5708 5716 impl.calculateSecretResult(WTFMove(promise)); 5709 5717 return JSValue::encode(jsUndefined()); … … 5755 5763 UNUSED_PARAM(callFrame); 5756 5764 auto& impl = castedThis->wrapped(); 5765 throwScope.release(); 5757 5766 impl.voidMethod(); 5758 5767 return JSValue::encode(jsUndefined()); … … 5782 5791 auto objArg = convert<IDLInterface<TestObj>>(*lexicalGlobalObject, argument2.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 2, "objArg", "TestObject", "voidMethodWithArgs", "TestObj"); }); 5783 5792 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5793 throwScope.release(); 5784 5794 impl.voidMethodWithArgs(WTFMove(longArg), WTFMove(strArg), *objArg); 5785 5795 return JSValue::encode(jsUndefined()); … … 5982 5992 auto arg = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 5983 5993 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5994 throwScope.release(); 5984 5995 impl.methodWithArgTreatingNullAsEmptyString(WTFMove(arg)); 5985 5996 return JSValue::encode(jsUndefined()); … … 6003 6014 auto resolver = convert<IDLXPathNSResolver<XPathNSResolver>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "resolver", "TestObject", "methodWithXPathNSResolverParameter", "XPathNSResolver"); }); 6004 6015 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6016 throwScope.release(); 6005 6017 impl.methodWithXPathNSResolverParameter(*resolver); 6006 6018 return JSValue::encode(jsUndefined()); … … 6073 6085 auto enumArg = convert<IDLEnumeration<TestObj::EnumType>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeEnumError(lexicalGlobalObject, scope, 0, "enumArg", "TestObject", "methodWithEnumArg", expectedEnumerationValues<TestObj::EnumType>()); }); 6074 6086 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6087 throwScope.release(); 6075 6088 impl.methodWithEnumArg(WTFMove(enumArg)); 6076 6089 return JSValue::encode(jsUndefined()); … … 6094 6107 auto enumArg = convert<IDLEnumeration<TestStandaloneEnumeration>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeEnumError(lexicalGlobalObject, scope, 0, "enumArg", "TestObject", "methodWithStandaloneEnumArg", expectedEnumerationValues<TestStandaloneEnumeration>()); }); 6095 6108 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6109 throwScope.release(); 6096 6110 impl.methodWithStandaloneEnumArg(WTFMove(enumArg)); 6097 6111 return JSValue::encode(jsUndefined()); … … 6113 6127 auto enumArg = argument0.value().isUndefined() ? Optional<Converter<IDLEnumeration<TestObj::EnumType>>::ReturnType>() : Optional<Converter<IDLEnumeration<TestObj::EnumType>>::ReturnType>(convert<IDLEnumeration<TestObj::EnumType>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeEnumError(lexicalGlobalObject, scope, 0, "enumArg", "TestObject", "methodWithOptionalEnumArg", expectedEnumerationValues<TestObj::EnumType>()); })); 6114 6128 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6129 throwScope.release(); 6115 6130 impl.methodWithOptionalEnumArg(WTFMove(enumArg)); 6116 6131 return JSValue::encode(jsUndefined()); … … 6132 6147 auto enumArg = argument0.value().isUndefined() ? TestObj::EnumType::EnumValue1 : convert<IDLEnumeration<TestObj::EnumType>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeEnumError(lexicalGlobalObject, scope, 0, "enumArg", "TestObject", "methodWithOptionalEnumArgAndDefaultValue", expectedEnumerationValues<TestObj::EnumType>()); }); 6133 6148 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6149 throwScope.release(); 6134 6150 impl.methodWithOptionalEnumArgAndDefaultValue(WTFMove(enumArg)); 6135 6151 return JSValue::encode(jsUndefined()); … … 6176 6192 auto str = convert<IDLUSVString>(*lexicalGlobalObject, argument0.value()); 6177 6193 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6194 throwScope.release(); 6178 6195 impl.methodWithUSVStringArg(WTFMove(str)); 6179 6196 return JSValue::encode(jsUndefined()); … … 6197 6214 auto str = convert<IDLNullable<IDLUSVString>>(*lexicalGlobalObject, argument0.value()); 6198 6215 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6216 throwScope.release(); 6199 6217 impl.methodWithNullableUSVStringArg(WTFMove(str)); 6200 6218 return JSValue::encode(jsUndefined()); … … 6218 6236 auto str = convert<IDLTreatNullAsEmptyAdaptor<IDLUSVString>>(*lexicalGlobalObject, argument0.value()); 6219 6237 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6238 throwScope.release(); 6220 6239 impl.methodWithUSVStringArgTreatingNullAsEmptyString(WTFMove(str)); 6221 6240 return JSValue::encode(jsUndefined()); … … 6239 6258 auto str = convert<IDLByteString>(*lexicalGlobalObject, argument0.value()); 6240 6259 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6260 throwScope.release(); 6241 6261 impl.methodWithByteStringArg(WTFMove(str)); 6242 6262 return JSValue::encode(jsUndefined()); … … 6260 6280 auto str = convert<IDLNullable<IDLByteString>>(*lexicalGlobalObject, argument0.value()); 6261 6281 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6282 throwScope.release(); 6262 6283 impl.methodWithNullableByteStringArg(WTFMove(str)); 6263 6284 return JSValue::encode(jsUndefined()); … … 6281 6302 auto str = convert<IDLTreatNullAsEmptyAdaptor<IDLByteString>>(*lexicalGlobalObject, argument0.value()); 6282 6303 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6304 throwScope.release(); 6283 6305 impl.methodWithByteStringArgTreatingNullAsEmptyString(WTFMove(str)); 6284 6306 return JSValue::encode(jsUndefined()); … … 6302 6324 auto serializedArg = convert<IDLSerializedScriptValue<SerializedScriptValue>>(*lexicalGlobalObject, argument0.value()); 6303 6325 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6326 throwScope.release(); 6304 6327 impl.serializedValue(WTFMove(serializedArg)); 6305 6328 return JSValue::encode(jsUndefined()); … … 6323 6346 auto recordParameter = convert<IDLRecord<IDLDOMString, IDLLong>>(*lexicalGlobalObject, argument0.value()); 6324 6347 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6348 throwScope.release(); 6325 6349 impl.methodWithRecord(WTFMove(recordParameter)); 6326 6350 return JSValue::encode(jsUndefined()); … … 6339 6363 UNUSED_PARAM(callFrame); 6340 6364 auto& impl = castedThis->wrapped(); 6365 throwScope.release(); 6341 6366 propagateException(*lexicalGlobalObject, throwScope, impl.methodWithException()); 6342 6367 return JSValue::encode(jsUndefined()); … … 6464 6489 auto useCapture = convert<IDLBoolean>(*lexicalGlobalObject, argument2.value()); 6465 6490 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6491 throwScope.release(); 6466 6492 impl.addEventListener(WTFMove(type), WTFMove(listener), WTFMove(useCapture)); 6467 6493 vm.heap.writeBarrier(&static_cast<JSObject&>(*castedThis), argument1.value()); … … 6492 6518 auto useCapture = convert<IDLBoolean>(*lexicalGlobalObject, argument2.value()); 6493 6519 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6520 throwScope.release(); 6494 6521 impl.removeEventListener(WTFMove(type), WTFMove(listener), WTFMove(useCapture)); 6495 6522 vm.heap.writeBarrier(&static_cast<JSObject&>(*castedThis), argument1.value()); … … 6509 6536 UNUSED_PARAM(callFrame); 6510 6537 auto& impl = castedThis->wrapped(); 6538 throwScope.release(); 6511 6539 impl.withExecStateVoid(*jsCast<JSDOMGlobalObject*>(lexicalGlobalObject)); 6512 6540 return JSValue::encode(jsUndefined()); … … 6540 6568 UNUSED_PARAM(callFrame); 6541 6569 auto& impl = castedThis->wrapped(); 6570 throwScope.release(); 6542 6571 propagateException(*lexicalGlobalObject, throwScope, impl.withExecStateVoidException(*jsCast<JSDOMGlobalObject*>(lexicalGlobalObject))); 6543 6572 return JSValue::encode(jsUndefined()); … … 6574 6603 if (UNLIKELY(!context)) 6575 6604 return JSValue::encode(jsUndefined()); 6605 throwScope.release(); 6576 6606 impl.withScriptExecutionContext(*context); 6577 6607 return JSValue::encode(jsUndefined()); … … 6593 6623 if (UNLIKELY(!context)) 6594 6624 return JSValue::encode(jsUndefined()); 6625 throwScope.release(); 6595 6626 impl.withScriptExecutionContextAndExecState(*jsCast<JSDOMGlobalObject*>(lexicalGlobalObject), *callFrame, *context); 6596 6627 return JSValue::encode(jsUndefined()); … … 6650 6681 ASSERT(context->isDocument()); 6651 6682 auto& document = downcast<Document>(*context); 6683 throwScope.release(); 6652 6684 impl.withDocumentArgument(document); 6653 6685 return JSValue::encode(jsUndefined()); … … 6669 6701 if (!incumbentDocument) 6670 6702 return JSValue::encode(jsUndefined()); 6703 throwScope.release(); 6671 6704 impl.withCallerDocumentArgument(*incumbentDocument); 6672 6705 return JSValue::encode(jsUndefined()); … … 6685 6718 UNUSED_PARAM(callFrame); 6686 6719 auto& impl = castedThis->wrapped(); 6720 throwScope.release(); 6687 6721 impl.withCallerWindowArgument(incumbentDOMWindow(*jsCast<JSDOMGlobalObject*>(lexicalGlobalObject), *callFrame)); 6688 6722 return JSValue::encode(jsUndefined()); … … 6704 6738 auto opt = argument0.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument0.value())); 6705 6739 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6740 throwScope.release(); 6706 6741 impl.methodWithOptionalArg(WTFMove(opt)); 6707 6742 return JSValue::encode(jsUndefined()); … … 6723 6758 auto opt = argument0.value().isUndefined() ? 666 : convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 6724 6759 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6760 throwScope.release(); 6725 6761 impl.methodWithOptionalArgAndDefaultValue(WTFMove(opt)); 6726 6762 return JSValue::encode(jsUndefined()); … … 6747 6783 auto opt = argument1.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument1.value())); 6748 6784 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6785 throwScope.release(); 6749 6786 impl.methodWithNonOptionalArgAndOptionalArg(WTFMove(nonOpt), WTFMove(opt)); 6750 6787 return JSValue::encode(jsUndefined()); … … 6774 6811 auto opt2 = argument2.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument2.value())); 6775 6812 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6813 throwScope.release(); 6776 6814 impl.methodWithNonOptionalArgAndTwoOptionalArgs(WTFMove(nonOpt), WTFMove(opt1), WTFMove(opt2)); 6777 6815 return JSValue::encode(jsUndefined()); … … 6793 6831 auto str = argument0.value().isUndefined() ? String() : convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 6794 6832 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6833 throwScope.release(); 6795 6834 impl.methodWithOptionalString(WTFMove(str)); 6796 6835 return JSValue::encode(jsUndefined()); … … 6812 6851 auto str = argument0.value().isUndefined() ? String() : convert<IDLUSVString>(*lexicalGlobalObject, argument0.value()); 6813 6852 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6853 throwScope.release(); 6814 6854 impl.methodWithOptionalUSVString(WTFMove(str)); 6815 6855 return JSValue::encode(jsUndefined()); … … 6831 6871 auto str = argument0.value().isUndefined() ? nullAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 6832 6872 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6873 throwScope.release(); 6833 6874 impl.methodWithOptionalAtomString(WTFMove(str)); 6834 6875 return JSValue::encode(jsUndefined()); … … 6850 6891 auto str = argument0.value().isUndefined() ? "foo"_s : convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 6851 6892 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6893 throwScope.release(); 6852 6894 impl.methodWithOptionalStringAndDefaultValue(WTFMove(str)); 6853 6895 return JSValue::encode(jsUndefined()); … … 6869 6911 auto str = argument0.value().isUndefined() ? AtomString("foo", AtomString::ConstructFromLiteral) : convert<IDLAtomStringAdaptor<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 6870 6912 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6913 throwScope.release(); 6871 6914 impl.methodWithOptionalAtomStringAndDefaultValue(WTFMove(str)); 6872 6915 return JSValue::encode(jsUndefined()); … … 6888 6931 auto str = argument0.value().isUndefined() ? String() : convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 6889 6932 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6933 throwScope.release(); 6890 6934 impl.methodWithOptionalStringIsNull(WTFMove(str)); 6891 6935 return JSValue::encode(jsUndefined()); … … 6907 6951 auto str = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 6908 6952 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6953 throwScope.release(); 6909 6954 impl.methodWithOptionalStringIsUndefined(WTFMove(str)); 6910 6955 return JSValue::encode(jsUndefined()); … … 6926 6971 auto str = argument0.value().isUndefined() ? nullAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 6927 6972 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6973 throwScope.release(); 6928 6974 impl.methodWithOptionalAtomStringIsNull(WTFMove(str)); 6929 6975 return JSValue::encode(jsUndefined()); … … 6945 6991 auto str = argument0.value().isUndefined() ? emptyString() : convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 6946 6992 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 6993 throwScope.release(); 6947 6994 impl.methodWithOptionalStringIsEmptyString(WTFMove(str)); 6948 6995 return JSValue::encode(jsUndefined()); … … 6964 7011 auto str = argument0.value().isUndefined() ? emptyString() : convert<IDLUSVString>(*lexicalGlobalObject, argument0.value()); 6965 7012 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7013 throwScope.release(); 6966 7014 impl.methodWithOptionalUSVStringIsEmptyString(WTFMove(str)); 6967 7015 return JSValue::encode(jsUndefined()); … … 6983 7031 auto str = argument0.value().isUndefined() ? emptyAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 6984 7032 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7033 throwScope.release(); 6985 7034 impl.methodWithOptionalAtomStringIsEmptyString(WTFMove(str)); 6986 7035 return JSValue::encode(jsUndefined()); … … 7002 7051 auto number = convert<IDLUnrestrictedDouble>(*lexicalGlobalObject, argument0.value()); 7003 7052 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7053 throwScope.release(); 7004 7054 impl.methodWithOptionalDoubleIsNaN(WTFMove(number)); 7005 7055 return JSValue::encode(jsUndefined()); … … 7021 7071 auto number = convert<IDLUnrestrictedFloat>(*lexicalGlobalObject, argument0.value()); 7022 7072 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7073 throwScope.release(); 7023 7074 impl.methodWithOptionalFloatIsNaN(WTFMove(number)); 7024 7075 return JSValue::encode(jsUndefined()); … … 7040 7091 auto number = argument0.value().isUndefined() ? Optional<Converter<IDLLongLong>::ReturnType>() : Optional<Converter<IDLLongLong>::ReturnType>(convert<IDLLongLong>(*lexicalGlobalObject, argument0.value())); 7041 7092 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7093 throwScope.release(); 7042 7094 impl.methodWithOptionalLongLong(WTFMove(number)); 7043 7095 return JSValue::encode(jsUndefined()); … … 7059 7111 auto number = convert<IDLLongLong>(*lexicalGlobalObject, argument0.value()); 7060 7112 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7113 throwScope.release(); 7061 7114 impl.methodWithOptionalLongLongIsZero(WTFMove(number)); 7062 7115 return JSValue::encode(jsUndefined()); … … 7078 7131 auto number = argument0.value().isUndefined() ? Optional<Converter<IDLUnsignedLongLong>::ReturnType>() : Optional<Converter<IDLUnsignedLongLong>::ReturnType>(convert<IDLUnsignedLongLong>(*lexicalGlobalObject, argument0.value())); 7079 7132 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7133 throwScope.release(); 7080 7134 impl.methodWithOptionalUnsignedLongLong(WTFMove(number)); 7081 7135 return JSValue::encode(jsUndefined()); … … 7097 7151 auto number = convert<IDLUnsignedLongLong>(*lexicalGlobalObject, argument0.value()); 7098 7152 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7153 throwScope.release(); 7099 7154 impl.methodWithOptionalUnsignedLongLongIsZero(WTFMove(number)); 7100 7155 return JSValue::encode(jsUndefined()); … … 7116 7171 auto array = argument0.value().isUndefined() ? Converter<IDLSequence<IDLDOMString>>::ReturnType{ } : convert<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 7117 7172 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7173 throwScope.release(); 7118 7174 impl.methodWithOptionalSequence(WTFMove(array)); 7119 7175 return JSValue::encode(jsUndefined()); … … 7135 7191 auto array = argument0.value().isUndefined() ? Converter<IDLSequence<IDLDOMString>>::ReturnType{ } : convert<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 7136 7192 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7193 throwScope.release(); 7137 7194 impl.methodWithOptionalSequenceIsEmpty(WTFMove(array)); 7138 7195 return JSValue::encode(jsUndefined()); … … 7154 7211 auto b = argument0.value().isUndefined() ? Optional<Converter<IDLBoolean>::ReturnType>() : Optional<Converter<IDLBoolean>::ReturnType>(convert<IDLBoolean>(*lexicalGlobalObject, argument0.value())); 7155 7212 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7213 throwScope.release(); 7156 7214 impl.methodWithOptionalBoolean(WTFMove(b)); 7157 7215 return JSValue::encode(jsUndefined()); … … 7173 7231 auto b = convert<IDLBoolean>(*lexicalGlobalObject, argument0.value()); 7174 7232 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7233 throwScope.release(); 7175 7234 impl.methodWithOptionalBooleanIsFalse(WTFMove(b)); 7176 7235 return JSValue::encode(jsUndefined()); … … 7192 7251 auto a = convert<IDLAny>(*lexicalGlobalObject, argument0.value()); 7193 7252 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7253 throwScope.release(); 7194 7254 impl.methodWithOptionalAny(WTFMove(a)); 7195 7255 return JSValue::encode(jsUndefined()); … … 7211 7271 auto a = argument0.value().isUndefined() ? Optional<Converter<IDLObject>::ReturnType>() : Optional<Converter<IDLObject>::ReturnType>(convert<IDLObject>(*lexicalGlobalObject, argument0.value())); 7212 7272 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7273 throwScope.release(); 7213 7274 impl.methodWithOptionalObject(WTFMove(a)); 7214 7275 return JSValue::encode(jsUndefined()); … … 7230 7291 auto obj = convert<IDLNullable<IDLInterface<TestObj>>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "obj", "TestObject", "methodWithOptionalNullableWrapper", "TestObj"); }); 7231 7292 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7293 throwScope.release(); 7232 7294 impl.methodWithOptionalNullableWrapper(WTFMove(obj)); 7233 7295 return JSValue::encode(jsUndefined()); … … 7249 7311 auto obj = convert<IDLNullable<IDLInterface<TestObj>>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "obj", "TestObject", "methodWithOptionalNullableWrapperIsNull", "TestObj"); }); 7250 7312 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7313 throwScope.release(); 7251 7314 impl.methodWithOptionalNullableWrapperIsNull(WTFMove(obj)); 7252 7315 return JSValue::encode(jsUndefined()); … … 7268 7331 auto resolver = convert<IDLNullable<IDLXPathNSResolver<XPathNSResolver>>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "resolver", "TestObject", "methodWithOptionalXPathNSResolver", "XPathNSResolver"); }); 7269 7332 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7333 throwScope.release(); 7270 7334 impl.methodWithOptionalXPathNSResolver(WTFMove(resolver)); 7271 7335 return JSValue::encode(jsUndefined()); … … 7287 7351 auto record = argument0.value().isUndefined() ? WTF::nullopt : convert<IDLNullable<IDLRecord<IDLDOMString, IDLLong>>>(*lexicalGlobalObject, argument0.value()); 7288 7352 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7353 throwScope.release(); 7289 7354 impl.methodWithOptionalRecord(WTFMove(record)); 7290 7355 return JSValue::encode(jsUndefined()); … … 7306 7371 auto promise = argument0.value().isUndefined() ? nullptr : convert<IDLPromise<IDLVoid>>(*lexicalGlobalObject, argument0.value()); 7307 7372 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7373 throwScope.release(); 7308 7374 impl.methodWithOptionalPromise(WTFMove(promise)); 7309 7375 return JSValue::encode(jsUndefined()); … … 7327 7393 auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackArg"); }); 7328 7394 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7395 throwScope.release(); 7329 7396 impl.methodWithCallbackArg(callback.releaseNonNull()); 7330 7397 return JSValue::encode(jsUndefined()); … … 7351 7418 auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackArg"); }); 7352 7419 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7420 throwScope.release(); 7353 7421 impl.methodWithNonCallbackArgAndCallbackArg(WTFMove(nonCallback), callback.releaseNonNull()); 7354 7422 return JSValue::encode(jsUndefined()); … … 7370 7438 auto callback = convert<IDLNullable<IDLCallbackInterface<JSTestCallbackInterface>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackAndOptionalArg"); }); 7371 7439 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7440 throwScope.release(); 7372 7441 impl.methodWithCallbackAndOptionalArg(WTFMove(callback)); 7373 7442 return JSValue::encode(jsUndefined()); … … 7391 7460 auto callback = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackFunctionArg"); }); 7392 7461 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7462 throwScope.release(); 7393 7463 impl.methodWithCallbackFunctionArg(callback.releaseNonNull()); 7394 7464 return JSValue::encode(jsUndefined()); … … 7415 7485 auto callback = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackFunctionArg"); }); 7416 7486 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7487 throwScope.release(); 7417 7488 impl.methodWithNonCallbackArgAndCallbackFunctionArg(WTFMove(nonCallback), callback.releaseNonNull()); 7418 7489 return JSValue::encode(jsUndefined()); … … 7434 7505 auto callback = convert<IDLNullable<IDLCallbackFunction<JSTestCallbackFunction>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackFunctionAndOptionalArg"); }); 7435 7506 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7507 throwScope.release(); 7436 7508 impl.methodWithCallbackFunctionAndOptionalArg(WTFMove(callback)); 7437 7509 return JSValue::encode(jsUndefined()); … … 7452 7524 auto callback = convert<IDLNullable<IDLCallbackInterface<JSTestCallbackInterface>>>(*lexicalGlobalObject, argument0.value(), *jsCast<JSDOMGlobalObject*>(lexicalGlobalObject), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "staticMethodWithCallbackAndOptionalArg"); }); 7453 7525 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7526 throwScope.release(); 7454 7527 TestObj::staticMethodWithCallbackAndOptionalArg(WTFMove(callback)); 7455 7528 return JSValue::encode(jsUndefined()); … … 7472 7545 auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *jsCast<JSDOMGlobalObject*>(lexicalGlobalObject), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "staticMethodWithCallbackArg"); }); 7473 7546 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7547 throwScope.release(); 7474 7548 TestObj::staticMethodWithCallbackArg(callback.releaseNonNull()); 7475 7549 return JSValue::encode(jsUndefined()); … … 7507 7581 UNUSED_PARAM(callFrame); 7508 7582 auto& impl = castedThis->wrapped(); 7583 throwScope.release(); 7509 7584 impl.conditionalMethod2(); 7510 7585 return JSValue::encode(jsUndefined()); … … 7526 7601 UNUSED_PARAM(callFrame); 7527 7602 auto& impl = castedThis->wrapped(); 7603 throwScope.release(); 7528 7604 impl.conditionalMethod3(); 7529 7605 return JSValue::encode(jsUndefined()); … … 7550 7626 auto strArg = convert<IDLDOMString>(*lexicalGlobalObject, argument1.value()); 7551 7627 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7628 throwScope.release(); 7552 7629 impl.overloadedMethod(WTFMove(objArg), WTFMove(strArg)); 7553 7630 return JSValue::encode(jsUndefined()); … … 7567 7644 auto longArg = argument1.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument1.value())); 7568 7645 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7646 throwScope.release(); 7569 7647 impl.overloadedMethod(WTFMove(objArg), WTFMove(longArg)); 7570 7648 return JSValue::encode(jsUndefined()); … … 7581 7659 auto strArg = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 7582 7660 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7661 throwScope.release(); 7583 7662 impl.overloadedMethod(WTFMove(strArg)); 7584 7663 return JSValue::encode(jsUndefined()); … … 7595 7674 auto longArg = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 7596 7675 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7676 throwScope.release(); 7597 7677 impl.overloadedMethod(WTFMove(longArg)); 7598 7678 return JSValue::encode(jsUndefined()); … … 7609 7689 auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "overloadedMethod"); }); 7610 7690 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7691 throwScope.release(); 7611 7692 impl.overloadedMethod(callback.releaseNonNull()); 7612 7693 return JSValue::encode(jsUndefined()); … … 7623 7704 auto listArg = convert<IDLNullable<IDLInterface<DOMStringList>>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "listArg", "TestObject", "overloadedMethod", "DOMStringList"); }); 7624 7705 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7706 throwScope.release(); 7625 7707 impl.overloadedMethod(WTFMove(listArg)); 7626 7708 return JSValue::encode(jsUndefined()); … … 7637 7719 auto arrayArg = convert<IDLNullable<IDLSequence<IDLDOMString>>>(*lexicalGlobalObject, argument0.value()); 7638 7720 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7721 throwScope.release(); 7639 7722 impl.overloadedMethod(WTFMove(arrayArg)); 7640 7723 return JSValue::encode(jsUndefined()); … … 7651 7734 auto objArg = convert<IDLInterface<TestObj>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "objArg", "TestObject", "overloadedMethod", "TestObj"); }); 7652 7735 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7736 throwScope.release(); 7653 7737 impl.overloadedMethod(*objArg); 7654 7738 return JSValue::encode(jsUndefined()); … … 7665 7749 auto window = convert<IDLInterface<WindowProxy>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "window", "TestObject", "overloadedMethod", "WindowProxy"); }); 7666 7750 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7751 throwScope.release(); 7667 7752 impl.overloadedMethod(*window); 7668 7753 return JSValue::encode(jsUndefined()); … … 7679 7764 auto arrayArg = convert<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 7680 7765 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7766 throwScope.release(); 7681 7767 impl.overloadedMethod(WTFMove(arrayArg)); 7682 7768 return JSValue::encode(jsUndefined()); … … 7693 7779 auto arrayArg = convert<IDLSequence<IDLUnsignedLong>>(*lexicalGlobalObject, argument0.value()); 7694 7780 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7781 throwScope.release(); 7695 7782 impl.overloadedMethod(WTFMove(arrayArg)); 7696 7783 return JSValue::encode(jsUndefined()); … … 7707 7794 auto strArg = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 7708 7795 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7796 throwScope.release(); 7709 7797 impl.overloadedMethod(WTFMove(strArg)); 7710 7798 return JSValue::encode(jsUndefined()); … … 7720 7808 auto blobArgs = convertVariadicArguments<IDLInterface<Blob>>(*lexicalGlobalObject, *callFrame, 0); 7721 7809 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7810 throwScope.release(); 7722 7811 impl.overloadedMethod(WTFMove(blobArgs)); 7723 7812 return JSValue::encode(jsUndefined()); … … 7789 7878 auto objArg = convert<IDLNullable<IDLInterface<TestObj>>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "objArg", "TestObject", "overloadedMethodWithOptionalParameter", "TestObj"); }); 7790 7879 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7880 throwScope.release(); 7791 7881 impl.overloadedMethodWithOptionalParameter(WTFMove(strArg), WTFMove(objArg)); 7792 7882 return JSValue::encode(jsUndefined()); … … 7806 7896 auto longArg = argument1.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument1.value())); 7807 7897 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7898 throwScope.release(); 7808 7899 impl.overloadedMethodWithOptionalParameter(WTFMove(objArg), WTFMove(longArg)); 7809 7900 return JSValue::encode(jsUndefined()); … … 7851 7942 auto objectOrNode = convert<IDLUnion<IDLInterface<TestObj>, IDLInterface<TestNode>>>(*lexicalGlobalObject, argument0.value()); 7852 7943 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7944 throwScope.release(); 7853 7945 impl.overloadedMethodWithDistinguishingUnion(WTFMove(objectOrNode)); 7854 7946 return JSValue::encode(jsUndefined()); … … 7865 7957 auto value = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 7866 7958 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7959 throwScope.release(); 7867 7960 impl.overloadedMethodWithDistinguishingUnion(WTFMove(value)); 7868 7961 return JSValue::encode(jsUndefined()); … … 7904 7997 auto objectOrNode = convert<IDLUnion<IDLInterface<TestObj>, IDLInterface<TestNode>>>(*lexicalGlobalObject, argument0.value()); 7905 7998 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 7999 throwScope.release(); 7906 8000 impl.overloadedMethodWith2DistinguishingUnions(WTFMove(objectOrNode)); 7907 8001 return JSValue::encode(jsUndefined()); … … 7918 8012 auto value = convert<IDLUnion<IDLInterface<TestInterface>, IDLDOMString, IDLLong>>(*lexicalGlobalObject, argument0.value()); 7919 8013 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8014 throwScope.release(); 7920 8015 impl.overloadedMethodWith2DistinguishingUnions(WTFMove(value)); 7921 8016 return JSValue::encode(jsUndefined()); … … 7962 8057 auto object = convert<IDLInterface<TestObj>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "object", "TestObject", "overloadedMethodWithNonDistinguishingUnion", "TestObj"); }); 7963 8058 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8059 throwScope.release(); 7964 8060 impl.overloadedMethodWithNonDistinguishingUnion(WTFMove(objectOrNode), *object); 7965 8061 return JSValue::encode(jsUndefined()); … … 7979 8075 auto node = convert<IDLInterface<TestNode>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "node", "TestObject", "overloadedMethodWithNonDistinguishingUnion", "TestNode"); }); 7980 8076 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8077 throwScope.release(); 7981 8078 impl.overloadedMethodWithNonDistinguishingUnion(WTFMove(objectOrNode), *node); 7982 8079 return JSValue::encode(jsUndefined()); … … 8015 8112 auto objectOrNode = convert<IDLNullable<IDLUnion<IDLInterface<TestObj>, IDLInterface<TestNode>>>>(*lexicalGlobalObject, argument0.value()); 8016 8113 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8114 throwScope.release(); 8017 8115 impl.overloadWithNullableUnion(WTFMove(objectOrNode)); 8018 8116 return JSValue::encode(jsUndefined()); … … 8029 8127 auto index = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 8030 8128 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8129 throwScope.release(); 8031 8130 impl.overloadWithNullableUnion(WTFMove(index)); 8032 8131 return JSValue::encode(jsUndefined()); … … 8070 8169 auto objectOrNode = argument0.value().isUndefined() ? true : convert<IDLUnion<IDLDOMString, IDLBoolean>>(*lexicalGlobalObject, argument0.value()); 8071 8170 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8171 throwScope.release(); 8072 8172 impl.overloadWithOptionalUnion(WTFMove(objectOrNode)); 8073 8173 return JSValue::encode(jsUndefined()); … … 8084 8184 auto index = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 8085 8185 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8186 throwScope.release(); 8086 8187 impl.overloadWithOptionalUnion(WTFMove(index)); 8087 8188 return JSValue::encode(jsUndefined()); … … 8129 8230 auto node = convert<IDLInterface<TestNode>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "node", "TestObject", "overloadWithNullableNonDistinguishingParameter", "TestNode"); }); 8130 8231 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8232 throwScope.release(); 8131 8233 impl.overloadWithNullableNonDistinguishingParameter(WTFMove(obj), *node); 8132 8234 return JSValue::encode(jsUndefined()); … … 8146 8248 auto index = convert<IDLLong>(*lexicalGlobalObject, argument1.value()); 8147 8249 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8250 throwScope.release(); 8148 8251 impl.overloadWithNullableNonDistinguishingParameter(WTFMove(node), WTFMove(index)); 8149 8252 return JSValue::encode(jsUndefined()); … … 8179 8282 UNUSED_PARAM(throwScope); 8180 8283 UNUSED_PARAM(callFrame); 8284 throwScope.release(); 8181 8285 TestObj::classMethod(); 8182 8286 return JSValue::encode(jsUndefined()); … … 8229 8333 auto arg = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 8230 8334 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8335 throwScope.release(); 8231 8336 TestObj::overloadedMethod1(WTFMove(arg)); 8232 8337 return JSValue::encode(jsUndefined()); … … 8245 8350 auto type = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 8246 8351 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8352 throwScope.release(); 8247 8353 TestObj::overloadedMethod1(WTFMove(type)); 8248 8354 return JSValue::encode(jsUndefined()); … … 8295 8401 auto objArgsLong = convert<IDLClampAdaptor<IDLUnsignedLong>>(*lexicalGlobalObject, argument1.value()); 8296 8402 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8403 throwScope.release(); 8297 8404 impl.classMethodWithClamp(WTFMove(objArgsShort), WTFMove(objArgsLong)); 8298 8405 return JSValue::encode(jsUndefined()); … … 8314 8421 auto objArgsLong = convert<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, argument0.value()); 8315 8422 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8423 throwScope.release(); 8316 8424 impl.classMethodWithClampOnOptional(WTFMove(objArgsLong)); 8317 8425 return JSValue::encode(jsUndefined()); … … 8338 8446 auto objArgsLong = convert<IDLEnforceRangeAdaptor<IDLUnsignedLong>>(*lexicalGlobalObject, argument1.value()); 8339 8447 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8448 throwScope.release(); 8340 8449 impl.classMethodWithEnforceRange(WTFMove(objArgsShort), WTFMove(objArgsLong)); 8341 8450 return JSValue::encode(jsUndefined()); … … 8357 8466 auto objArgsLong = convert<IDLEnforceRangeAdaptor<IDLLong>>(*lexicalGlobalObject, argument0.value()); 8358 8467 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8468 throwScope.release(); 8359 8469 impl.classMethodWithEnforceRangeOnOptional(WTFMove(objArgsLong)); 8360 8470 return JSValue::encode(jsUndefined()); … … 8378 8488 auto unsignedLongSequence = convert<IDLSequence<IDLUnsignedLong>>(*lexicalGlobalObject, argument0.value()); 8379 8489 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8490 throwScope.release(); 8380 8491 impl.methodWithUnsignedLongSequence(WTFMove(unsignedLongSequence)); 8381 8492 return JSValue::encode(jsUndefined()); … … 8437 8548 auto optionalUnion = argument0.value().isUndefined() ? Optional<Converter<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>::ReturnType>() : Optional<Converter<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>::ReturnType>(convert<IDLUnion<IDLDOMString, IDLSequence<IDLUnrestrictedDouble>>>(*lexicalGlobalObject, argument0.value())); 8438 8549 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8550 throwScope.release(); 8439 8551 impl.operationWithOptionalUnionParameter(WTFMove(optionalUnion)); 8440 8552 return JSValue::encode(jsUndefined()); … … 8461 8573 auto nullableArrayArg = convert<IDLNullable<IDLSequence<IDLUnsignedLong>>>(*lexicalGlobalObject, argument1.value()); 8462 8574 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8575 throwScope.release(); 8463 8576 impl.methodWithAndWithoutNullableSequence(WTFMove(arrayArg), WTFMove(nullableArrayArg)); 8464 8577 return JSValue::encode(jsUndefined()); … … 8517 8630 auto value = convert<IDLInterface<TestNode>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "value", "TestObject", "convert1", "TestNode"); }); 8518 8631 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8632 throwScope.release(); 8519 8633 impl.convert1(*value); 8520 8634 return JSValue::encode(jsUndefined()); … … 8538 8652 auto value = convert<IDLNullable<IDLInterface<TestNode>>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "value", "TestObject", "convert2", "TestNode"); }); 8539 8653 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8654 throwScope.release(); 8540 8655 impl.convert2(WTFMove(value)); 8541 8656 return JSValue::encode(jsUndefined()); … … 8559 8674 auto value = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 8560 8675 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8676 throwScope.release(); 8561 8677 impl.convert3(WTFMove(value)); 8562 8678 return JSValue::encode(jsUndefined()); … … 8580 8696 auto value = convert<IDLNullable<IDLDOMString>>(*lexicalGlobalObject, argument0.value()); 8581 8697 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8698 throwScope.release(); 8582 8699 impl.convert4(WTFMove(value)); 8583 8700 return JSValue::encode(jsUndefined()); … … 8611 8728 UNUSED_PARAM(callFrame); 8612 8729 auto& impl = castedThis->wrapped(); 8730 throwScope.release(); 8613 8731 impl.banana(); 8614 8732 return JSValue::encode(jsUndefined()); … … 8634 8752 auto tail = convertVariadicArguments<IDLDOMString>(*lexicalGlobalObject, *callFrame, 1); 8635 8753 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8754 throwScope.release(); 8636 8755 impl.variadicStringMethod(WTFMove(head), WTFMove(tail)); 8637 8756 return JSValue::encode(jsUndefined()); … … 8657 8776 auto tail = convertVariadicArguments<IDLUnrestrictedDouble>(*lexicalGlobalObject, *callFrame, 1); 8658 8777 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8778 throwScope.release(); 8659 8779 impl.variadicDoubleMethod(WTFMove(head), WTFMove(tail)); 8660 8780 return JSValue::encode(jsUndefined()); … … 8680 8800 auto tail = convertVariadicArguments<IDLInterface<Node>>(*lexicalGlobalObject, *callFrame, 1); 8681 8801 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8802 throwScope.release(); 8682 8803 impl.variadicNodeMethod(*head, WTFMove(tail)); 8683 8804 return JSValue::encode(jsUndefined()); … … 8703 8824 auto tail = convertVariadicArguments<IDLUnion<IDLInterface<Node>, IDLDOMString>>(*lexicalGlobalObject, *callFrame, 1); 8704 8825 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8826 throwScope.release(); 8705 8827 impl.variadicUnionMethod(WTFMove(head), WTFMove(tail)); 8706 8828 return JSValue::encode(jsUndefined()); … … 8727 8849 auto b = convert<IDLLong>(*lexicalGlobalObject, argument1.value()); 8728 8850 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8851 throwScope.release(); 8729 8852 impl.any(WTFMove(a), WTFMove(b)); 8730 8853 return JSValue::encode(jsUndefined()); … … 8743 8866 UNUSED_PARAM(callFrame); 8744 8867 auto& impl = castedThis->wrapped(); 8868 throwScope.release(); 8745 8869 impl.testPromiseFunction(WTFMove(promise)); 8746 8870 return JSValue::encode(jsUndefined()); … … 8764 8888 auto a = convert<IDLFloat>(*lexicalGlobalObject, argument0.value()); 8765 8889 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8890 throwScope.release(); 8766 8891 impl.testPromiseFunctionWithFloatArgument(WTFMove(a), WTFMove(promise)); 8767 8892 return JSValue::encode(jsUndefined()); … … 8780 8905 UNUSED_PARAM(callFrame); 8781 8906 auto& impl = castedThis->wrapped(); 8907 throwScope.release(); 8782 8908 propagateException(*lexicalGlobalObject, throwScope, impl.testPromiseFunctionWithException(WTFMove(promise))); 8783 8909 return JSValue::encode(jsUndefined()); … … 8799 8925 auto a = argument0.value().isUndefined() ? Optional<Converter<IDLLong>::ReturnType>() : Optional<Converter<IDLLong>::ReturnType>(convert<IDLLong>(*lexicalGlobalObject, argument0.value())); 8800 8926 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8927 throwScope.release(); 8801 8928 impl.testPromiseFunctionWithOptionalIntArgument(WTFMove(a), WTFMove(promise)); 8802 8929 return JSValue::encode(jsUndefined()); … … 8818 8945 auto a = convert<IDLFloat>(*lexicalGlobalObject, argument0.value()); 8819 8946 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8947 throwScope.release(); 8820 8948 impl.testPromiseOverloadedFunction(WTFMove(a), WTFMove(promise)); 8821 8949 return JSValue::encode(jsUndefined()); … … 8832 8960 auto request = convert<IDLInterface<FetchRequest>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "request", "TestObject", "testPromiseOverloadedFunction", "FetchRequest"); }); 8833 8961 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 8962 throwScope.release(); 8834 8963 impl.testPromiseOverloadedFunction(*request, WTFMove(promise)); 8835 8964 return JSValue::encode(jsUndefined()); … … 8865 8994 UNUSED_PARAM(throwScope); 8866 8995 UNUSED_PARAM(callFrame); 8996 throwScope.release(); 8867 8997 TestObj::testStaticPromiseFunction(WTFMove(promise)); 8868 8998 return JSValue::encode(jsUndefined()); … … 8880 9010 UNUSED_PARAM(throwScope); 8881 9011 UNUSED_PARAM(callFrame); 9012 throwScope.release(); 8882 9013 propagateException(*lexicalGlobalObject, throwScope, TestObj::testStaticPromiseFunctionWithException(WTFMove(promise))); 8883 9014 return JSValue::encode(jsUndefined()); … … 8957 9088 auto str = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 8958 9089 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9090 throwScope.release(); 8959 9091 impl.conditionalOverload(WTFMove(str)); 8960 9092 return JSValue::encode(jsUndefined()); … … 8974 9106 auto a = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 8975 9107 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9108 throwScope.release(); 8976 9109 impl.conditionalOverload(WTFMove(a)); 8977 9110 return JSValue::encode(jsUndefined()); … … 9019 9152 auto str = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value()); 9020 9153 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9154 throwScope.release(); 9021 9155 impl.singleConditionalOverload(WTFMove(str)); 9022 9156 return JSValue::encode(jsUndefined()); … … 9034 9168 auto a = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 9035 9169 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9170 throwScope.release(); 9036 9171 impl.singleConditionalOverload(WTFMove(a)); 9037 9172 return JSValue::encode(jsUndefined()); … … 9075 9210 auto init = convert<IDLDictionary<TestObj::Dictionary>>(*lexicalGlobalObject, argument0.value()); 9076 9211 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9212 throwScope.release(); 9077 9213 impl.attachShadowRoot(WTFMove(init)); 9078 9214 return JSValue::encode(jsUndefined()); … … 9096 9232 auto dict = convert<IDLDictionary<DictionaryImplName>>(*lexicalGlobalObject, argument0.value()); 9097 9233 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9234 throwScope.release(); 9098 9235 impl.operationWithExternalDictionaryParameter(WTFMove(dict)); 9099 9236 return JSValue::encode(jsUndefined()); … … 9117 9254 auto data = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(*lexicalGlobalObject, argument0.value()); 9118 9255 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9256 throwScope.release(); 9119 9257 impl.bufferSourceParameter(WTFMove(data)); 9120 9258 return JSValue::encode(jsUndefined()); … … 9138 9276 auto param = convert<IDLLong>(*lexicalGlobalObject, argument0.value()); 9139 9277 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9278 throwScope.release(); 9140 9279 impl.legacyCallerNamed(WTFMove(param)); 9141 9280 return JSValue::encode(jsUndefined()); … … 9162 9301 auto b = convert<IDLInterface<Node>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "b", "TestObject", "testReturnValueOptimization", "Node"); }); 9163 9302 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9303 throwScope.release(); 9164 9304 impl.testReturnValueOptimization(*a, *b); 9165 9305 return JSValue::encode(argument0.value()); … … 9186 9326 auto b = convert<IDLInterface<Node>>(*lexicalGlobalObject, argument1.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 1, "b", "TestObject", "testReturnValueOptimizationWithException", "Node"); }); 9187 9327 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 9328 throwScope.release(); 9188 9329 propagateException(*lexicalGlobalObject, throwScope, impl.testReturnValueOptimizationWithException(*a, *b)); 9189 9330 return JSValue::encode(argument0.value()); … … 9202 9343 UNUSED_PARAM(callFrame); 9203 9344 auto& impl = castedThis->wrapped(); 9345 throwScope.release(); 9204 9346 impl.conditionallyExposedToWindowFunction(); 9205 9347 return JSValue::encode(jsUndefined()); … … 9218 9360 UNUSED_PARAM(callFrame); 9219 9361 auto& impl = castedThis->wrapped(); 9362 throwScope.release(); 9220 9363 impl.conditionallyExposedToWorkerFunction(); 9221 9364 return JSValue::encode(jsUndefined()); … … 9234 9377 UNUSED_PARAM(callFrame); 9235 9378 auto& impl = castedThis->wrapped(); 9379 throwScope.release(); 9236 9380 impl.conditionallyExposedToWindowAndWorkerFunction(); 9237 9381 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOperationConditional.cpp
r264855 r265046 209 209 UNUSED_PARAM(callFrame); 210 210 auto& impl = castedThis->wrapped(); 211 throwScope.release(); 211 212 impl.nonConditionalOperation(); 212 213 return JSValue::encode(jsUndefined()); … … 228 229 UNUSED_PARAM(callFrame); 229 230 auto& impl = castedThis->wrapped(); 231 throwScope.release(); 230 232 impl.conditionalOperation(); 231 233 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r264855 r265046 337 337 auto value = convert<IDLSerializedScriptValue<SerializedScriptValue>>(*lexicalGlobalObject, argument0.value()); 338 338 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 339 throwScope.release(); 339 340 impl.function(WTFMove(value)); 340 341 return JSValue::encode(jsUndefined()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r264855 r265046 510 510 auto x = argument0.value().isUndefined() ? Converter<IDLSequence<IDLLong>>::ReturnType{ } : convert<IDLSequence<IDLLong>>(*lexicalGlobalObject, argument0.value()); 511 511 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 512 throwScope.release(); 512 513 impl.func(WTFMove(x)); 513 514 return JSValue::encode(jsUndefined()); … … 543 544 auto alpha = argument4.value().isUndefined() ? Optional<Converter<IDLUnrestrictedFloat>::ReturnType>() : Optional<Converter<IDLUnrestrictedFloat>::ReturnType>(convert<IDLUnrestrictedFloat>(*lexicalGlobalObject, argument4.value())); 544 545 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 546 throwScope.release(); 545 547 impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha)); 546 548 return JSValue::encode(jsUndefined()); … … 584 586 auto sequenceArg = convert<IDLNullable<IDLSequence<IDLDOMString>>>(*lexicalGlobalObject, argument0.value()); 585 587 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 588 throwScope.release(); 586 589 impl.nullableSequenceArg(WTFMove(sequenceArg)); 587 590 return JSValue::encode(jsUndefined()); … … 605 608 auto sequenceArg = convert<IDLSequence<IDLNullable<IDLDOMString>>>(*lexicalGlobalObject, argument0.value()); 606 609 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 610 throwScope.release(); 607 611 impl.sequenceOfNullablesArg(WTFMove(sequenceArg)); 608 612 return JSValue::encode(jsUndefined()); … … 626 630 auto sequenceArg = convert<IDLNullable<IDLSequence<IDLNullable<IDLDOMString>>>>(*lexicalGlobalObject, argument0.value()); 627 631 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 632 throwScope.release(); 628 633 impl.nullableSequenceOfNullablesArg(WTFMove(sequenceArg)); 629 634 return JSValue::encode(jsUndefined()); … … 647 652 auto sequenceArg = convert<IDLNullable<IDLSequence<IDLUnion<IDLDOMString, IDLSequence<IDLDOMString>>>>>(*lexicalGlobalObject, argument0.value()); 648 653 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 654 throwScope.release(); 649 655 impl.nullableSequenceOfUnionsArg(WTFMove(sequenceArg)); 650 656 return JSValue::encode(jsUndefined()); … … 668 674 auto unionArg = convert<IDLUnion<IDLDOMString, IDLLong>>(*lexicalGlobalObject, argument0.value()); 669 675 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 676 throwScope.release(); 670 677 impl.unionArg(WTFMove(unionArg)); 671 678 return JSValue::encode(jsUndefined()); … … 692 699 auto arg2 = argument1.value().isUndefined() ? Optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>() : Optional<Converter<IDLClampAdaptor<IDLUnsignedLongLong>>::ReturnType>(convert<IDLClampAdaptor<IDLUnsignedLongLong>>(*lexicalGlobalObject, argument1.value())); 693 700 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 701 throwScope.release(); 694 702 impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2)); 695 703 return JSValue::encode(jsUndefined()); … … 713 721 auto arg = convert<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, argument0.value()); 714 722 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 723 throwScope.release(); 715 724 impl.funcWithClampInTypedef(WTFMove(arg)); 716 725 return JSValue::encode(jsUndefined()); … … 804 813 UNUSED_PARAM(callFrame); 805 814 auto& impl = castedThis->wrapped(); 815 throwScope.release(); 806 816 propagateException(*lexicalGlobalObject, throwScope, impl.methodWithException()); 807 817 return JSValue::encode(jsUndefined());
Note: See TracChangeset
for help on using the changeset viewer.