Title: [267007] trunk/Source/WebCore
Revision
267007
Author
wei...@apple.com
Date
2020-09-13 17:00:42 -0700 (Sun, 13 Sep 2020)

Log Message

[WebIDL] Remove need for [MayThrowException] on constructors and legacy factory functions
https://bugs.webkit.org/show_bug.cgi?id=216442

Reviewed by Darin Adler.

Deduce implementation potentially throwing by using the existing overload of
toJSNewlyCreated that conditionally checks for exceptions based on the return
type. constexpr IsExceptionOr to maintain existing optimizations around conditional
calls to RETURN_IF_EXCEPTION.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
Update code generation to output code that can handle constructors that return either
ExceptionOr or not. Maintain existing static assertion that the underlying return type
is a Ref<> using std::conditional_t predicated on IsExceptionOr and maintain the existing
optimization to not check for an exception after toJSNewlyCreated if one could not have
been made by again utilizing IsExceptionOr.

* bindings/scripts/IDLAttributes.json:
Remove [LegacyFactoryFunctionMayThrowException] now that it is not needed.

* Modules/applepay/ApplePaySession.idl:
* Modules/encryptedmedia/legacy/WebKitMediaKeys.idl:
* Modules/fetch/FetchHeaders.idl:
* Modules/fetch/FetchRequest.idl:
* Modules/fetch/FetchResponse.idl:
* Modules/mediarecorder/MediaRecorder.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/paymentrequest/MerchantValidationEvent.idl:
* Modules/paymentrequest/PaymentRequest.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConstantSourceNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/IIRFilterNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webaudio/PeriodicWave.idl:
* Modules/webaudio/StereoPannerNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WebKitAudioContext.idl:
* Modules/webaudio/WebKitOfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* Modules/webxr/WebXRRigidTransform.idl:
* Modules/webxr/WebXRWebGLLayer.idl:
* animation/KeyframeEffect.idl:
* css/DOMMatrix.idl:
* css/DOMMatrixReadOnly.idl:
* css/WebKitCSSMatrix.idl:
* dom/StaticRange.idl:
* dom/TextDecoder.idl:
* dom/TextDecoderStreamDecoder.idl:
* html/DOMURL.idl:
* html/HTMLOptionElement.h:
* html/HTMLOptionElement.idl:
* html/ImageData.idl:
* html/URLSearchParams.idl:
* html/track/TextTrackCue.idl:
* page/EventSource.idl:
* page/IntersectionObserver.idl:
* workers/Worker.idl:
Remove all uses of [LegacyFactoryFunctionMayThrowException] and [MayThrowException]
on constructors.

* html/HTMLAudioElement.cpp:
(WebCore::HTMLAudioElement::createForLegacyFactoryFunction):
(WebCore::HTMLAudioElement::createForJSConstructor): Deleted.
* html/HTMLAudioElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createForLegacyFactoryFunction):
(WebCore::HTMLImageElement::createForJSConstructor): Deleted.
* html/HTMLImageElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::createForLegacyFactoryFunction):
(WebCore::HTMLOptionElement::createForJSConstructor): Deleted.
Renamed createForJSConstructor to createForLegacyFactoryFunction to better
match current WebIDL terminology.

* bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
(WebCore::JSExposedToWorkerAndWindowConstructor::construct):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::construct):
* bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
(WebCore::JSTestLegacyFactoryFunctionLegacyFactoryFunction::construct):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::construct):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
(WebCore::constructJSTestOverloadedConstructors5):
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
(WebCore::constructJSTestOverloadedConstructorsWithSequence2):
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::JSTestPromiseRejectionEventConstructor::construct):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
* bindings/scripts/test/TestLegacyFactoryFunction.idl:
Update tests/expectations.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (267006 => 267007)


--- trunk/Source/WebCore/ChangeLog	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/ChangeLog	2020-09-14 00:00:42 UTC (rev 267007)
@@ -1,5 +1,126 @@
 2020-09-13  Sam Weinig  <wei...@apple.com>
 
