commit | d529d12ded4c70e57a7cda59e2d089366098b6cc | [log] [tgz] |
---|---|---|
author | Chase Phillips <cmp@chromium.org> | Thu Feb 21 20:37:24 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Feb 21 20:37:24 2019 |
tree | c05390646fbbbb279e6e484668ffee549ca6b2d5 | |
parent | 1c9ff1df8ff498821171ca6a9378e065d0ed6ade [diff] |
Blob storage: Fix ChromeBlobStorageContext deleter to use DeleteOnIOThread The original one-off deleter for ChromeBlobStorageContext attempts to delete |this| directly when not called on the IO thread and the IO thread isn't available. This causes problems with objects it owns since some objects require being deleted on the IO thread. This manifested in flaky tests like EmptyBlob and Bug84933Test which started failing in a flaky way when IndexedDBDispatcherHost (which holds a scoped_refptr<ChromeBlobStorageContext>) was moved from the IO thread to the IDB task runner. The flaky crashes looked like: [8496:100:0221/084948.427:FATAL:memory_dump_manager.cc(247)] Check failed: (*mdp_iter)->task_runner && (*mdp_iter)->task_runner->RunsTasksInCurrentSequence(). MemoryDumpProvider "BlobStorageContext" attempted to unregister itself in a racy way. Please file a crbug. Backtrace: base::debug::CollectStackTrace [0x00007FF6F62CCAA2+18] base::debug::StackTrace::StackTrace [0x00007FF6F62CC002+18] logging::LogMessage::~LogMessage [0x00007FF6F62E7885+101] base::trace_event::MemoryDumpManager::UnregisterDumpProviderInternal [0x00007FF6F634BC2B+827] storage::BlobStorageContext::~BlobStorageContext [0x00007FF6F61D7362+34] storage::BlobStorageContext::`scalar deleting destructor' [0x00007FF6F61DA8F0+16] content::ChromeBlobStorageContext::`scalar deleting destructor' [0x00007FF6F46EF4F8+40] content::IndexedDBDispatcherHost::~IndexedDBDispatcherHost [0x00007FF6F48FC6BE+382] content::IndexedDBDispatcherHost::`scalar deleting destructor' [0x00007FF6F48FDFA0+16] Remove the one-off deleter for ChromeBlobStorageContext in favor of DeleteOnIOThread which always tries to delete the object on the IO thread and, if the IO thread isn't available, gives up since that indicates a leak on shutdown, which is generally okay in circumstances like this. Bug: 717812, 934243, 934250 Change-Id: Ibfda4b0b8f17d3eeb95773bb2a75f0e9a16e84b5 Reviewed-on: https://chromium-review.googlesource.com/c/1481597 Reviewed-by: Daniel Murphy <dmurph@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Commit-Queue: Chase Phillips <cmp@chromium.org> Cr-Commit-Position: refs/heads/master@{#634328}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .