Bug 152826
| Summary: | [GTK] Audit nullability of char* parameters and return values in API | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bugs-noreply, garetxe, mcatanzaro |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Michael Catanzaro
Carlos thought char* was implicitly (allow-none), but in bug #146589 we discovered it's not. Got to check every use of these and add the (allow-none) annotation where appropriate.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
*** Bug 156452 has been marked as a duplicate of this bug. ***
Michael Catanzaro
Note from bug #156452:
(In reply to comment #0)
> webkit_web_view_get_uri can return NULL, but it is not annotated accordingly.
>
> This is a problem for bindings which represent nullability at the type
> level, such as Haskell.
>
> (By the way, there is handy script in
> https://bugzilla.gnome.org/show_bug.cgi?id=753520 that helps in finding such
> missing annotations.)
Michael Catanzaro
Also note we probably need to stick with deprecated (allow-none) rather than using (nullable) and (optional), for compatibility.
Michael Catanzaro
(In reply to comment #3)
> Also note we probably need to stick with deprecated (allow-none) rather than
> using (nullable) and (optional), for compatibility.
Since we can bump our gobject-introspection dep, we should also switch to (nullable) now.
Michael Catanzaro
(In reply to comment #4)
> (In reply to comment #3)
> > Also note we probably need to stick with deprecated (allow-none) rather than
> > using (nullable) and (optional), for compatibility.
>
> Since we can bump our gobject-introspection dep, we should also switch to
> (nullable) now.
And (optional). We should not have any use of (allow-none) anywhere in WebKit.