diff options
author | Chris Mumford <cmumford@chromium.org> | 2020-12-18 00:53:19 +0000 |
---|---|---|
committer | Michael Brüning <michael.bruning@qt.io> | 2021-03-29 09:42:56 +0000 |
commit | 212a1e9728ba63249bd1ee878a00f06914bc28b4 (patch) | |
tree | 14d5fc2ff29d9953918e692d085357d4cab0fc14 | |
parent | a55b6f7085c5a89c0b4a51ec6a0657ed6163bfc9 (diff) |
[Backport] Security bug 1142712 (2/2)
Cherry-pick of patch originally reviewed on
https://chromium-review.googlesource.com/c/chromium/src/+/2596871:
indexeddb: Have ReleaseOnIDBSequence used rvalue reference.
Making change to be consistent with SequencedTaskRunner::ReleaseSoon.
Bug: 1142712
Change-Id: Ic0c84f3c656f0504b87091be1f70c51949259f24
Auto-Submit: Chris Mumford <cmumford@google.com>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838338}
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
-rw-r--r-- | chromium/content/browser/indexed_db/indexed_db_context_impl.cc | 2 | ||||
-rw-r--r-- | chromium/content/browser/indexed_db/indexed_db_context_impl.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/chromium/content/browser/indexed_db/indexed_db_context_impl.cc b/chromium/content/browser/indexed_db/indexed_db_context_impl.cc index dfd55951687..fa8e7bd2f8e 100644 --- a/chromium/content/browser/indexed_db/indexed_db_context_impl.cc +++ b/chromium/content/browser/indexed_db/indexed_db_context_impl.cc @@ -109,7 +109,7 @@ void GetAllOriginsAndPaths(const base::FilePath& indexeddb_path, // static void IndexedDBContextImpl::ReleaseOnIDBSequence( - scoped_refptr<IndexedDBContextImpl> context) { + scoped_refptr<IndexedDBContextImpl>&& context) { if (!context->idb_task_runner_->RunsTasksInCurrentSequence()) { IndexedDBContextImpl* context_ptr = context.get(); context_ptr->IDBTaskRunner()->ReleaseSoon(FROM_HERE, std::move(context)); diff --git a/chromium/content/browser/indexed_db/indexed_db_context_impl.h b/chromium/content/browser/indexed_db/indexed_db_context_impl.h index 0d5cae65985..165e8059cf5 100644 --- a/chromium/content/browser/indexed_db/indexed_db_context_impl.h +++ b/chromium/content/browser/indexed_db/indexed_db_context_impl.h @@ -57,7 +57,8 @@ class CONTENT_EXPORT IndexedDBContextImpl static const base::FilePath::CharType kIndexedDBDirectory[]; // Release |context| on the IDBTaskRunner. - static void ReleaseOnIDBSequence(scoped_refptr<IndexedDBContextImpl> context); + static void ReleaseOnIDBSequence( + scoped_refptr<IndexedDBContextImpl>&& context); // If |data_path| is empty, nothing will be saved to disk. // |task_runner| is optional, and only set during testing. |