Bug 209260 - Add SPI to move localStorage to a different domain
Summary: Add SPI to move localStorage to a different domain
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-18 17:25 PDT by Alex Christensen
Modified: 2020-05-01 16:38 PDT (History)
2 users (show)

See Also:


Attachments
Patch (21.06 KB, patch)
2020-03-18 17:27 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.72 KB, patch)
2020-05-01 14:19 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.90 KB, patch)
2020-05-01 15:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-03-18 17:25:51 PDT
Add SPI to move localStorage to a different domain
Comment 1 Alex Christensen 2020-03-18 17:27:11 PDT
Created attachment 393924 [details]
Patch
Comment 2 Alex Christensen 2020-03-18 17:27:14 PDT
<rdar://problem/60285683>
Comment 3 Alex Christensen 2020-03-23 11:40:53 PDT
https://trac.webkit.org/changeset/258862/webkit
Comment 4 Alex Christensen 2020-03-24 10:37:55 PDT
Reverted in https://trac.webkit.org/changeset/258914/webkit
Comment 5 Alex Christensen 2020-05-01 14:19:36 PDT
Created attachment 398238 [details]
Patch
Comment 6 Alex Christensen 2020-05-01 14:23:23 PDT
Comment on attachment 398238 [details]
Patch

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

Turns out this is better than alternatives.

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:83
> +- (void)_renameOrigin:(NSURL *)oldName to:(NSURL *)newName forDataOfTypes:(NSSet<NSString *> *)dataTypes completionHandler:(void (^)(void))completionHandler;

I changed these from NSStrings to NSURLs and _renameDomain to _renameOrigin

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:2415
> +            networkProcess->addSession(*this);

I also add the session if it hasn't been added yet so the use case works.
Comment 7 Alex Christensen 2020-05-01 15:17:54 PDT
Created attachment 398247 [details]
Patch
Comment 8 EWS 2020-05-01 16:38:28 PDT
Committed r261038: <https://trac.webkit.org/changeset/261038>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398247 [details].