commit | de67bfe0dab99f2160a8c3b2db01dec19ce80c3e | [log] [tgz] |
---|---|---|
author | Mingyu Lei <leimy@chromium.org> | Tue Dec 20 12:01:36 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 20 12:01:36 2022 |
tree | c98687a0898caa8736ef2579f3cd09d20445f158 | |
parent | fc6d56abf08fcd62c7b7ac736691d467e2d08445 [diff] |
[IndexedDB] Check if the connection callback is null in the closure When the IndexedDB service sends the versionchange event, the connection is passed as a weak pointer to the closure, and that will only run if the client is active. We have the null check for the connection pointer itself, but not for the `callbacks_`. The `callbacks_` object could be reset to nullptr during `IndexedDBConnection::AbortTransactionsAndClose()`, if the closure runs after the event but before the IndexedDBConnection is destroyed, we may end up trying to invoke the `OnVersionChange()` method on a null pointer. Bug: 1402021 Change-Id: Ic1ad4d366d5e37fb537b6c03b6a24d9efb7cb952 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4113383 Reviewed-by: Evan Stade <estade@chromium.org> Commit-Queue: Mingyu Lei <leimy@chromium.org> Cr-Commit-Position: refs/heads/main@{#1085379}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.