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

Side by Side Diff: chrome/browser/render_widget_host_hwnd.cc

Issue 6282: Fixes crash in BrowserAccessibilityManager destructor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_accessibility_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/render_widget_host_hwnd.h" 5 #include "chrome/browser/render_widget_host_hwnd.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/gfx/bitmap_header.h" 8 #include "base/gfx/bitmap_header.h"
9 #include "base/gfx/rect.h" 9 #include "base/gfx/rect.h"
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 return static_cast<LRESULT>(0L); 766 return static_cast<LRESULT>(0L);
767 } 767 }
768 768
769 CComPtr<IAccessible> accessibility_comptr(accessibility); 769 CComPtr<IAccessible> accessibility_comptr(accessibility);
770 770
771 // Root id is always 0, to distinguish this particular instance when 771 // Root id is always 0, to distinguish this particular instance when
772 // mapping to the render-side IAccessible. 772 // mapping to the render-side IAccessible.
773 accessibility->set_iaccessible_id(0); 773 accessibility->set_iaccessible_id(0);
774 774
775 // Set the unique member variables of this particular process. 775 // Set the unique member variables of this particular process.
776 accessibility->set_instance_id(BrowserAccessibilityManager::Instance()-> 776 accessibility->set_instance_id(
777 SetMembers(accessibility, m_hWnd, render_widget_host_)); 777 BrowserAccessibilityManager::GetInstance()->
778 SetMembers(accessibility, m_hWnd, render_widget_host_));
778 779
779 // All is well, assign the temp instance to the class smart pointer. 780 // All is well, assign the temp instance to the class smart pointer.
780 browser_accessibility_root_.Attach(accessibility_comptr.Detach()); 781 browser_accessibility_root_.Attach(accessibility_comptr.Detach());
781 782
782 if (!browser_accessibility_root_) { 783 if (!browser_accessibility_root_) {
783 // Paranoia check. Return with failure. 784 // Paranoia check. Return with failure.
784 NOTREACHED(); 785 NOTREACHED();
785 return static_cast<LRESULT>(0L); 786 return static_cast<LRESULT>(0L);
786 } 787 }
787 788
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 866
866 return TRUE; 867 return TRUE;
867 } 868 }
868 869
869 void RenderWidgetHostHWND::ShutdownHost() { 870 void RenderWidgetHostHWND::ShutdownHost() {
870 shutdown_factory_.RevokeAll(); 871 shutdown_factory_.RevokeAll();
871 render_widget_host_->Shutdown(); 872 render_widget_host_->Shutdown();
872 // Do not touch any members at this point, |this| has been deleted. 873 // Do not touch any members at this point, |this| has been deleted.
873 } 874 }
874 875
OLDNEW
« no previous file with comments | « chrome/browser/browser_accessibility_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698