+        [WebIDL] Remove need for [MayThrowException] on constructors and legacy factory functions
+        https://bugs.webkit.org/show_bug.cgi?id=216442
+
+        Reviewed by Darin Adler.
+
+        Deduce implementation potentially throwing by using the existing overload of
+        toJSNewlyCreated that conditionally checks for exceptions based on the return
+        type. constexpr IsExceptionOr to maintain existing optimizations around conditional
+        calls to RETURN_IF_EXCEPTION.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorDefinition):
+        Update code generation to output code that can handle constructors that return either
+        ExceptionOr or not. Maintain existing static assertion that the underlying return type
+        is a Ref<> using std::conditional_t predicated on IsExceptionOr and maintain the existing
+        optimization to not check for an exception after toJSNewlyCreated if one could not have
+        been made by again utilizing IsExceptionOr.
+
+        * bindings/scripts/IDLAttributes.json:
+        Remove [LegacyFactoryFunctionMayThrowException] now that it is not needed.
+
+        * Modules/applepay/ApplePaySession.idl:
+        * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl:
+        * Modules/fetch/FetchHeaders.idl:
+        * Modules/fetch/FetchRequest.idl:
+        * Modules/fetch/FetchResponse.idl:
+        * Modules/mediarecorder/MediaRecorder.idl:
+        * Modules/mediastream/RTCIceCandidate.idl:
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/paymentrequest/MerchantValidationEvent.idl:
+        * Modules/paymentrequest/PaymentRequest.idl:
+        * Modules/webaudio/AnalyserNode.idl:
+        * Modules/webaudio/AudioBuffer.idl:
+        * Modules/webaudio/AudioBufferSourceNode.idl:
+        * Modules/webaudio/AudioContext.idl:
+        * Modules/webaudio/BiquadFilterNode.idl:
+        * Modules/webaudio/ChannelMergerNode.idl:
+        * Modules/webaudio/ChannelSplitterNode.idl:
+        * Modules/webaudio/ConstantSourceNode.idl:
+        * Modules/webaudio/ConvolverNode.idl:
+        * Modules/webaudio/DelayNode.idl:
+        * Modules/webaudio/DynamicsCompressorNode.idl:
+        * Modules/webaudio/GainNode.idl:
+        * Modules/webaudio/IIRFilterNode.idl:
+        * Modules/webaudio/MediaElementAudioSourceNode.idl:
+        * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
+        * Modules/webaudio/MediaStreamAudioSourceNode.idl:
+        * Modules/webaudio/OfflineAudioContext.idl:
+        * Modules/webaudio/OscillatorNode.idl:
+        * Modules/webaudio/PannerNode.idl:
+        * Modules/webaudio/PeriodicWave.idl:
+        * Modules/webaudio/StereoPannerNode.idl:
+        * Modules/webaudio/WaveShaperNode.idl:
+        * Modules/webaudio/WebKitAudioContext.idl:
+        * Modules/webaudio/WebKitOfflineAudioContext.idl:
+        * Modules/websockets/WebSocket.idl:
+        * Modules/webxr/WebXRRigidTransform.idl:
+        * Modules/webxr/WebXRWebGLLayer.idl:
+        * animation/KeyframeEffect.idl:
+        * css/DOMMatrix.idl:
+        * css/DOMMatrixReadOnly.idl:
+        * css/WebKitCSSMatrix.idl:
+        * dom/StaticRange.idl:
+        * dom/TextDecoder.idl:
+        * dom/TextDecoderStreamDecoder.idl:
+        * html/DOMURL.idl:
+        * html/HTMLOptionElement.h:
+        * html/HTMLOptionElement.idl:
+        * html/ImageData.idl:
+        * html/URLSearchParams.idl:
+        * html/track/TextTrackCue.idl:
+        * page/EventSource.idl:
+        * page/IntersectionObserver.idl:
+        * workers/Worker.idl:
+        Remove all uses of [LegacyFactoryFunctionMayThrowException] and [MayThrowException]
+        on constructors.
+
+        * html/HTMLAudioElement.cpp:
+        (WebCore::HTMLAudioElement::createForLegacyFactoryFunction):
+        (WebCore::HTMLAudioElement::createForJSConstructor): Deleted.
+        * html/HTMLAudioElement.h:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::createForLegacyFactoryFunction):
+        (WebCore::HTMLImageElement::createForJSConstructor): Deleted.
+        * html/HTMLImageElement.h:
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::createForLegacyFactoryFunction):
+        (WebCore::HTMLOptionElement::createForJSConstructor): Deleted.
+        Renamed createForJSConstructor to createForLegacyFactoryFunction to better
+        match current WebIDL terminology.
+
+        * bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
+        (WebCore::JSExposedToWorkerAndWindowConstructor::construct):
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        (WebCore::JSTestEventConstructorConstructor::construct):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        (WebCore::JSTestInterfaceConstructor::construct):
+        * bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
+        (WebCore::JSTestLegacyFactoryFunctionLegacyFactoryFunction::construct):
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        (WebCore::JSTestNodeConstructor::construct):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjConstructor::construct):
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        (WebCore::constructJSTestOverloadedConstructors1):
+        (WebCore::constructJSTestOverloadedConstructors2):
+        (WebCore::constructJSTestOverloadedConstructors3):
+        (WebCore::constructJSTestOverloadedConstructors4):
+        (WebCore::constructJSTestOverloadedConstructors5):
+        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
+        (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
+        (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
+        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
+        (WebCore::JSTestPromiseRejectionEventConstructor::construct):
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::JSTestTypedefsConstructor::construct):
+        * bindings/scripts/test/TestLegacyFactoryFunction.idl:
+        Update tests/expectations.
+
+2020-09-13  Sam Weinig  <wei...@apple.com>
+
         FIXME in MediaDevices.idl is incorrect
         https://bugs.webkit.org/show_bug.cgi?id=216459
 

Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -29,7 +29,7 @@
     EnabledBySetting=ApplePay,
     EnabledForContext,
 ] interface ApplePaySession : EventTarget {
-    [CallWith=Document, MayThrowException] constructor(unsigned long version, ApplePayPaymentRequest paymentRequest);
+    [CallWith=Document] constructor(unsigned long version, ApplePayPaymentRequest paymentRequest);
 
     const unsigned short STATUS_SUCCESS = 0;
     const unsigned short STATUS_FAILURE = 1;

Modified: trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     Conditional=LEGACY_ENCRYPTED_MEDIA,
     EnabledBySetting=LegacyEncryptedMediaAPI,
 ] interface WebKitMediaKeys {
-    [MayThrowException] constructor(DOMString keySystem);
+    constructor(DOMString keySystem);
 
     [CallWith=ScriptExecutionContext, MayThrowException] WebKitMediaKeySession createSession(DOMString type, Uint8Array initData);
     static boolean isTypeSupported(DOMString keySystem, optional DOMString type);

Modified: trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -34,7 +34,7 @@
     ImplementationLacksVTable,
     InterfaceName=Headers,
 ] interface FetchHeaders {
-    [MayThrowException] constructor(optional HeadersInit init);
+    constructor(optional HeadersInit init);
 
     [MayThrowException] undefined append(ByteString name, ByteString value);
     [MayThrowException, ImplementedAs=remove] undefined delete(ByteString name);

Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/fetch/FetchRequest.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -39,7 +39,7 @@
     GenerateIsReachable=Impl,
     InterfaceName=Request,
 ] interface FetchRequest {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(RequestInfo input, optional FetchRequestInit init);
+    [CallWith=ScriptExecutionContext] constructor(RequestInfo input, optional FetchRequestInit init);
 
     readonly attribute ByteString method;
     [ImplementedAs=urlString] readonly attribute USVString url;

Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/fetch/FetchResponse.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -44,7 +44,7 @@
     Exposed=(Window,Worker),
     InterfaceName=Response,
 ] interface FetchResponse {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(optional BodyInit? body = null, optional FetchResponseInit init);
+    [CallWith=ScriptExecutionContext] constructor(optional BodyInit? body = null, optional FetchResponseInit init);
 
     [CallWith=ScriptExecutionContext, NewObject] static FetchResponse error();
     [CallWith=ScriptExecutionContext, MayThrowException, NewObject] static FetchResponse redirect(USVString url, optional unsigned short status = 302);

Modified: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,7 +30,7 @@
     EnabledBySetting=MediaRecorder,
     Exposed=Window
 ] interface MediaRecorder : EventTarget {
-    [CallWith=Document, MayThrowException] constructor(MediaStream stream, optional MediaRecorderOptions options);
+    [CallWith=Document] constructor(MediaStream stream, optional MediaRecorderOptions options);
 
     // FIXME: Implement commented out methods/attributes.
 

Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -35,7 +35,7 @@
     EnabledAtRuntime=PeerConnection,
     ImplementationLacksVTable,
 ] interface RTCIceCandidate {
-    [MayThrowException] constructor(RTCIceCandidateInit candidateInitDict);
+    constructor(RTCIceCandidateInit candidateInitDict);
 
     readonly attribute DOMString candidate;
     readonly attribute DOMString? sdpMid;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -76,7 +76,7 @@
     EnabledAtRuntime=PeerConnection,
     ExportMacro=WEBCORE_EXPORT,
 ] interface RTCPeerConnection : EventTarget {
-    [CallWith=Document, MayThrowException] constructor(optional RTCConfiguration configuration);
+    [CallWith=Document] constructor(optional RTCConfiguration configuration);
 
     // 4.3.2 Interface Definition
     Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions offerOptions);

