Changeset 266999 in webkit
- Timestamp:
- Sep 13, 2020 11:13:02 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r266998 r266999 1 2020-09-13 Sam Weinig <weinig@apple.com> 2 3 [WebIDL] Remove need for [MayThrowException] on indexed and named setters 4 https://bugs.webkit.org/show_bug.cgi?id=216441 5 6 Reviewed by Darin Adler. 7 8 Deduce implementation potentially throwing by introspecting the return 9 type of the setters implementation in a new helper, invokeFunctorPropagatingExceptionIfNecessary. 10 This allows us to remove another set of uses of [MayThrowException]. 11 12 * bindings/js/JSDOMConvertBase.h: 13 * dom/ExceptionOr.h: 14 Move IsExceptionOr to ExceptionOr.h so it can be used more widely. 15 16 * bindings/js/JSDOMExceptionHandling.h: 17 (WebCore::invokeFunctorPropagatingExceptionIfNecessary): 18 Add helper that invokes the passed in functor and calls propagateException 19 if the return type was an ExceptionOr<>. If the return type is not an 20 ExceptionOr<>, it just invokes the functor and returns. 21 22 * bindings/scripts/CodeGeneratorJS.pm: 23 (GenerateInvokeIndexedPropertySetter): 24 (GenerateInvokeNamedPropertySetter): 25 Update to call invokeFunctorPropagatingExceptionIfNecessary. 26 27 * css/CSSStyleDeclaration.idl: 28 * dom/DOMStringMap.idl: 29 * storage/Storage.idl: 30 * svg/SVGLengthList.idl: 31 * svg/SVGNumberList.idl: 32 * svg/SVGPathSegList.idl: 33 * svg/SVGPointList.idl: 34 * svg/SVGStringList.idl: 35 * svg/SVGTransformList.idl: 36 Remove now unneeded [MayThrowException]. 37 38 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: 39 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: 40 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: 41 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: 42 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: 43 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: 44 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: 45 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: 46 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: 47 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: 48 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: 49 * bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp: 50 * bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp: 51 * bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp: 52 * bindings/scripts/test/TestIndexedSetterThrowingException.idl: 53 * bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl: 54 * bindings/scripts/test/TestNamedSetterThrowingException.idl: 55 Update tests/expectations. 56 1 57 2020-09-13 Sam Weinig <weinig@apple.com> 2 58 -
trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h
r251425 r266999 88 88 89 89 90 template <typename T>91 struct IsExceptionOr : public std::integral_constant<bool, WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value> { };92 93 94 90 // Conversion from Implementation -> JSValue 95 91 template<typename T> struct JSConverter; -
trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h
r263638 r266999 90 90 } 91 91 92 template<typename Functor> void invokeFunctorPropagatingExceptionIfNecessary(JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& throwScope, Functor&& functor) 93 { 94 using ReturnType = std::invoke_result_t<Functor>; 95 96 if constexpr (IsExceptionOr<ReturnType>::value) { 97 auto result = functor(); 98 if (UNLIKELY(result.hasException())) 99 propagateException(lexicalGlobalObject, throwScope, result.releaseException()); 100 return; 101 } 102 103 functor(); 104 } 105 92 106 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r266983 r266999 898 898 my $nativeValuePassExpression = PassArgumentExpression("nativeValue", $argument); 899 899 my $functionString = "thisObject->wrapped().${indexedSetterFunctionName}(${indexExpression}, ${nativeValuePassExpression})"; 900 $functionString = "propagateException(*lexicalGlobalObject, throwScope, ${functionString})" if NeedsExplicitPropagateExceptionCall($indexedSetterOperation); 901 902 push(@$outputArray, $indent . $functionString . ";\n"); 900 push(@$outputArray, $indent . "invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return ${functionString}; });\n"); 903 901 } 904 902 … … 926 924 927 925 my $functionString = "thisObject->wrapped().${namedSetterFunctionName}(" . join(", ", @arguments) . ")"; 928 $functionString = "propagateException(*lexicalGlobalObject, throwScope, ${functionString})" if NeedsExplicitPropagateExceptionCall($namedSetterOperation); 929 930 push(@$outputArray, $indent . $functionString . ";\n"); 926 push(@$outputArray, $indent . "invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return ${functionString}; });\n"); 931 927 } 932 928 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp
r260992 r266999 199 199 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 200 200 RETURN_IF_EXCEPTION(throwScope, true); 201 thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue));201 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 202 202 return true; 203 203 } … … 215 215 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 216 216 RETURN_IF_EXCEPTION(throwScope, true); 217 thisObject->wrapped().setItem(index, WTFMove(nativeValue));217 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index, WTFMove(nativeValue)); }); 218 218 return true; 219 219 } … … 233 233 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 234 234 RETURN_IF_EXCEPTION(throwScope, true); 235 thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue));235 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 236 236 return true; 237 237 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp
r260992 r266999 199 199 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 200 200 RETURN_IF_EXCEPTION(throwScope, true); 201 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)));201 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 202 202 return true; 203 203 } … … 215 215 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 216 216 RETURN_IF_EXCEPTION(throwScope, true); 217 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index, WTFMove(nativeValue)));217 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index, WTFMove(nativeValue)); }); 218 218 return true; 219 219 } … … 233 233 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 234 234 RETURN_IF_EXCEPTION(throwScope, true); 235 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)));235 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 236 236 return true; 237 237 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp
r265046 r266999 206 206 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 207 207 RETURN_IF_EXCEPTION(throwScope, true); 208 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));208 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 209 209 return true; 210 210 } … … 222 222 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 223 223 RETURN_IF_EXCEPTION(throwScope, true); 224 thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue));224 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue)); }); 225 225 return true; 226 226 } … … 240 240 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 241 241 RETURN_IF_EXCEPTION(throwScope, true); 242 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));242 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 243 243 return true; 244 244 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp
r266662 r266999 230 230 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 231 231 RETURN_IF_EXCEPTION(throwScope, true); 232 thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue));232 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 233 233 return true; 234 234 } … … 243 243 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 244 244 RETURN_IF_EXCEPTION(throwScope, true); 245 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));245 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 246 246 return true; 247 247 } … … 261 261 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 262 262 RETURN_IF_EXCEPTION(throwScope, true); 263 thisObject->wrapped().setItem(index, WTFMove(nativeValue));263 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index, WTFMove(nativeValue)); }); 264 264 return true; 265 265 } … … 274 274 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 275 275 RETURN_IF_EXCEPTION(throwScope, true); 276 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));276 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 277 277 return true; 278 278 } … … 292 292 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 293 293 RETURN_IF_EXCEPTION(throwScope, true); 294 thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue));294 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 295 295 return true; 296 296 } … … 306 306 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 307 307 RETURN_IF_EXCEPTION(throwScope, true); 308 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));308 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 309 309 return true; 310 310 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp
r266662 r266999 230 230 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 231 231 RETURN_IF_EXCEPTION(throwScope, true); 232 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)));232 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 233 233 return true; 234 234 } … … 243 243 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 244 244 RETURN_IF_EXCEPTION(throwScope, true); 245 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));245 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 246 246 return true; 247 247 } … … 261 261 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 262 262 RETURN_IF_EXCEPTION(throwScope, true); 263 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index, WTFMove(nativeValue)));263 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index, WTFMove(nativeValue)); }); 264 264 return true; 265 265 } … … 274 274 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 275 275 RETURN_IF_EXCEPTION(throwScope, true); 276 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));276 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 277 277 return true; 278 278 } … … 292 292 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 293 293 RETURN_IF_EXCEPTION(throwScope, true); 294 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)));294 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setItem(index.value(), WTFMove(nativeValue)); }); 295 295 return true; 296 296 } … … 306 306 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 307 307 RETURN_IF_EXCEPTION(throwScope, true); 308 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));308 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 309 309 return true; 310 310 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp
r266662 r266999 239 239 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 240 240 RETURN_IF_EXCEPTION(throwScope, true); 241 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));241 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 242 242 return true; 243 243 } … … 252 252 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 253 253 RETURN_IF_EXCEPTION(throwScope, true); 254 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));254 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 255 255 return true; 256 256 } … … 270 270 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 271 271 RETURN_IF_EXCEPTION(throwScope, true); 272 thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue));272 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue)); }); 273 273 return true; 274 274 } … … 283 283 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 284 284 RETURN_IF_EXCEPTION(throwScope, true); 285 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));285 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 286 286 return true; 287 287 } … … 301 301 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 302 302 RETURN_IF_EXCEPTION(throwScope, true); 303 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));303 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 304 304 return true; 305 305 } … … 315 315 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 316 316 RETURN_IF_EXCEPTION(throwScope, true); 317 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));317 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 318 318 return true; 319 319 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp
r266662 r266999 216 216 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 217 217 RETURN_IF_EXCEPTION(throwScope, true); 218 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));218 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 219 219 return true; 220 220 } … … 239 239 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 240 240 RETURN_IF_EXCEPTION(throwScope, true); 241 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));241 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 242 242 return true; 243 243 } … … 261 261 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 262 262 RETURN_IF_EXCEPTION(throwScope, true); 263 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));263 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 264 264 return true; 265 265 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp
r266662 r266999 216 216 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 217 217 RETURN_IF_EXCEPTION(throwScope, true); 218 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));218 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 219 219 return true; 220 220 } … … 239 239 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 240 240 RETURN_IF_EXCEPTION(throwScope, true); 241 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));241 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 242 242 return true; 243 243 } … … 261 261 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 262 262 RETURN_IF_EXCEPTION(throwScope, true); 263 propagateException(*lexicalGlobalObject, throwScope, thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)));263 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 264 264 return true; 265 265 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp
r266662 r266999 222 222 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 223 223 RETURN_IF_EXCEPTION(throwScope, true); 224 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));224 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 225 225 return true; 226 226 } … … 245 245 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 246 246 RETURN_IF_EXCEPTION(throwScope, true); 247 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));247 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 248 248 return true; 249 249 } … … 267 267 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 268 268 RETURN_IF_EXCEPTION(throwScope, true); 269 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));269 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 270 270 return true; 271 271 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp
r266662 r266999 244 244 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 245 245 RETURN_IF_EXCEPTION(throwScope, true); 246 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));246 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 247 247 return true; 248 248 } … … 267 267 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 268 268 RETURN_IF_EXCEPTION(throwScope, true); 269 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));269 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 270 270 return true; 271 271 } … … 292 292 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 293 293 RETURN_IF_EXCEPTION(throwScope, true); 294 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));294 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 295 295 return true; 296 296 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp
r266662 r266999 239 239 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 240 240 RETURN_IF_EXCEPTION(throwScope, true); 241 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));241 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 242 242 return true; 243 243 } … … 252 252 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 253 253 RETURN_IF_EXCEPTION(throwScope, true); 254 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));254 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 255 255 return true; 256 256 } … … 270 270 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 271 271 RETURN_IF_EXCEPTION(throwScope, true); 272 thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue));272 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index, WTFMove(nativeValue)); }); 273 273 return true; 274 274 } … … 283 283 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 284 284 RETURN_IF_EXCEPTION(throwScope, true); 285 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));285 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 286 286 return true; 287 287 } … … 301 301 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 302 302 RETURN_IF_EXCEPTION(throwScope, true); 303 thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue));303 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().indexedSetter(index.value(), WTFMove(nativeValue)); }); 304 304 return true; 305 305 } … … 315 315 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 316 316 RETURN_IF_EXCEPTION(throwScope, true); 317 thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue));317 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().namedSetter(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 318 318 return true; 319 319 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp
r266662 r266999 211 211 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 212 212 RETURN_IF_EXCEPTION(throwScope, true); 213 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));213 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 214 214 return true; 215 215 } … … 228 228 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 229 229 RETURN_IF_EXCEPTION(throwScope, true); 230 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));230 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 231 231 return true; 232 232 } … … 243 243 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 244 244 RETURN_IF_EXCEPTION(throwScope, true); 245 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));245 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 246 246 return true; 247 247 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp
r266662 r266999 240 240 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 241 241 RETURN_IF_EXCEPTION(throwScope, true); 242 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));242 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 243 243 return true; 244 244 } … … 263 263 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 264 264 RETURN_IF_EXCEPTION(throwScope, true); 265 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));265 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 266 266 return true; 267 267 } … … 291 291 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 292 292 RETURN_IF_EXCEPTION(throwScope, true); 293 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));293 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 294 294 return true; 295 295 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp
r266662 r266999 235 235 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 236 236 RETURN_IF_EXCEPTION(throwScope, true); 237 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));237 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 238 238 return true; 239 239 } … … 252 252 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, value); 253 253 RETURN_IF_EXCEPTION(throwScope, true); 254 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));254 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 255 255 return true; 256 256 } … … 273 273 auto nativeValue = convert<IDLDOMString>(*lexicalGlobalObject, propertyDescriptor.value()); 274 274 RETURN_IF_EXCEPTION(throwScope, true); 275 thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue));275 invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return thisObject->wrapped().setNamedItem(propertyNameToString(propertyName), WTFMove(nativeValue)); }); 276 276 return true; 277 277 } -
trunk/Source/WebCore/bindings/scripts/test/TestIndexedSetterThrowingException.idl
r266311 r266999 25 25 26 26 interface TestIndexedSetterThrowingException { 27 [MayThrowException]setter undefined (unsigned long index, DOMString value);27 setter undefined (unsigned long index, DOMString value); 28 28 29 29 // NOTE: Indexed setters require the presence of a indexed getter as well. -
trunk/Source/WebCore/bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl
r266311 r266999 25 25 26 26 interface TestNamedAndIndexedSetterThrowingException { 27 [MayThrowException]setter undefined (DOMString name, DOMString value);27 setter undefined (DOMString name, DOMString value); 28 28 getter DOMString (DOMString name); 29 29 30 [MayThrowException]setter undefined (unsigned long index, DOMString value);30 setter undefined (unsigned long index, DOMString value); 31 31 getter DOMString (unsigned long index); 32 32 }; -
trunk/Source/WebCore/bindings/scripts/test/TestNamedSetterThrowingException.idl
r266311 r266999 25 25 26 26 interface TestNamedSetterThrowingException { 27 [MayThrowException]setter undefined (DOMString name, DOMString value);27 setter undefined (DOMString name, DOMString value); 28 28 29 29 // NOTE: Named setters require the presence of a named getter as well. -
trunk/Source/WebCore/css/CSSStyleDeclaration.idl
r266662 r266999 50 50 // reconsider this decision. 51 51 getter (DOMString or double) (DOMString name); 52 [CEReactions, MayThrowException,CallNamedSetterOnlyForSupportedProperties] setter undefined (DOMString name, [LegacyNullToEmptyString] DOMString value);52 [CEReactions, CallNamedSetterOnlyForSupportedProperties] setter undefined (DOMString name, [LegacyNullToEmptyString] DOMString value); 53 53 54 54 // This method is deprecated, and we would like to drop support for it someday -
trunk/Source/WebCore/dom/DOMStringMap.idl
r266662 r266999 30 30 ] interface DOMStringMap { 31 31 getter DOMString (DOMString name); 32 [CEReactions , MayThrowException] setter undefined (DOMString name, DOMString value);32 [CEReactions] setter undefined (DOMString name, DOMString value); 33 33 [CEReactions] deleter undefined (DOMString name); 34 34 }; -
trunk/Source/WebCore/dom/ExceptionOr.h
r264958 r266999 30 30 #include <wtf/CrossThreadCopier.h> 31 31 #include <wtf/Expected.h> 32 #include <wtf/StdLibExtras.h> 32 33 33 34 namespace WebCore { … … 200 201 } 201 202 203 template <typename T> struct IsExceptionOr : public std::integral_constant<bool, WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value> { }; 204 202 205 } 203 206 -
trunk/Source/WebCore/storage/Storage.idl
r266983 r266999 31 31 DOMString? key(unsigned long index); 32 32 getter DOMString? getItem(DOMString key); 33 [MayThrowException]setter undefined setItem(DOMString key, DOMString data);33 setter undefined setItem(DOMString key, DOMString data); 34 34 deleter undefined removeItem(DOMString key); 35 35 [MayThrowException] undefined clear(); -
trunk/Source/WebCore/svg/SVGLengthList.idl
r266311 r266999 38 38 [MayThrowException] SVGLength removeItem(unsigned long index); 39 39 [MayThrowException] SVGLength appendItem(SVGLength newItem); 40 [MayThrowException]setter undefined (unsigned long index, SVGLength newItem);40 setter undefined (unsigned long index, SVGLength newItem); 41 41 }; -
trunk/Source/WebCore/svg/SVGNumberList.idl
r266311 r266999 36 36 [MayThrowException] SVGNumber removeItem(unsigned long index); 37 37 [MayThrowException] SVGNumber appendItem(SVGNumber newItem); 38 [MayThrowException]setter undefined (unsigned long index, SVGNumber newItem);38 setter undefined (unsigned long index, SVGNumber newItem); 39 39 }; -
trunk/Source/WebCore/svg/SVGPathSegList.idl
r266311 r266999 36 36 [MayThrowException] SVGPathSeg removeItem(unsigned long index); 37 37 [MayThrowException] SVGPathSeg appendItem(SVGPathSeg newItem); 38 [MayThrowException]setter undefined (unsigned long index, SVGPathSeg newItem);38 setter undefined (unsigned long index, SVGPathSeg newItem); 39 39 }; -
trunk/Source/WebCore/svg/SVGPointList.idl
r266311 r266999 35 35 [MayThrowException] SVGPoint removeItem(unsigned long index); 36 36 [MayThrowException] SVGPoint appendItem(SVGPoint newItem); 37 [MayThrowException]setter undefined (unsigned long index, SVGPoint newItem);37 setter undefined (unsigned long index, SVGPoint newItem); 38 38 }; -
trunk/Source/WebCore/svg/SVGStringList.idl
r266311 r266999 35 35 [MayThrowException] DOMString removeItem(unsigned long index); 36 36 [MayThrowException] DOMString appendItem(DOMString newItem); 37 [MayThrowException]setter undefined (unsigned long index, DOMString newItem);37 setter undefined (unsigned long index, DOMString newItem); 38 38 }; -
trunk/Source/WebCore/svg/SVGTransformList.idl
r266311 r266999 36 36 [MayThrowException] SVGTransform removeItem(unsigned long index); 37 37 [MayThrowException] SVGTransform appendItem(SVGTransform newItem); 38 [MayThrowException]setter undefined (unsigned long index, SVGTransform newItem);38 setter undefined (unsigned long index, SVGTransform newItem); 39 39 40 40 [MayThrowException, NewObject] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix);
Note: See TracChangeset
for help on using the changeset viewer.