Bug 169486 - Cleanup "addCookie" and its sole user
Summary: Cleanup "addCookie" and its sole user
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on: 169546
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-10 15:17 PST by Brady Eidson
Modified: 2017-03-13 10:29 PDT (History)
14 users (show)

See Also:


Attachments
Patch (47.06 KB, patch)
2017-03-10 16:25 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (47.71 KB, patch)
2017-03-10 19:19 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (47.83 KB, patch)
2017-03-10 19:55 PST, Brady Eidson
bburg: review+
Details | Formatted Diff | Diff
Patch for landing (46.21 KB, patch)
2017-03-11 03:09 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2017-03-10 15:17:00 PST
Cleanup "addCookie" and its sole user

addCookie doesn't cleanly fit in with the native cookie storage API, and a lot of dead code was added to support it as well.

Refactoring this to be "setCookies" like NSHTTPCookieStorage supports will be better going forward.
Comment 1 Brady Eidson 2017-03-10 16:25:11 PST
Created attachment 304098 [details]
Patch
Comment 2 Brady Eidson 2017-03-10 16:26:00 PST
Already reviewed. Waiting for EWS.
Comment 3 Brady Eidson 2017-03-10 19:19:38 PST
Created attachment 304117 [details]
Patch
Comment 4 Brady Eidson 2017-03-10 19:20:32 PST
Attempt to fix GTK, and hopefully the rest of the EWS bots will actually be responsive this time.
Comment 5 Brady Eidson 2017-03-10 19:55:29 PST
Created attachment 304120 [details]
Patch
Comment 6 BJ Burg 2017-03-10 22:56:37 PST
Comment on attachment 304120 [details]
Patch

r=me

GTK is still sad.
Comment 7 Carlos Garcia Campos 2017-03-11 03:09:47 PST
Created attachment 304160 [details]
Patch for landing
Comment 8 Carlos Garcia Campos 2017-03-11 03:15:32 PST
(In reply to comment #6)
> Comment on attachment 304120 [details]
> Patch
> 
> r=me
> 
> GTK is still sad.

This is a known issue with our forwarding headers generator. It doesn't scan generated sources, so in this case #include <WebCoreCookie.h> is only added to the generated header DerivedSources/WebKit2/WebCookieManagerMessages.h. WebCookieManager.cpp needs that include, but it doesn't include it explicitly becase it already includes WebCookieManagerMessages.h. Our forwarding header generator doesn't generate the forwarding header in this case. To fix it we only need to make sure the header is included in a non-generated source file, in this case WebCookieManager.cpp. We could probably change the generator to also scan generated sources, ensuring the script is always run after all generated sources during the build. I'm not sure how easy that would be, though.
Comment 9 WebKit Commit Bot 2017-03-11 08:44:04 PST
Comment on attachment 304160 [details]
Patch for landing

Clearing flags on attachment: 304160

Committed r213759: <http://trac.webkit.org/changeset/213759>
Comment 10 WebKit Commit Bot 2017-03-11 08:44:10 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Michael Catanzaro 2017-03-11 10:17:52 PST
(In reply to comment #8) 
> This is a known issue with our forwarding headers generator. It doesn't scan
> generated sources, so in this case #include <WebCoreCookie.h> is only added
> to the generated header DerivedSources/WebKit2/WebCookieManagerMessages.h.
> WebCookieManager.cpp needs that include, but it doesn't include it
> explicitly becase it already includes WebCookieManagerMessages.h. Our
> forwarding header generator doesn't generate the forwarding header in this
> case. To fix it we only need to make sure the header is included in a
> non-generated source file, in this case WebCookieManager.cpp. We could
> probably change the generator to also scan generated sources, ensuring the
> script is always run after all generated sources during the build. I'm not
> sure how easy that would be, though.

Is there a bug report for this...?
Comment 12 Csaba Osztrogonác 2017-03-12 00:20:17 PST
(In reply to comment #9)
> Comment on attachment 304160 [details]
> Patch for landing
> 
> Clearing flags on attachment: 304160
> 
> Committed r213759: <http://trac.webkit.org/changeset/213759>

It broke the Apple Mac cmake build.
Comment 13 Csaba Osztrogonác 2017-03-13 10:29:20 PDT
Just to document, the Windows build was fixed in bug169546