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

Unified Diff: app/win/scoped_prop.h

Issue 5144005: Converts usage of SetProp/GetProp to a map. Even after making sure we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix build Created 10 years, 1 month 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 | « app/view_prop_unittest.cc ('k') | chrome/browser/external_tab_container_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/win/scoped_prop.h
diff --git a/app/win/scoped_prop.h b/app/win/scoped_prop.h
index 14e6a6af137f5fa644582bb743d87c3dc4b5d47e..c309e52c24171ef7ab20e3d29e7db5e8035e8d61 100644
--- a/app/win/scoped_prop.h
+++ b/app/win/scoped_prop.h
@@ -18,6 +18,12 @@ namespace win {
// cleanup. ScopedProp must be destroyed before the window is destroyed, else
// you're going to leak a property, which could lead to failure to set a
// property later on.
+//
+// *WARNING*
+// SetProp is very fragile. SetProp makes use of a finite chunk of memory that
+// is very easy to exhaust. Unless you need to share a property across process
+// boundaries you should instead use ViewProp, which does not cause leaks at the
+// window manager.
class ScopedProp {
public:
// Registers the key value pair for the specified window. ScopedProp does not
« no previous file with comments | « app/view_prop_unittest.cc ('k') | chrome/browser/external_tab_container_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698