Bug 237283 - Migrate third-party IndexedDB data to GeneralStorageDirectory
Summary: Migrate third-party IndexedDB data to GeneralStorageDirectory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Website Storage (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-28 12:38 PST by Sihui Liu
Modified: 2022-03-01 00:03 PST (History)
4 users (show)

See Also:


Attachments
Patch (25.73 KB, patch)
2022-02-28 13:57 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (26.33 KB, patch)
2022-02-28 22:47 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2022-02-28 12:38:45 PST
...
Comment 1 Sihui Liu 2022-02-28 13:57:53 PST
Created attachment 453422 [details]
Patch
Comment 2 Chris Dumez 2022-02-28 19:11:42 PST
Comment on attachment 453422 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:407
> +    auto preferences = (__bridge WKPreferencesRef)[configuration preferences];

Why cast to C API?

Let's just use the Cocoa API:
`[[configuration preferences] _setStorageBlockingPolicy:_WKStorageBlockingPolicyAllowAll];`

You may have to include WKPreferencesPrivate.h if not already included.

Mixing C and Cocoa API is a bit ugly :)
Comment 3 Sihui Liu 2022-02-28 20:01:28 PST
Comment on attachment 453422 [details]
Patch

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

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:407
>> +    auto preferences = (__bridge WKPreferencesRef)[configuration preferences];
> 
> Why cast to C API?
> 
> Let's just use the Cocoa API:
> `[[configuration preferences] _setStorageBlockingPolicy:_WKStorageBlockingPolicyAllowAll];`
> 
> You may have to include WKPreferencesPrivate.h if not already included.
> 
> Mixing C and Cocoa API is a bit ugly :)

Sure :) I didn't see the Cocoa API
Comment 4 Sihui Liu 2022-02-28 22:47:41 PST
Created attachment 453477 [details]
Patch for landing
Comment 5 EWS 2022-03-01 00:02:10 PST
Committed r290632 (247905@main): <https://commits.webkit.org/247905@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453477 [details].
Comment 6 Radar WebKit Bug Importer 2022-03-01 00:03:18 PST
<rdar://problem/89605260>