[Webkit-unassigned] [Bug 165477] Functions with a return type of ExceptionOr<String> cannot "return emptyString(); "

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 7 08:55:43 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=165477

--- Comment #4 from Jer Noble <jer.noble at apple.com> ---
(In reply to comment #2)
> Let me know if the workaround works or not.

It does!

> I’m sure we can come up with a way to make the syntax more elegant if this
> comes up a lot.

I understand the motivation for not allowing "initialization-by-copy-constructor" by default, but I think this pattern may become more common. Enum values in WebIDL are turn into Strings in the bindings, and I've often defined "static const String& enumValue();" methods in tho bound classes to represent each enumerated value. A getter that can either return an enum value or throw an exception will likely hit this quirk.  It may be worth it to make an exception (hah!) for ExceptionOr<String> or ExceptionOr<AtomicString>.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161207/d5b11205/attachment-0001.html>


More information about the webkit-unassigned mailing list