Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1363)

Unified Diff: content/browser/indexed_db/indexed_db_callbacks.cc

Issue 320103003: Fix a bug wherein we'd release a scoped_ptr and dereference it in the same line of code. That work… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A better fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_callbacks.cc
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 74c2558bf7f613e23babf7ff525fce8b03811487..74a76fdce53de540f390fb177a45710e8cb6c95e 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -249,16 +249,14 @@ static void CreateBlobsAndSend(
static void BlobLookupForCursorPrefetch(
IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params* params,
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host,
- const std::vector<IndexedDBValue>& values,
- std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >*
- blob_or_file_infos) {
+ const std::vector<IndexedDBValue>& values) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK_EQ(values.size(), blob_or_file_infos->size());
+ DCHECK_EQ(values.size(), params->blob_or_file_infos.size());
std::vector<IndexedDBValue>::const_iterator value_iter;
std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >::iterator blob_iter;
- for (value_iter = values.begin(), blob_iter = blob_or_file_infos->begin();
- value_iter != values.end();
+ for (value_iter = values.begin(), blob_iter =
+ params->blob_or_file_infos.begin(); value_iter != values.end();
++value_iter, ++blob_iter) {
if (!CreateAllBlobs(value_iter->blob_info, &*blob_iter, dispatcher_host))
return;
@@ -453,8 +451,7 @@ void IndexedDBCallbacks::OnSuccessWithPrefetch(
base::Bind(BlobLookupForCursorPrefetch,
base::Owned(params.release()),
dispatcher_host_,
- values,
- base::Unretained(&params->blob_or_file_infos)));
+ values));
} else {
dispatcher_host_->Send(
new IndexedDBMsg_CallbacksSuccessCursorPrefetch(*params.get()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698