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

Unified Diff: sync/internal_api/js_sync_manager_observer.cc

Issue 10821091: Fix leak in JsSyncManagerObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove another suppression Created 8 years, 5 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 | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/js_sync_manager_observer.cc
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index 078e1e9a51d32d72dc496ba44cea6f36a4f4b4b0..f0171078ff2836ea0552433f9c9e1a3543fed63d 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -131,10 +131,12 @@ void JsSyncManagerObserver::OnInitializationComplete(
// Ignore the |js_backend| argument; it's not really convertible to
// JSON anyway.
- DictionaryValue* details = new DictionaryValue();
- details->Set("restoredTypes", ModelTypeSetToValue(restored_types));
+ DictionaryValue details;
+ details.Set("restoredTypes", ModelTypeSetToValue(restored_types));
- HandleJsEvent(FROM_HERE, "onInitializationComplete", JsEventDetails(details));
+ HandleJsEvent(FROM_HERE,
+ "onInitializationComplete",
+ JsEventDetails(&details));
}
void JsSyncManagerObserver::OnStopSyncingPermanently() {
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698