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

Unified Diff: mojo/common/weak_binding_set.h

Issue 1293253002: Connect WebUSB client interface to the devices app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix memory leak in WeakBindingSet Created 5 years, 4 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 | « device/devices_app/usb/device_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/weak_binding_set.h
diff --git a/mojo/common/weak_binding_set.h b/mojo/common/weak_binding_set.h
index a94e8f4adb05570607647543a39ab10344ccb334..7696c82c280487e266c520b6bd9f3fc245cd131b 100644
--- a/mojo/common/weak_binding_set.h
+++ b/mojo/common/weak_binding_set.h
@@ -36,8 +36,10 @@ class WeakBindingSet {
void CloseAllBindings() {
for (const auto& it : bindings_) {
- if (it)
+ if (it) {
it->Close();
+ delete it.get();
+ }
}
bindings_.clear();
}
« no previous file with comments | « device/devices_app/usb/device_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698