diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 21:56:00 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 21:56:00 +0000 |
commit | f8ed412acb7bcab9855d0ebd9d29f7e38a3a8f92 (patch) | |
tree | 50cd47072b3fa58e37324d7c1d0a6fcec5fafd2c /webkit/glue | |
parent | ed92ad5574e373640f54e67856c3610a4b055ebb (diff) | |
download | chromium_src-f8ed412acb7bcab9855d0ebd9d29f7e38a3a8f92.zip chromium_src-f8ed412acb7bcab9855d0ebd9d29f7e38a3a8f92.tar.gz chromium_src-f8ed412acb7bcab9855d0ebd9d29f7e38a3a8f92.tar.bz2 |
Change the map of accessibility id to IAccessible interface to hold
a COMPtr<IAccessible> instead. This ensures that it is refcounted.
I saw an instance while debugging bug 4582, where the map actually had
a junk IAccessible pointer with a valid accessibility id.
Bug=4582
R=jam
Review URL: http://codereview.chromium.org/10980
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/glue_accessibility.cc | 2 | ||||
-rw-r--r-- | webkit/glue/glue_accessibility.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/glue_accessibility.cc b/webkit/glue/glue_accessibility.cc index 7119358..ee3a3e1 100644 --- a/webkit/glue/glue_accessibility.cc +++ b/webkit/glue/glue_accessibility.cc @@ -263,7 +263,7 @@ bool GlueAccessibility::ClearIAccessibleMap(int iaccessible_id, if (it->second) { // Erase element from reverse hashmap. IAccessibleToIntMap::iterator it2 = - iaccessible_to_int_map_.find(it->second); + iaccessible_to_int_map_.find(it->second.get()); DCHECK(it2 != iaccessible_to_int_map_.end()); iaccessible_to_int_map_.erase(it2); diff --git a/webkit/glue/glue_accessibility.h b/webkit/glue/glue_accessibility.h index 918e71e..e7343b6 100644 --- a/webkit/glue/glue_accessibility.h +++ b/webkit/glue/glue_accessibility.h @@ -12,7 +12,9 @@ class WebView; -typedef stdext::hash_map<int, IAccessible*> IntToIAccessibleMap; +template <typename T> class COMPtr; + +typedef stdext::hash_map<int, COMPtr<IAccessible> > IntToIAccessibleMap; typedef stdext::hash_map<IAccessible*, int> IAccessibleToIntMap; //////////////////////////////////////////////////////////////////////////////// |