Bug 152826 - [GTK] Audit nullability of char* parameters and return values in API
Summary: [GTK] Audit nullability of char* parameters and return values in API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 156452 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-06 20:52 PST by Michael Catanzaro
Modified: 2017-01-20 20:09 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-01-06 20:52:29 PST
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.
Comment 1 Michael Catanzaro 2016-04-10 09:08:18 PDT
*** Bug 156452 has been marked as a duplicate of this bug. ***
Comment 2 Michael Catanzaro 2016-04-10 09:11:41 PDT
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.)
Comment 3 Michael Catanzaro 2016-04-10 09:12:35 PDT
Also note we probably need to stick with deprecated (allow-none) rather than using (nullable) and (optional), for compatibility.
Comment 4 Michael Catanzaro 2017-01-20 20:09:10 PST
(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.
Comment 5 Michael Catanzaro 2017-01-20 20:09:37 PST
(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.