[Webkit-unassigned] [Bug 278373] New: If IDL returns a non-nullable type, C++ should not be able to return a nullable type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 19 23:57:49 PDT 2024


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

            Bug ID: 278373
           Summary: If IDL returns a non-nullable type, C++ should not be
                    able to return a nullable type
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Bindings
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: annevk at annevk.nl
                CC: cdumez at apple.com, sam at webkit.org

We have a number of cases where IDL specifies something along the lines of

    [CheckSecurityForNode] Document getSVGDocument()

yet the corresponding method is declared as

    Document* getSVGDocument() const;

Now you can change IDL's Document to Document? and everything behaves exactly the same (and ends up following the specification), but that seems suboptimal. What would be better is if this did not compile.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240820/7b0e7cc8/attachment.htm>


More information about the webkit-unassigned mailing list