Bug 106012

Summary: [SOUP] Convert WebSoupRequestManagerProxy to be WebContextSupplement
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Carlos Garcia Campos <cgarcia>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, eric, gustavo, gyuyoung.kim, mrobinson, rakuco, sam, webkit.review.bot
Priority: P2 Keywords: Gtk, Soup
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Description Carlos Garcia Campos 2013-01-03 06:09:14 PST
ssia
Comment 1 Carlos Garcia Campos 2013-01-03 06:11:07 PST
Created attachment 181167 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-03 06:12:26 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2013-01-03 09:13:12 PST
Comment on attachment 181167 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181167&action=review

> Source/WebKit2/ChangeLog:7
> +        https://bugs.webkit.org/show_bug.cgi?id=106012
> +
> +        Reviewed by NOBODY (OOPS!).
> +

Could use a bit of context here or in the bug about why it makes sense to switch to this to a WebContextSupplement, for posterity.

> Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp:98
> +    if (!context())
> +        return;

What's the mechanism by which the context becomes NULL. It's passed in as an argument, so does it become invalid at some point during the lifetime of the object?
Comment 4 Carlos Garcia Campos 2013-01-03 10:18:26 PST
(In reply to comment #3)
> (From update of attachment 181167 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=181167&action=review
> 
> > Source/WebKit2/ChangeLog:7
> > +        https://bugs.webkit.org/show_bug.cgi?id=106012
> > +
> > +        Reviewed by NOBODY (OOPS!).
> > +
> 
> Could use a bit of context here or in the bug about why it makes sense to switch to this to a WebContextSupplement, for posterity.

To make the WebContext code more simple and cleaner, same reaoning as bug #105890, for example.

> > Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp:98
> > +    if (!context())
> > +        return;
> 
> What's the mechanism by which the context becomes NULL. 

WebContextSupplement::clearContext()

> It's passed in as an argument, so does it become invalid at some point during the lifetime of the object?

It's cleared in the WebContext destructor, some supplements have the checks and some other don't, so I decided to include to be extra sure.
Comment 5 Eric Seidel (no email) 2013-01-04 00:53:22 PST
Attachment 181167 [details] was posted by a committer and has review+, assigning to Carlos Garcia Campos for commit.
Comment 6 Carlos Garcia Campos 2013-01-04 01:08:22 PST
Committed r138783: <http://trac.webkit.org/changeset/138783>