diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 19:38:30 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 19:38:30 +0000 |
commit | a3153c47d3b5308e7a55c0924a0baa1a6e02dcd0 (patch) | |
tree | b37c85641aef8df14c732e4b187444e040a11555 /chrome/views/text_field.cc | |
parent | a93e517bfe25f11b2c4cc7d69f386424b93a2efa (diff) | |
download | chromium_src-a3153c47d3b5308e7a55c0924a0baa1a6e02dcd0.zip chromium_src-a3153c47d3b5308e7a55c0924a0baa1a6e02dcd0.tar.gz chromium_src-a3153c47d3b5308e7a55c0924a0baa1a6e02dcd0.tar.bz2 |
This CL adds macro used to track the creation and destruction
of HWNDs, in an attempt to detect potential double-delete.
A double-delete of a HWND might be responsible for the crasher
http://crbug.com/4714
Note: this CL was previously committed and reverted because it broke the sandbox integration module.
Review URL: http://codereview.chromium.org/21032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9161 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/text_field.cc')
-rw-r--r-- | chrome/views/text_field.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc index 79ee7b9..7c4e2fd 100644 --- a/chrome/views/text_field.cc +++ b/chrome/views/text_field.cc @@ -70,7 +70,9 @@ class TextField::Edit MSG_WM_CHAR(OnChar) MSG_WM_CONTEXTMENU(OnContextMenu) MSG_WM_COPY(OnCopy) + MSG_WM_CREATE(OnCreate) MSG_WM_CUT(OnCut) + MSG_WM_DESTROY(OnDestroy) MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition) MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) MSG_WM_KEYDOWN(OnKeyDown) @@ -116,7 +118,9 @@ class TextField::Edit void OnChar(TCHAR key, UINT repeat_count, UINT flags); void OnContextMenu(HWND window, const CPoint& point); void OnCopy(); + LRESULT OnCreate(CREATESTRUCT* create_struct); void OnCut(); + void OnDestroy(); LRESULT OnImeStartComposition(UINT message, WPARAM wparam, LPARAM lparam); LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); @@ -414,6 +418,11 @@ void TextField::Edit::OnCopy() { } } +LRESULT TextField::Edit::OnCreate(CREATESTRUCT* create_struct) { + TRACK_HWND_CREATION(m_hWnd); + return 0; +} + void TextField::Edit::OnCut() { if (parent_->IsReadOnly()) return; @@ -425,6 +434,10 @@ void TextField::Edit::OnCut() { ReplaceSel(L"", true); } +void TextField::Edit::OnDestroy() { + TRACK_HWND_DESTRUCTION(m_hWnd); +} + LRESULT TextField::Edit::OnImeStartComposition(UINT message, WPARAM wparam, LPARAM lparam) { |