Modified: trunk/Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -29,7 +29,7 @@
     Exposed=Window,
     SecureContext,
 ] interface MerchantValidationEvent : Event {
-    [CallWith=Document, MayThrowException] constructor(DOMString type, optional MerchantValidationEventInit eventInitDict);
+    [CallWith=Document] constructor(DOMString type, optional MerchantValidationEventInit eventInitDict);
 
     readonly attribute DOMString methodName;
     readonly attribute USVString validationURL;

Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,7 +30,7 @@
     EnabledForContext,
     SecureContext,
 ] interface PaymentRequest : EventTarget {
-    [CallWith=Document, MayThrowException] constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options);
+    [CallWith=Document] constructor(sequence<PaymentMethodData> methodData, PaymentDetailsInit details, optional PaymentOptions options);
 
     [CallWith=Document] Promise<PaymentResponse> show(optional Promise<PaymentDetailsUpdate> detailsPromise);
     Promise<undefined> abort();

Modified: trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/AnalyserNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,7 +26,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
 ] interface AnalyserNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional AnalyserOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional AnalyserOptions options);
 
     attribute unsigned long fftSize;
     readonly attribute unsigned long frequencyBinCount;

Modified: trunk/Source/WebCore/Modules/webaudio/AudioBuffer.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/AudioBuffer.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBuffer.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -32,7 +32,7 @@
     JSGenerateToJSObject,
     ReportExtraMemoryCost,
 ] interface AudioBuffer {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor(AudioBufferOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor(AudioBufferOptions options);
     readonly attribute unsigned long length; // in sample-frames
     readonly attribute double duration; // in seconds
     readonly attribute float sampleRate; // in sample-frames per second

Modified: trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,7 +28,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
 ] interface AudioBufferSourceNode : AudioScheduledSourceNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional AudioBufferSourceOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional AudioBufferSourceOptions options);
 
     attribute AudioBuffer? buffer;
 

Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/AudioContext.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,7 +30,7 @@
     ExportMacro=WEBCORE_EXPORT,
     JSGenerateToNativeObject,
 ] interface AudioContext : BaseAudioContext {
-    [CallWith=Document, MayThrowException] constructor(optional AudioContextOptions contextOptions);
+    [CallWith=Document] constructor(optional AudioContextOptions contextOptions);
 
     readonly attribute double baseLatency;
 

Modified: trunk/Source/WebCore/Modules/webaudio/BiquadFilterNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/BiquadFilterNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/BiquadFilterNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
 ] interface BiquadFilterNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional BiquadFilterOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional BiquadFilterOptions options);
 
     attribute BiquadFilterType type;
     

Modified: trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelMergerNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,5 +30,5 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface ChannelMergerNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelMergerOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelMergerOptions options);
 };

Modified: trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/ChannelSplitterNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,5 +26,5 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface ChannelSplitterNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelSplitterOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ChannelSplitterOptions options);
 };

Modified: trunk/Source/WebCore/Modules/webaudio/ConstantSourceNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/ConstantSourceNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/ConstantSourceNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,6 +28,6 @@
     JSGenerateToJSObject,
     EnabledBySetting=ModernUnprefixedWebAudio
 ] interface ConstantSourceNode : AudioScheduledSourceNode {
-    [MayThrowException] constructor (BaseAudioContext context, optional ConstantSourceOptions options);
+    constructor (BaseAudioContext context, optional ConstantSourceOptions options);
     readonly attribute AudioParam offset;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/ConvolverNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/ConvolverNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/ConvolverNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,7 +28,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface ConvolverNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ConvolverOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional ConvolverOptions options);
 
     attribute AudioBuffer? buffer;
     attribute boolean normalize;

Modified: trunk/Source/WebCore/Modules/webaudio/DelayNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/DelayNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/DelayNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,7 +26,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface DelayNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional DelayOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional DelayOptions options);
 
     readonly attribute AudioParam delayTime;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/DynamicsCompressorNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface DynamicsCompressorNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional DynamicsCompressorOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional DynamicsCompressorOptions options);
 
     readonly attribute AudioParam threshold; // in Decibels
     readonly attribute AudioParam knee; // in Decibels

Modified: trunk/Source/WebCore/Modules/webaudio/GainNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/GainNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/GainNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,7 +26,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface GainNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional GainOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional GainOptions options);
 
     readonly attribute AudioParam gain;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/IIRFilterNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/IIRFilterNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/IIRFilterNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,6 +27,6 @@
     JSGenerateToJSObject,
     EnabledBySetting=ModernUnprefixedWebAudio,
 ] interface IIRFilterNode : AudioNode {
-    [MayThrowException, CallWith=ScriptExecutionContext] constructor(BaseAudioContext audioContext, IIRFilterOptions options);
+    [CallWith=ScriptExecutionContext] constructor(BaseAudioContext audioContext, IIRFilterOptions options);
     [MayThrowException] undefined getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
 };

Modified: trunk/Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     Conditional=WEB_AUDIO&VIDEO,
     JSGenerateToJSObject
 ] interface MediaElementAudioSourceNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, MediaElementAudioSourceOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, MediaElementAudioSourceOptions options);
 
     readonly attribute HTMLMediaElement mediaElement;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,6 +26,6 @@
     Conditional=WEB_AUDIO&MEDIA_STREAM,
     JSGenerateToJSObject
 ] interface MediaStreamAudioDestinationNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, optional AudioNodeOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, optional AudioNodeOptions options);
     readonly attribute MediaStream stream;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,7 +26,7 @@
     Conditional=WEB_AUDIO&MEDIA_STREAM,
     JSGenerateToJSObject
 ] interface MediaStreamAudioSourceNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, MediaStreamAudioSourceOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (AudioContext context, MediaStreamAudioSourceOptions options);
 
     readonly attribute MediaStream mediaStream;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,8 +27,8 @@
     EnabledBySetting=ModernUnprefixedWebAudio,
     JSGenerateToJSObject,
 ] interface OfflineAudioContext : BaseAudioContext {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(OfflineAudioContextOptions contextOptions);
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate);
+    [CallWith=ScriptExecutionContext] constructor(OfflineAudioContextOptions contextOptions);
+    [CallWith=ScriptExecutionContext] constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate);
     
     [ImplementedAs=startOfflineRendering] Promise<AudioBuffer> startRendering();
 

