Bug 237283

Summary: Migrate third-party IndexedDB data to GeneralStorageDirectory
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Website StorageAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, sihui_liu, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

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>