Bug 163791 - [Web IDL] Two types are distinguishable for overload resolution if at most one of the two includes a nullable type
Summary: [Web IDL] Two types are distinguishable for overload resolution if at most on...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 163773 163792 163793 163795 163856 163859
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-21 09:45 PDT by Chris Dumez
Modified: 2016-10-22 22:09 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.52 KB, patch)
2016-10-21 10:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.25 KB, patch)
2016-10-22 21:10 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-10-21 09:45:46 PDT
Fix bad operation overloads in our IDL files.

As per Web IDL [1], two types are distinguishable if at most one of the two includes a nullable type. However, we have overloads in WebKit with more than one nullable type as distinguishing parameter.
We need to fix this so that the bindings generator can generate more correct code.

See following comment in AreTypesDistinguishableForOverloadResolution() in the bindings generator:
# FIXME: The WebIDL mandates this but this currently does not work because some of our IDL is wrong.
# return 0 if $idlTypeA->isNullable && $idlTypeB->isNullable;

[1] https://heycam.github.io/webidl/#dfn-distinguishable
Comment 1 Chris Dumez 2016-10-21 10:40:31 PDT
Created attachment 292370 [details]
Patch
Comment 2 Chris Dumez 2016-10-22 21:10:19 PDT
Created attachment 292532 [details]
Patch
Comment 3 WebKit Commit Bot 2016-10-22 22:09:06 PDT
Comment on attachment 292532 [details]
Patch

Clearing flags on attachment: 292532

Committed r207725: <http://trac.webkit.org/changeset/207725>
Comment 4 WebKit Commit Bot 2016-10-22 22:09:11 PDT
All reviewed patches have been landed.  Closing bug.