Bug 200669 - Remove SessionID default constructor
Summary: Remove SessionID default constructor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 200670 200708
  Show dependency treegraph
 
Reported: 2019-08-13 06:48 PDT by youenn fablet
Modified: 2019-08-14 04:06 PDT (History)
9 users (show)

See Also:


Attachments
Patch (22.28 KB, patch)
2019-08-13 06:53 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (22.28 KB, patch)
2019-08-14 02:37 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-08-13 06:48:19 PDT
Instead use explicitly emptySessionID, which we can try to remove the use progressively.
Comment 1 youenn fablet 2019-08-13 06:53:01 PDT
Created attachment 376159 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-08-13 07:17:01 PDT
<rdar://problem/54256381>
Comment 3 Alex Christensen 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.
Comment 4 youenn fablet 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.
Comment 5 youenn fablet 2019-08-14 02:37:02 PDT
Created attachment 376252 [details]
Patch for landing
Comment 6 Daniel Bates 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.
Comment 7 youenn fablet 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.
Comment 8 WebKit Commit Bot 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>
Comment 9 WebKit Commit Bot 2019-08-14 04:06:35 PDT
All reviewed patches have been landed.  Closing bug.