RESOLVED FIXED200669
Remove SessionID default constructor
https://bugs.webkit.org/show_bug.cgi?id=200669
Summary Remove SessionID default constructor
youenn fablet
Reported 2019-08-13 06:48:19 PDT
Instead use explicitly emptySessionID, which we can try to remove the use progressively.
Attachments
Patch (22.28 KB, patch)
2019-08-13 06:53 PDT, youenn fablet
no flags
Patch for landing (22.28 KB, patch)
2019-08-14 02:37 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2019-08-13 06:53:01 PDT
Radar WebKit Bug Importer
Comment 2 2019-08-13 07:17:01 PDT
Alex Christensen
Comment 3 2019-08-13 10:56:13 PDT
Comment on attachment 376159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=376159&action=review > Source/WebCore/PAL/pal/SessionID.h:-35 > - SessionID() Maybe explicitly have = delete. > Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h:67 > + return { }; nullopt > Source/WebKit/Shared/WebPageCreationParameters.h:100 > + PAL::SessionID sessionID { PAL::SessionID::emptySessionID() }; I don't think this should be necessary. Just go to the places where one of these is created and put the value in the constructor. > Source/WebKit/UIProcess/API/APIPageConfiguration.cpp:52 > + : m_sessionID(PAL::SessionID::emptySessionID()) ditto.
youenn fablet
Comment 4 2019-08-14 02:34:42 PDT
(In reply to Alex Christensen from comment #3) > Comment on attachment 376159 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=376159&action=review > > > Source/WebCore/PAL/pal/SessionID.h:-35 > > - SessionID() > > Maybe explicitly have = delete. OK > > Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h:67 > > + return { }; > > nullopt > > > Source/WebKit/Shared/WebPageCreationParameters.h:100 > > + PAL::SessionID sessionID { PAL::SessionID::emptySessionID() }; > > I don't think this should be necessary. Just go to the places where one of > these is created and put the value in the constructor. This allows making the patch smaller. I plan to make a specific patch for this one. > > Source/WebKit/UIProcess/API/APIPageConfiguration.cpp:52 > > + : m_sessionID(PAL::SessionID::emptySessionID()) > > ditto. https://bugs.webkit.org/show_bug.cgi?id=200670 removes APIPageConfiguration::m_sessionID.
youenn fablet
Comment 5 2019-08-14 02:37:02 PDT
Created attachment 376252 [details] Patch for landing
Daniel Bates
Comment 6 2019-08-14 02:48:53 PDT
This patch largely undoes my cleanup in bug #184868, which I think is unfortunate and weird given: 1. you reviewed it 2. You don't mention undoing it or any reasons in the changelog. Nothing to stop you from landing. Just wanted to point it out.
youenn fablet
Comment 7 2019-08-14 02:56:49 PDT
(In reply to Daniel Bates from comment #6) > This patch largely undoes my cleanup in bug #184868, which I think is > unfortunate and weird given: > > 1. you reviewed it > 2. You don't mention undoing it or any reasons in the changelog. With this patch, using decoder >> for sessionIDs is now needed. I updated the decode method to use >> for consistency. Agreed this is reverting part of bug 184868 patch but this should not change any behaviour. I believe there is a trend to use >> more and more these days. It is true we could decide on guidelines for decoders, whether to use >> or decode() by default for instance. I personally tend to use >> for new decode methods.
WebKit Commit Bot
Comment 8 2019-08-14 04:06:33 PDT
Comment on attachment 376252 [details] Patch for landing Clearing flags on attachment: 376252 Committed r248668: <https://trac.webkit.org/changeset/248668>
WebKit Commit Bot
Comment 9 2019-08-14 04:06:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.