RESOLVED FIXED 151720
Add "RaisesExceptionWithMessage" IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=151720
Summary Add "RaisesExceptionWithMessage" IDL attribute
Brady Eidson
Reported 2015-12-01 13:28:25 PST
Add "RaisesExceptionWithMessage" IDL attribute Exceptions can have a string message giving more information about the nature of the specific exception, even if it is a common ExceptionCode. We'll need this for Modern IndexedDB. To support this feature, the bindings generator should have an attribute to support it.
Attachments
Patch v1 (17.81 KB, patch)
2015-12-01 13:32 PST, Brady Eidson
achristensen: review+
Brady Eidson
Comment 1 2015-12-01 13:32:41 PST
Created attachment 266387 [details] Patch v1
Alex Christensen
Comment 2 2015-12-01 13:42:10 PST
Comment on attachment 266387 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=266387&action=review r=me. Yay perl! > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2854 > + my $raisesExceptionWithMessage = $function->signature->extendedAttributes->{"RaisesExceptionWithMessage"}; I would put this line after this to prevent misuse and confusion: die "RaisesException and RaisesExceptionWithMessage are mutually exclusive" if $raisesException && $raisesExceptionWithMessage; > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3833 > + push(@implContent, $indent . " setDOMException(state, ec);\n") if $raisesException && !$raisesExceptionWithMessage; I don't think this && !$raisesExceptionWithMessage is necessary. Same with the two shortly following. > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3893 > + push(@implContent, "\n" . $indent . "setDOMException(state, ec);\n") if $raisesException && !$raisesExceptionWithMessage; ditto.
Brady Eidson
Comment 3 2015-12-01 13:47:20 PST
Note You need to log in before you can comment on or make changes to this bug.