summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 16:57:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 16:57:13 +0000
commit7c9d829192359328576965fe8a4a52a5ad6c7da3 (patch)
tree6f06ef0a1bd4f797ad2c9f2968950b625867136c /o3d
parent9d3fcf8bc99dfdfef66b983af69802ddbe76514d (diff)
downloadchromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.zip
chromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.tar.gz
chromium_src-7c9d829192359328576965fe8a4a52a5ad6c7da3.tar.bz2
Attempt at fixing leaks from SetProp. Apparently there is a finite
amount of memory reserved for properties and Windows doesn't always automatically free up the memory if the window is deleted without an explicit remove. For the time being I've made it easier to track SetProp leaks, but we may want to move to using something other than SetProp in the future that isn't as fragile. I didn't fix a couple of places that were trickier. I'm going to file separate bugs on them. BUG=44991 TEST=none Review URL: http://codereview.chromium.org/4195003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/cross/o3d_glue.cc1
-rw-r--r--o3d/plugin/win/main_win.cc1
2 files changed, 2 insertions, 0 deletions
diff --git a/o3d/plugin/cross/o3d_glue.cc b/o3d/plugin/cross/o3d_glue.cc
index cce9f2a..aa0b54d 100644
--- a/o3d/plugin/cross/o3d_glue.cc
+++ b/o3d/plugin/cross/o3d_glue.cc
@@ -834,6 +834,7 @@ PluginObject *PluginObject::GetPluginProperty(HWND hWnd) {
void PluginObject::ClearPluginProperty(HWND hWnd) {
if (hWnd) {
+ // TODO: convert to using app::win::ScopedProp.
RemoveProp(hWnd, kWindowPropertyName);
::DragAcceptFiles(hWnd, false);
}
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 225125b..1cbceb8 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -700,6 +700,7 @@ void CleanupAllWindows(PluginObject *obj) {
GetProp(obj->GetPluginHWnd(),
kOrigWndProcName));
DCHECK(origWndProc != NULL);
+ // TODO: this leaks.
RemoveProp(obj->GetPluginHWnd(), kOrigWndProcName);
SetWindowLongPtr(obj->GetPluginHWnd(), GWLP_WNDPROC, origWndProc);