Bug 195634 - Use new RegistrableDomain type in PSON code
Summary: Use new RegistrableDomain type in PSON code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 195637
  Show dependency treegraph
 
Reported: 2019-03-12 12:18 PDT by Chris Dumez
Modified: 2019-03-13 10:49 PDT (History)
7 users (show)

See Also:


Attachments
Patch (20.68 KB, patch)
2019-03-12 12:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-03-12 12:18:20 PDT
Use new RegistrableDomain type in PSON code instead of more error-prone String type.
Comment 1 Chris Dumez 2019-03-12 12:28:56 PDT
Created attachment 364425 [details]
Patch
Comment 2 John Wilander 2019-03-12 13:49:50 PDT
Comment on attachment 364425 [details]
Patch

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

> Source/WebKit/UIProcess/SuspendedPageProxy.cpp:85
> +    , m_registrableDomain(URL(URL(), item.url()))

Do you need to construct a new URL with item.url()?
Comment 3 Chris Dumez 2019-03-12 13:54:01 PDT
Comment on attachment 364425 [details]
Patch

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

>> Source/WebKit/UIProcess/SuspendedPageProxy.cpp:85
>> +    , m_registrableDomain(URL(URL(), item.url()))
> 
> Do you need to construct a new URL with item.url()?

item.url() returns a String, not a URL.
Comment 4 Chris Dumez 2019-03-13 08:48:16 PDT
ping review?
Comment 5 youenn fablet 2019-03-13 10:45:01 PDT
Comment on attachment 364425 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessProxy.h:118
> +    WebCore::RegistrableDomain registrableDomain() const { return m_registrableDomain.valueOr(WebCore::RegistrableDomain { }); }

It seems we can have m_registrableDomain being nullopt, isEmpty or being a real registrable domain.
But we do not expose the difference between nullopt and isEmpty in the public getter.
Can it be a potential source of issues in the future?
Comment 6 Chris Dumez 2019-03-13 10:48:51 PDT
Comment on attachment 364425 [details]
Patch

Clearing flags on attachment: 364425

Committed r242889: <https://trac.webkit.org/changeset/242889>
Comment 7 Chris Dumez 2019-03-13 10:48:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-03-13 10:49:31 PDT
<rdar://problem/48853537>