Modified: trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,7 +28,7 @@
     JSGenerateToJSObject,
     ActiveDOMObject,
 ] interface OscillatorNode : AudioScheduledSourceNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional OscillatorOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor (BaseAudioContext context, optional OscillatorOptions options);
 
     attribute OscillatorType type;
 

Modified: trunk/Source/WebCore/Modules/webaudio/PannerNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/PannerNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/PannerNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     JSGenerateToJSObject,
     EnabledBySetting=ModernUnprefixedWebAudio,
 ] interface PannerNode : AudioNode {
-    [MayThrowException] constructor (BaseAudioContext context, optional PannerOptions options);
+    constructor (BaseAudioContext context, optional PannerOptions options);
 
     // Default model for stereo is equalpower
     attribute PanningModelType panningModel;

Modified: trunk/Source/WebCore/Modules/webaudio/PeriodicWave.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/PeriodicWave.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/PeriodicWave.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,5 +27,5 @@
     Conditional=WEB_AUDIO,
     ImplementationLacksVTable
 ] interface PeriodicWave {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor(BaseAudioContext context, optional PeriodicWaveOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor(BaseAudioContext context, optional PeriodicWaveOptions options);
 };

Modified: trunk/Source/WebCore/Modules/webaudio/StereoPannerNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/StereoPannerNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/StereoPannerNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,6 +28,6 @@
     JSGenerateToJSObject,
     EnabledBySetting=ModernUnprefixedWebAudio
 ] interface StereoPannerNode : AudioNode {
-    [MayThrowException] constructor (BaseAudioContext context, optional StereoPannerOptions options);
+    constructor (BaseAudioContext context, optional StereoPannerOptions options);
     readonly attribute AudioParam pan;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/WaveShaperNode.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -26,7 +26,7 @@
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject
 ] interface WaveShaperNode : AudioNode {
-    [MayThrowException, EnabledBySetting=ModernUnprefixedWebAudio] constructor(BaseAudioContext context, optional WaveShaperOptions options);
+    [EnabledBySetting=ModernUnprefixedWebAudio] constructor(BaseAudioContext context, optional WaveShaperOptions options);
 
     attribute Float32Array? curve;
     attribute OverSampleType oversample;

Modified: trunk/Source/WebCore/Modules/webaudio/WebKitAudioContext.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/WebKitAudioContext.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/WebKitAudioContext.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,7 +30,7 @@
     ExportMacro=WEBCORE_EXPORT,
     InterfaceName=webkitAudioContext,
 ] interface WebKitAudioContext : EventTarget {
-    [CallWith=Document, MayThrowException] constructor();
+    [CallWith=Document] constructor();
 
     // All rendered audio ultimately connects to destination, which represents the audio hardware.
     readonly attribute AudioDestinationNode destination;

Modified: trunk/Source/WebCore/Modules/webaudio/WebKitOfflineAudioContext.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webaudio/WebKitOfflineAudioContext.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webaudio/WebKitOfflineAudioContext.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,5 +28,5 @@
     InterfaceName=webkitOfflineAudioContext,
     JSGenerateToJSObject,
 ] interface WebKitOfflineAudioContext : WebKitAudioContext {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, unrestricted float sampleRate);
