WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180682
Storage Access API: Implement frame-specific access in the document.cookie layer
https://bugs.webkit.org/show_bug.cgi?id=180682
Summary
Storage Access API: Implement frame-specific access in the document.cookie layer
John Wilander
Reported
2017-12-11 16:40:24 PST
This is part 3 of making Storage Access API frame-specific.
Attachments
Patch
(43.91 KB, patch)
2017-12-13 12:49 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch
(44.12 KB, patch)
2017-12-13 12:54 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-elcapitan
(1.75 MB, application/zip)
2017-12-13 13:41 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews113 for mac-elcapitan
(1.08 MB, application/zip)
2017-12-13 13:54 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews123 for ios-simulator-wk2
(2.19 MB, application/zip)
2017-12-13 14:17 PST
,
EWS Watchlist
no flags
Details
Patch
(63.73 KB, patch)
2017-12-13 15:30 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch
(64.64 KB, patch)
2017-12-13 16:07 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-elcapitan
(1.79 MB, application/zip)
2017-12-13 16:55 PST
,
EWS Watchlist
no flags
Details
Patch
(67.97 KB, patch)
2017-12-13 16:59 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-elcapitan
(1.82 MB, application/zip)
2017-12-13 17:52 PST
,
EWS Watchlist
no flags
Details
Patch
(71.71 KB, patch)
2017-12-13 18:02 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch
(76.55 KB, patch)
2017-12-14 12:14 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch
(78.23 KB, patch)
2017-12-14 13:19 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch for landing
(81.04 KB, patch)
2017-12-14 14:07 PST
,
John Wilander
no flags
Details
Formatted Diff
Diff
Show Obsolete
(13)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-12-11 16:41:05 PST
<
rdar://problem/35982257
>
John Wilander
Comment 2
2017-12-13 12:49:52 PST
Created
attachment 329244
[details]
Patch
John Wilander
Comment 3
2017-12-13 12:50:31 PST
Uploading for early patch feedback and EWS results.
John Wilander
Comment 4
2017-12-13 12:54:54 PST
Created
attachment 329245
[details]
Patch
Alex Christensen
Comment 5
2017-12-13 13:30:23 PST
Comment on
attachment 329245
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329245&action=review
Don't break the linux build. Otherwise r=me
> Source/WebCore/platform/network/CacheValidation.cpp:351 > + return cookieRequestHeaderFieldValue(NetworkStorageSession::defaultStorageSession(), request.firstPartyForCookies(), request.url(), std::nullopt, std::nullopt, includeSecureCookies).first;
We should look into passing in real values here.
> Source/WebKit/Shared/mac/CookieStorageShim.mm:64 > + if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(PAL::SessionID::defaultSessionID(), firstPartyForCookiesURL, inRequestURL, std::nullopt, std::nullopt, includeSecureCookies), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(cookies, secureCookiesAccessed), 0))
This is no big deal. I filed
https://bugs.webkit.org/show_bug.cgi?id=180766
to get rid of this code on all platforms where we have ITP.
EWS Watchlist
Comment 6
2017-12-13 13:41:56 PST
Comment on
attachment 329245
[details]
Patch
Attachment 329245
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5649060
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 7
2017-12-13 13:41:58 PST
Created
attachment 329253
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 8
2017-12-13 13:54:58 PST
Comment on
attachment 329245
[details]
Patch
Attachment 329245
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5649088
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 9
2017-12-13 13:54:59 PST
Created
attachment 329256
[details]
Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 10
2017-12-13 14:17:56 PST
Comment on
attachment 329245
[details]
Patch
Attachment 329245
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/5649188
New failing tests: http/tests/websocket/tests/hybi/workers/worker-reload.html
EWS Watchlist
Comment 11
2017-12-13 14:17:57 PST
Created
attachment 329258
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
John Wilander
Comment 12
2017-12-13 15:30:31 PST
Created
attachment 329270
[details]
Patch
John Wilander
Comment 13
2017-12-13 16:07:27 PST
Created
attachment 329278
[details]
Patch
John Wilander
Comment 14
2017-12-13 16:09:31 PST
WebSockets may not have a frame so I made CookieJar.cpp check for the existence of a frame and if there is none, call with std::nullopt for frameID and pageID.
EWS Watchlist
Comment 15
2017-12-13 16:55:04 PST
Comment on
attachment 329278
[details]
Patch
Attachment 329278
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5651778
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 16
2017-12-13 16:55:05 PST
Created
attachment 329290
[details]
Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
John Wilander
Comment 17
2017-12-13 16:59:15 PST
Created
attachment 329291
[details]
Patch
EWS Watchlist
Comment 18
2017-12-13 17:52:05 PST
Comment on
attachment 329291
[details]
Patch
Attachment 329291
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5652637
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 19
2017-12-13 17:52:07 PST
Created
attachment 329299
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
John Wilander
Comment 20
2017-12-13 18:02:17 PST
Created
attachment 329302
[details]
Patch
John Wilander
Comment 21
2017-12-13 18:04:18 PST
Introduced FrameLoaderClient::hasIDs() to be able to check whether the client has IDs available or not. Otherwise I hit RELEASE_ASSERT_NOT_REACHED() calls in WebKitLegacy.
Alex Christensen
Comment 22
2017-12-13 18:16:31 PST
Comment on
attachment 329302
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329302&action=review
I think it's time to introduce a new structure that contains two std::optional<uint64_t>, and maybe some URLs, too.
> Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:204 > +bool WebFrameLoaderClient::hasIDs() const
I think returning std::nullopt from WebFrameLoaderClient::pageID is cleaner than this. I don't think we have a good reason to RELEASE_ASSERT_NOT_REACHED when they're called other than that we had no legitimate use of pageID in WebCore before this, and now we do. Returning std::nullopt is the correct WebKitLegacy behavior for this. I'd be open if someone feels differently.
John Wilander
Comment 23
2017-12-14 12:14:17 PST
Created
attachment 329379
[details]
Patch
John Wilander
Comment 24
2017-12-14 12:15:47 PST
(In reply to Alex Christensen from
comment #22
)
> Comment on
attachment 329302
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329302&action=review
> > I think it's time to introduce a new structure that contains two > std::optional<uint64_t>, and maybe some URLs, too.
I will first see if I can get this working. Then either update this patch to do it in a follow-up patch.
> > Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:204 > > +bool WebFrameLoaderClient::hasIDs() const > > I think returning std::nullopt from WebFrameLoaderClient::pageID is cleaner > than this. I don't think we have a good reason to > RELEASE_ASSERT_NOT_REACHED when they're called other than that we had no > legitimate use of pageID in WebCore before this, and now we do. Returning > std::nullopt is the correct WebKitLegacy behavior for this. I'd be open if > someone feels differently.
OK. This is what Tim Horton suggested too. The new patch does this. Thanks!
John Wilander
Comment 25
2017-12-14 13:19:41 PST
Created
attachment 329391
[details]
Patch
John Wilander
Comment 26
2017-12-14 13:21:49 PST
Fix for the Windows ports.
Alex Christensen
Comment 27
2017-12-14 13:25:17 PST
Comment on
attachment 329391
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329391&action=review
> Source/WebCore/loader/EmptyFrameLoaderClient.h:36 > + std::optional<uint64_t> frameID() const override { return 0; } > + std::optional<uint64_t> pageID() const override { return 0; }
These should probably return nullopt
John Wilander
Comment 28
2017-12-14 14:02:29 PST
(In reply to Alex Christensen from
comment #27
)
> Comment on
attachment 329391
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329391&action=review
> > > Source/WebCore/loader/EmptyFrameLoaderClient.h:36 > > + std::optional<uint64_t> frameID() const override { return 0; } > > + std::optional<uint64_t> pageID() const override { return 0; } > > These should probably return nullopt
Thanks, Alex! Will fix.
John Wilander
Comment 29
2017-12-14 14:07:15 PST
Created
attachment 329402
[details]
Patch for landing
WebKit Commit Bot
Comment 30
2017-12-14 14:39:52 PST
Comment on
attachment 329402
[details]
Patch for landing Clearing flags on attachment: 329402 Committed
r225934
: <
https://trac.webkit.org/changeset/225934
>
WebKit Commit Bot
Comment 31
2017-12-14 14:39:54 PST
All reviewed patches have been landed. Closing bug.
Fujii Hironori
Comment 32
2017-12-18 01:22:08 PST
A lot of crashed on AppleWin LayoutTests. I'm going to fix it in
Bug 180926
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug