[ios] Add a workaround for a bug in WebKit

Calling +[WKWebsitDataStore removeDataStoreForIdentifier:completion:]
without instantiating any WKWebsitDataStore leads to a crash. This is
a bug in WebKit (likely caused by some lazy initialization performed
when the first WKWebsitDataStore, and this method depends on the lazy
initialization to have happened).

Additionally, use `base::BindPostTask(...)` to ensure the callback is
called on the correct sequence even if WebKit invoke the block on a
background queue (the documentation does not precise on which queue
the completion will be invoked).

Bug: 333865629
Change-Id: Ieaa9e0f48ec068329cc2ecba8342eb45716ffde4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6233834
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1416307}
NOKEYCHECK=True
GitOrigin-RevId: d99f2e85b6cbf7ebdc31a733e4e911b2d392d051
1 file changed
tree: dbf3d3c44c0452bae2177cb7f04c947b5099608e
  1. build/
  2. chrome/
  3. components/
  4. google_internal/
  5. intents/
  6. net/
  7. public/
  8. testing/
  9. third_party/
  10. tools/
  11. web/
  12. web_view/
  13. .swift-format
  14. BUILD.gn
  15. COMMON_METADATA
  16. DEPS
  17. DIR_METADATA
  18. features.gni
  19. OWNERS
  20. PRESUBMIT.py
  21. PRESUBMIT_test.py
  22. README.md
README.md

This directory holds code related to Chrome for iOS. See this document for a description of the structure underneath this directory.