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

Unified Diff: components/sync/syncable/directory.h

Issue 2844333003: [Sync] Address use-after-free in Directory::InsertEntry (Closed)
Patch Set: Created 3 years, 8 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 | components/sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/directory.h
diff --git a/components/sync/syncable/directory.h b/components/sync/syncable/directory.h
index 2911d3d562b938986eebe620836d002c7ab1cc5d..820487451c65be39a85cbcaa0f6998f5aef404f8 100644
--- a/components/sync/syncable/directory.h
+++ b/components/sync/syncable/directory.h
@@ -500,7 +500,8 @@ class Directory {
AttachmentIdList* ids);
// For new entry creation only.
- bool InsertEntry(BaseWriteTransaction* trans, EntryKernel* entry);
+ bool InsertEntry(BaseWriteTransaction* trans,
+ std::unique_ptr<EntryKernel> entry);
// Update the attachment index for |metahandle| removing it from the index
// under |old_metadata| entries and add it under |new_metadata| entries.
@@ -557,7 +558,7 @@ class Directory {
bool InsertEntry(const ScopedKernelLock& lock,
BaseWriteTransaction* trans,
- EntryKernel* entry);
+ std::unique_ptr<EntryKernel> entry);
// Remove each of |metahandle|'s attachment ids from index_by_attachment_id.
void RemoveFromAttachmentIndex(
« no previous file with comments | « no previous file | components/sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698