+    [CallWith=ScriptExecutionContext] constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, unrestricted float sampleRate);
 };

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -34,8 +34,8 @@
     Exposed=(Window,Worker),
     EnabledAtRuntime=WebSocket
 ] interface WebSocket : EventTarget {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(USVString url, optional sequence<DOMString> protocols = []);
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(USVString url, DOMString protocol);
+    [CallWith=ScriptExecutionContext] constructor(USVString url, optional sequence<DOMString> protocols = []);
+    [CallWith=ScriptExecutionContext] constructor(USVString url, DOMString protocol);
 
     readonly attribute USVString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
     readonly attribute USVString url;

Modified: trunk/Source/WebCore/Modules/webxr/WebXRRigidTransform.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webxr/WebXRRigidTransform.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webxr/WebXRRigidTransform.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -31,7 +31,7 @@
     ImplementationLacksVTable,
     InterfaceName=XRRigidTransform
 ] interface WebXRRigidTransform {
-    [MayThrowException] constructor(optional DOMPointInit position, optional DOMPointInit orientation);
+    constructor(optional DOMPointInit position, optional DOMPointInit orientation);
 
     [SameObject] readonly attribute DOMPointReadOnly position;
     [SameObject] readonly attribute DOMPointReadOnly orientation;

Modified: trunk/Source/WebCore/Modules/webxr/WebXRWebGLLayer.idl (267006 => 267007)


--- trunk/Source/WebCore/Modules/webxr/WebXRWebGLLayer.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/Modules/webxr/WebXRWebGLLayer.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -38,7 +38,7 @@
     JSGenerateToNativeObject,
     InterfaceName=XRWebGLLayer
 ] interface WebXRWebGLLayer : WebXRLayer {
-    [MayThrowException] constructor(WebXRSession session, WebXRWebGLRenderingContext context, optional XRWebGLLayerInit layerInit);
+    constructor(WebXRSession session, WebXRWebGLRenderingContext context, optional XRWebGLLayerInit layerInit);
 
     // Attributes
     readonly attribute boolean antialias;

Modified: trunk/Source/WebCore/animation/KeyframeEffect.idl (267006 => 267007)


--- trunk/Source/WebCore/animation/KeyframeEffect.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/animation/KeyframeEffect.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,8 +30,8 @@
     Exposed=Window,
     JSGenerateToNativeObject,
 ] interface KeyframeEffect : AnimationEffect {
-    [CallWith=GlobalObject, MayThrowException] constructor(Element? target, object? keyframes, optional (unrestricted double or KeyframeEffectOptions) options);
-    [CallWith=GlobalObject, MayThrowException] constructor(KeyframeEffect source);
+    [CallWith=GlobalObject] constructor(Element? target, object? keyframes, optional (unrestricted double or KeyframeEffectOptions) options);
+    [CallWith=GlobalObject] constructor(KeyframeEffect source);
 
     attribute Element? target;
     [MayThrowException] attribute CSSOMString? pseudoElement;

Modified: trunk/Source/WebCore/bindings/js/JSDOMAbstractOperations.h (267006 => 267007)


--- trunk/Source/WebCore/bindings/js/JSDOMAbstractOperations.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/js/JSDOMAbstractOperations.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -123,7 +123,7 @@
 {
     using ReturnType = std::invoke_result_t<Functor>;
 
-    if constexpr (IsExceptionOr<ReturnType>::value) {
+    if constexpr (IsExceptionOr<ReturnType>) {
         auto result = functor();
         if (result.hasException()) {
             auto throwScope = DECLARE_THROW_SCOPE(JSC::getVM(&lexicalGlobalObject));

Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h (267006 => 267007)


--- trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertBase.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -94,12 +94,12 @@
 template<typename T, typename U> inline JSC::JSValue toJS(JSC::JSGlobalObject&, U&&);
 template<typename T, typename U> inline JSC::JSValue toJS(JSC::JSGlobalObject&, JSDOMGlobalObject&, U&&);
 template<typename T, typename U> inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject&, JSDOMGlobalObject&, U&&);
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>;
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>;
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>;
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>;
-template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>;
-template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>;
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>;
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>;
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>;
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>;
+template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>;
+template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject&, JSDOMGlobalObject&, JSC::ThrowScope&, U&&) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>;
 
 template<typename T, bool needsState = JSConverter<T>::needsState, bool needsGlobalObject = JSConverter<T>::needsGlobalObject>
 struct JSConverterOverloader;
@@ -158,7 +158,7 @@
     return JSConverter<T>::convertNewlyCreated(lexicalGlobalObject, globalObject, std::forward<U>(value));
 }
 
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>
 {
     if (UNLIKELY(value.hasException())) {
         propagateException(lexicalGlobalObject, throwScope, value.releaseException());
@@ -168,12 +168,12 @@
     return toJS<T>(lexicalGlobalObject, value.releaseReturnValue());
 }
 
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>
 {
     return toJS<T>(lexicalGlobalObject, std::forward<U>(value));
 }
 
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>
 {
     if (UNLIKELY(value.hasException())) {
         propagateException(lexicalGlobalObject, throwScope, value.releaseException());
@@ -183,12 +183,12 @@
     return toJS<T>(lexicalGlobalObject, globalObject, value.releaseReturnValue());
 }
 
-template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>
 {
     return toJS<T>(lexicalGlobalObject, globalObject, std::forward<U>(value));
 }
 
-template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope& throwScope, U&& value) -> std::enable_if_t<IsExceptionOr<U>, JSC::JSValue>
 {
     if (UNLIKELY(value.hasException())) {
         propagateException(lexicalGlobalObject, throwScope, value.releaseException());
@@ -198,7 +198,7 @@
     return toJSNewlyCreated<T>(lexicalGlobalObject, globalObject, value.releaseReturnValue());
 }
 
-template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>::value, JSC::JSValue>
+template<typename T, typename U> inline auto toJSNewlyCreated(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, JSC::ThrowScope&, U&& value) -> std::enable_if_t<!IsExceptionOr<U>, JSC::JSValue>
 {
     return toJSNewlyCreated<T>(lexicalGlobalObject, globalObject, std::forward<U>(value));
 }

Modified: trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h (267006 => 267007)


--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -93,7 +93,7 @@
 {
     using ReturnType = std::invoke_result_t<Functor>;
 
-    if constexpr (IsExceptionOr<ReturnType>::value) {
+    if constexpr (IsExceptionOr<ReturnType>) {
         auto result = functor();
         if (UNLIKELY(result.hasException()))
             propagateException(lexicalGlobalObject, throwScope, result.releaseException());

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2020-09-14 00:00:42 UTC (rev 267007)
@@ -7490,18 +7490,14 @@
 
             GenerateArgumentsCountCheck($outputArray, $operation, $interface, "    ");
 
-            my $functionImplementationName = $generatingLegacyFactoryFunction ? "createForJSConstructor" : "create";
+            my $functionImplementationName = $generatingLegacyFactoryFunction ? "createForLegacyFactoryFunction" : "create";
             my $functionString = GenerateParametersCheck($outputArray, $operation, $interface, $functionImplementationName, "    ");
 
             push(@$outputArray, "    auto object = ${functionString};\n");
             push(@$outputArray, "    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n") if $codeGenerator->ExtendedAttributeContains($interface->extendedAttributes->{CallWith}, "ExecState");
-            if ($interface->extendedAttributes->{LegacyFactoryFunctionMayThrowException} || $operation->extendedAttributes->{MayThrowException}) {
-                push(@$outputArray, "    static_assert(IsExceptionOr<decltype(object)>::value);\n");
-                push(@$outputArray, "    static_assert(decltype(object)::ReturnType::isRef);\n");
-            } else {
-                push(@$outputArray, "    static_assert(decltype(object)::isRef);\n");
-            }
 
+            push(@$outputArray, "    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);\n");
+
             my $IDLType = GetIDLType($interface, $interface->type);
             my $implType = GetImplClassName($interface);
 
@@ -7510,12 +7506,13 @@
             my @constructionConversionArguments = ();
             push(@constructionConversionArguments, "*lexicalGlobalObject");
             push(@constructionConversionArguments, "*castedThis->globalObject()");
-            push(@constructionConversionArguments, "throwScope") if $interface->extendedAttributes->{LegacyFactoryFunctionMayThrowException} || $operation->extendedAttributes->{MayThrowException};
+            push(@constructionConversionArguments, "throwScope");
             push(@constructionConversionArguments, "WTFMove(object)");
 
             # FIXME: toJSNewlyCreated should return JSObject* instead of JSValue.
             push(@$outputArray, "    auto jsValue = toJSNewlyCreated<${IDLType}>(" . join(", ", @constructionConversionArguments) . ");\n");
-            push(@$outputArray, "    RETURN_IF_EXCEPTION(throwScope, { });\n") if $interface->extendedAttributes->{LegacyFactoryFunctionMayThrowException} || $operation->extendedAttributes->{MayThrowException};
+            push(@$outputArray, "    if constexpr (IsExceptionOr<decltype(object)>)\n");
+            push(@$outputArray, "        RETURN_IF_EXCEPTION(throwScope, { });\n");
             push(@$outputArray, "    setSubclassStructureIfNeeded<${implType}>(lexicalGlobalObject, callFrame, asObject(jsValue));\n");
             push(@$outputArray, "    RETURN_IF_EXCEPTION(throwScope, { });\n");
             push(@$outputArray, "    return JSValue::encode(jsValue);\n");

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2020-09-14 00:00:42 UTC (rev 267007)
@@ -316,9 +316,6 @@
             "values": ["*"],
             "supportsConjunction": true
         },
-        "LegacyFactoryFunctionMayThrowException": {
-            "contextsAllowed": ["interface"]
-        },
         "LegacyLenientSetter": {
             "contextsAllowed": ["attribute"],
             "standard": {

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -135,8 +135,10 @@
     auto* castedThis = jsCast<JSExposedToWorkerAndWindowConstructor*>(callFrame->jsCallee());
     ASSERT(castedThis);
     auto object = ExposedToWorkerAndWindow::create();
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<ExposedToWorkerAndWindow>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<ExposedToWorkerAndWindow>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<ExposedToWorkerAndWindow>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -180,8 +180,10 @@
     auto eventInitDict = convert<IDLDictionary<TestEventConstructor::Init>>(*lexicalGlobalObject, argument1.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestEventConstructor::create(WTFMove(type), WTFMove(eventInitDict));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestEventConstructor>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestEventConstructor>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestEventConstructor>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -276,10 +276,10 @@
     auto str2 = argument1.value().isUndefined() ? "defaultString"_s : convert<IDLDOMString>(*lexicalGlobalObject, argument1.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestInterface::create(*context, WTFMove(str1), WTFMove(str2));
-    static_assert(IsExceptionOr<decltype(object)>::value);
-    static_assert(decltype(object)::ReturnType::isRef);
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
     auto jsValue = toJSNewlyCreated<IDLInterface<TestInterface>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
-    RETURN_IF_EXCEPTION(throwScope, { });
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestInterface>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -123,11 +123,11 @@
     EnsureStillAliveScope argument2 = callFrame->argument(2);
     auto str3 = argument2.value().isUndefined() ? String() : convert<IDLDOMString>(*lexicalGlobalObject, argument2.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    auto object = TestLegacyFactoryFunction::createForJSConstructor(document, WTFMove(str1), WTFMove(str2), WTFMove(str3));
-    static_assert(IsExceptionOr<decltype(object)>::value);
-    static_assert(decltype(object)::ReturnType::isRef);
+    auto object = TestLegacyFactoryFunction::createForLegacyFactoryFunction(document, WTFMove(str1), WTFMove(str2), WTFMove(str3));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
     auto jsValue = toJSNewlyCreated<IDLInterface<TestLegacyFactoryFunction>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
-    RETURN_IF_EXCEPTION(throwScope, { });
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestLegacyFactoryFunction>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -115,8 +115,10 @@
     auto* castedThis = jsCast<JSTestNodeConstructor*>(callFrame->jsCallee());
     ASSERT(castedThis);
     auto object = TestNode::create();
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestNode>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestNode>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestNode>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -1978,8 +1978,10 @@
     auto testCallbackFunction = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 1, "testCallbackFunction", "TestObject", nullptr); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestObj::create(document, testCallback.releaseNonNull(), testCallbackFunction.releaseNonNull());
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestObj>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestObj>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestObj>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -97,8 +97,10 @@
     auto arrayBuffer = convert<IDLArrayBuffer>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "arrayBuffer", "TestOverloadedConstructors", nullptr, "ArrayBuffer"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructors::create(*arrayBuffer);
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructors>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);
@@ -114,8 +116,10 @@
     auto arrayBufferView = convert<IDLArrayBufferView>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "arrayBufferView", "TestOverloadedConstructors", nullptr, "ArrayBufferView"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructors::create(arrayBufferView.releaseNonNull());
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructors>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);
@@ -131,8 +135,10 @@
     auto blob = convert<IDLInterface<Blob>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "blob", "TestOverloadedConstructors", nullptr, "Blob"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructors::create(*blob);
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructors>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);
@@ -148,8 +154,10 @@
     auto string = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructors::create(WTFMove(string));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructors>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);
@@ -164,8 +172,10 @@
     auto longArgs = convertVariadicArguments<IDLLong>(*lexicalGlobalObject, *callFrame, 0);
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructors::create(WTFMove(longArgs));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructors>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructors>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -96,8 +96,10 @@
     auto sequenceOfStrings = argument0.value().isUndefined() ? Converter<IDLSequence<IDLDOMString>>::ReturnType{ } : convert<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, argument0.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(sequenceOfStrings));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructorsWithSequence>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructorsWithSequence>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructorsWithSequence>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);
@@ -113,8 +115,10 @@
     auto string = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(string));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructorsWithSequence>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestOverloadedConstructorsWithSequence>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestOverloadedConstructorsWithSequence>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -181,8 +181,10 @@
     auto eventInitDict = convert<IDLDictionary<TestPromiseRejectionEvent::Init>>(*lexicalGlobalObject, argument1.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestPromiseRejectionEvent::create(*castedThis->globalObject(), WTFMove(type), WTFMove(eventInitDict));
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestPromiseRejectionEvent>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestPromiseRejectionEvent>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestPromiseRejectionEvent>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -172,8 +172,10 @@
     auto testCallbackInterface = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument2.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 2, "testCallbackInterface", "TestTypedefs", nullptr); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     auto object = TestTypedefs::create(WTFMove(hello), testCallbackFunction.releaseNonNull(), testCallbackInterface.releaseNonNull());
-    static_assert(decltype(object)::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestTypedefs>>(*lexicalGlobalObject, *castedThis->globalObject(), WTFMove(object));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestTypedefs>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
     setSubclassStructureIfNeeded<TestTypedefs>(lexicalGlobalObject, callFrame, asObject(jsValue));
     RETURN_IF_EXCEPTION(throwScope, { });
     return JSValue::encode(jsValue);

Modified: trunk/Source/WebCore/bindings/scripts/test/TestLegacyFactoryFunction.idl (267006 => 267007)


--- trunk/Source/WebCore/bindings/scripts/test/TestLegacyFactoryFunction.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/bindings/scripts/test/TestLegacyFactoryFunction.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -32,7 +32,6 @@
 [
     ActiveDOMObject,
     LegacyFactoryFunction=Audio(DOMString str1, optional DOMString str2 = "defaultString", optional DOMString str3),
-    LegacyFactoryFunctionCallWith=Document,
-    LegacyFactoryFunctionMayThrowException
+    LegacyFactoryFunctionCallWith=Document
 ] interface TestLegacyFactoryFunction {
 };

Modified: trunk/Source/WebCore/css/DOMMatrix.idl (267006 => 267007)


--- trunk/Source/WebCore/css/DOMMatrix.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/css/DOMMatrix.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -29,7 +29,7 @@
     Exposed=(Window,Worker),
     ImplementationLacksVTable
 ] interface DOMMatrix : DOMMatrixReadOnly {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(optional (DOMString or sequence<unrestricted double>) init);
+    [CallWith=ScriptExecutionContext] constructor(optional (DOMString or sequence<unrestricted double>) init);
 
     [MayThrowException, NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other);
     [MayThrowException, NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);

Modified: trunk/Source/WebCore/css/DOMMatrixReadOnly.idl (267006 => 267007)


--- trunk/Source/WebCore/css/DOMMatrixReadOnly.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/css/DOMMatrixReadOnly.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,7 +28,7 @@
     Exposed=(Window,Worker),
     ImplementationLacksVTable
 ] interface DOMMatrixReadOnly {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(optional (DOMString or sequence<unrestricted double>) init);
+    [CallWith=ScriptExecutionContext] constructor(optional (DOMString or sequence<unrestricted double>) init);
 
     [MayThrowException, NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other);
     [MayThrowException, NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);

Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.idl (267006 => 267007)


--- trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
 [
     ImplementationLacksVTable,
 ] interface WebKitCSSMatrix {
-    [MayThrowException] constructor(optional DOMString cssValue);
+    constructor(optional DOMString cssValue);
 
     // These attributes are simple aliases for certain elements of the 4x4 matrix
     attribute unrestricted double a; // alias for m11

Modified: trunk/Source/WebCore/dom/ExceptionOr.h (267006 => 267007)


--- trunk/Source/WebCore/dom/ExceptionOr.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/dom/ExceptionOr.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -200,8 +200,13 @@
     return { };
 }
 
-template <typename T> struct IsExceptionOr : public std::integral_constant<bool, WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value> { };
+template <typename T> inline constexpr bool IsExceptionOr = WTF::IsTemplate<std::decay_t<T>, ExceptionOr>::value;
 
+template <typename T, bool isExceptionOr = IsExceptionOr<T>> struct TypeOrExceptionOrUnderlyingTypeImpl;
+template <typename T> struct TypeOrExceptionOrUnderlyingTypeImpl<T, true> { using Type = typename T::ReturnType; };
+template <typename T> struct TypeOrExceptionOrUnderlyingTypeImpl<T, false> { using Type = T; };
+template <typename T> using TypeOrExceptionOrUnderlyingType = typename TypeOrExceptionOrUnderlyingTypeImpl<T>::Type;
+
 }
 
 namespace WTF {

Modified: trunk/Source/WebCore/dom/StaticRange.idl (267006 => 267007)


--- trunk/Source/WebCore/dom/StaticRange.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/dom/StaticRange.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -28,7 +28,7 @@
     ImplementationLacksVTable,
     Exposed=Window,
 ] interface StaticRange {
-    [MayThrowException] constructor(StaticRangeInit staticRangeInitDict);
+    constructor(StaticRangeInit staticRangeInitDict);
 
     readonly attribute unsigned long startOffset;
     readonly attribute unsigned long endOffset;

Modified: trunk/Source/WebCore/dom/TextDecoder.idl (267006 => 267007)


--- trunk/Source/WebCore/dom/TextDecoder.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/dom/TextDecoder.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -36,7 +36,7 @@
     Exposed=(Window,Worker),
     ImplementationLacksVTable,
 ] interface TextDecoder {
-    [MayThrowException] constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options);
+    constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options);
 
     readonly attribute DOMString encoding;
     readonly attribute boolean fatal;

Modified: trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl (267006 => 267007)


--- trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -29,7 +29,7 @@
     ImplementationLacksVTable,
     PrivateIdentifier,
 ] interface TextDecoderStreamDecoder {
-    [MayThrowException] constructor(DOMString label, boolean fatal, boolean ignoreBOM);
+    constructor(DOMString label, boolean fatal, boolean ignoreBOM);
 
     [PrivateIdentifier] DOMString encoding();
     [PrivateIdentifier, MayThrowException] DOMString decode(BufferSource source);

Modified: trunk/Source/WebCore/html/DOMURL.idl (267006 => 267007)


--- trunk/Source/WebCore/html/DOMURL.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/DOMURL.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -32,8 +32,8 @@
     JSGenerateToNativeObject,
     LegacyWindowAlias=webkitURL,
 ] interface DOMURL {
-    [MayThrowException] constructor(USVString url, optional USVString base);
-    [MayThrowException] constructor(USVString url, DOMURL base);
+    constructor(USVString url, optional USVString base);
+    constructor(USVString url, DOMURL base);
 
     [URL] stringifier attribute USVString href;
     readonly attribute USVString origin;

Modified: trunk/Source/WebCore/html/HTMLAudioElement.cpp (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLAudioElement.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLAudioElement.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -52,7 +52,7 @@
     return element;
 }
 
-Ref<HTMLAudioElement> HTMLAudioElement::createForJSConstructor(Document& document, const AtomString& src)
+Ref<HTMLAudioElement> HTMLAudioElement::createForLegacyFactoryFunction(Document& document, const AtomString& src)
 {
     auto element = create(audioTag, document, false);
     element->setAttributeWithoutSynchronization(preloadAttr, "auto");

Modified: trunk/Source/WebCore/html/HTMLAudioElement.h (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLAudioElement.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLAudioElement.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -38,7 +38,7 @@
     WTF_MAKE_ISO_ALLOCATED(HTMLAudioElement);
 public:
     static Ref<HTMLAudioElement> create(const QualifiedName&, Document&, bool);
-    static Ref<HTMLAudioElement> createForJSConstructor(Document&, const AtomString& src);
+    static Ref<HTMLAudioElement> createForLegacyFactoryFunction(Document&, const AtomString& src);
 
 private:
     HTMLAudioElement(const QualifiedName&, Document&, bool);

Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -102,7 +102,7 @@
     setPictureElement(nullptr);
 }
 
-Ref<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document& document, Optional<unsigned> width, Optional<unsigned> height)
+Ref<HTMLImageElement> HTMLImageElement::createForLegacyFactoryFunction(Document& document, Optional<unsigned> width, Optional<unsigned> height)
 {
     auto image = adoptRef(*new HTMLImageElement(imgTag, document));
     if (width)

Modified: trunk/Source/WebCore/html/HTMLImageElement.h (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLImageElement.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLImageElement.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -50,7 +50,7 @@
 public:
     static Ref<HTMLImageElement> create(Document&);
     static Ref<HTMLImageElement> create(const QualifiedName&, Document&, HTMLFormElement* = nullptr);
-    static Ref<HTMLImageElement> createForJSConstructor(Document&, Optional<unsigned> width, Optional<unsigned> height);
+    static Ref<HTMLImageElement> createForLegacyFactoryFunction(Document&, Optional<unsigned> width, Optional<unsigned> height);
 
     virtual ~HTMLImageElement();
 

Modified: trunk/Source/WebCore/html/HTMLOptionElement.cpp (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLOptionElement.cpp	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLOptionElement.cpp	2020-09-14 00:00:42 UTC (rev 267007)
@@ -69,7 +69,7 @@
     return adoptRef(*new HTMLOptionElement(tagName, document));
 }
 
-ExceptionOr<Ref<HTMLOptionElement>> HTMLOptionElement::createForJSConstructor(Document& document, const String& text, const String& value, bool defaultSelected, bool selected)
+ExceptionOr<Ref<HTMLOptionElement>> HTMLOptionElement::createForLegacyFactoryFunction(Document& document, const String& text, const String& value, bool defaultSelected, bool selected)
 {
     auto element = create(document);
 

Modified: trunk/Source/WebCore/html/HTMLOptionElement.h (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLOptionElement.h	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLOptionElement.h	2020-09-14 00:00:42 UTC (rev 267007)
@@ -35,7 +35,7 @@
 public:
     static Ref<HTMLOptionElement> create(Document&);
     static Ref<HTMLOptionElement> create(const QualifiedName&, Document&);
-    static ExceptionOr<Ref<HTMLOptionElement>> createForJSConstructor(Document&, const String& text, const String& value, bool defaultSelected, bool selected);
+    static ExceptionOr<Ref<HTMLOptionElement>> createForLegacyFactoryFunction(Document&, const String& text, const String& value, bool defaultSelected, bool selected);
 
     WEBCORE_EXPORT String text() const;
     void setText(const String&);

Modified: trunk/Source/WebCore/html/HTMLOptionElement.idl (267006 => 267007)


--- trunk/Source/WebCore/html/HTMLOptionElement.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/HTMLOptionElement.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -20,7 +20,6 @@
 
 [
     JSGenerateToNativeObject,
-    LegacyFactoryFunctionMayThrowException,
     LegacyFactoryFunctionCallWith=Document,
     LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false),
 ] interface HTMLOptionElement : HTMLElement {

Modified: trunk/Source/WebCore/html/ImageData.idl (267006 => 267007)


--- trunk/Source/WebCore/html/ImageData.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/ImageData.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -32,8 +32,8 @@
     Exposed=(Window,Worker),
     ImplementationLacksVTable
 ] interface ImageData {
-    [MayThrowException] constructor(unsigned long sw, unsigned long sh);
-    [MayThrowException] constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh);
+    constructor(unsigned long sw, unsigned long sh);
+    constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh);
 
     readonly attribute unsigned long width;
     readonly attribute unsigned long height;

Modified: trunk/Source/WebCore/html/URLSearchParams.idl (267006 => 267007)


--- trunk/Source/WebCore/html/URLSearchParams.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/URLSearchParams.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
     Exposed=(Window,Worker),
     ImplementationLacksVTable,
 ] interface URLSearchParams {
-    [MayThrowException] constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = "");
+    constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = "");
 
     undefined append(USVString name, USVString value);
     [ImplementedAs=remove] undefined delete(USVString name);

Modified: trunk/Source/WebCore/html/track/TextTrackCue.idl (267006 => 267007)


--- trunk/Source/WebCore/html/track/TextTrackCue.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/html/track/TextTrackCue.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -32,7 +32,7 @@
     SkipVTableValidation,
     LegacyFactoryFunctionEnabledBySetting=GenericCueAPI
 ] interface TextTrackCue : EventTarget {
-    [CallWith=Document, MayThrowException] constructor(double startTime, double endTime, DocumentFragment cueNode);
+    [CallWith=Document] constructor(double startTime, double endTime, DocumentFragment cueNode);
 
     readonly attribute TextTrack track;
 

Modified: trunk/Source/WebCore/page/EventSource.idl (267006 => 267007)


--- trunk/Source/WebCore/page/EventSource.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/page/EventSource.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -33,7 +33,7 @@
     Exposed=(Window,Worker),
     ActiveDOMObject,
 ] interface EventSource : EventTarget {
-    [CallWith=ScriptExecutionContext, MayThrowException] constructor(USVString url, optional EventSourceInit eventSourceInitDict);
+    [CallWith=ScriptExecutionContext] constructor(USVString url, optional EventSourceInit eventSourceInitDict);
 
     readonly attribute USVString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
     readonly attribute USVString url;

Modified: trunk/Source/WebCore/page/IntersectionObserver.idl (267006 => 267007)


--- trunk/Source/WebCore/page/IntersectionObserver.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/page/IntersectionObserver.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -30,7 +30,7 @@
     Conditional=INTERSECTION_OBSERVER,
     EnabledBySetting=IntersectionObserver
 ] interface IntersectionObserver {
-    [CallWith=Document, MayThrowException] constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options);
+    [CallWith=Document] constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options);
 
     readonly attribute Node? root;
     readonly attribute DOMString rootMargin;

Modified: trunk/Source/WebCore/workers/Worker.idl (267006 => 267007)


--- trunk/Source/WebCore/workers/Worker.idl	2020-09-13 23:55:25 UTC (rev 267006)
+++ trunk/Source/WebCore/workers/Worker.idl	2020-09-14 00:00:42 UTC (rev 267007)
@@ -27,7 +27,7 @@
 [
     ActiveDOMObject,
 ] interface Worker : EventTarget {
-    [CallWith=ScriptExecutionContext&RuntimeFlags, MayThrowException] constructor(USVString scriptUrl, optional WorkerOptions options);
+    [CallWith=ScriptExecutionContext&RuntimeFlags] constructor(USVString scriptUrl, optional WorkerOptions options);
 
     undefined terminate();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to