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

Issue 383263002: Fix a use after free crasher in the BrowserAccessibilityManagerWinTest.TestAccessibleHWND test. (Closed)

Created:
6 years, 5 months ago by ananta
Modified:
6 years, 5 months ago
Reviewers:
dmazzoni
CC:
chromium-reviews, plundblad+watch_chromium.org, aboxhall+watch_chromium.org, jam, yuzo+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Fix a use after free crasher in the BrowserAccessibilityManagerWinTest.TestAccessibleHWND test. The crash occurs because a scoped_ptr instance which holds the TestLegacyRenderWidgetHostHWND class is left with a dangling pointer to the LegacyRenderWidgetHostHWND instance which is destroyed via DestroyWindow. Fix is to first reset the scoped_ptr which in turn destroys the legacy window and the instance. The DestroyWindow call is removed as it is not needed anymore. I also added a call to the CreateATLModuleIfNeeded helper function in BrowserAccessibility::Create as I was hitting a crash due to a NULL AtlModule. We do this already in the ctor of the BrowserAccessibilityManagerWin class. However that is too late as we have base classes which create COM objects. This crash only happens in the component builds. BUG=393228 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282759

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M content/browser/accessibility/browser_accessibility_win.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ananta
6 years, 5 months ago (2014-07-11 19:38:48 UTC) #1
dmazzoni
lgtm
6 years, 5 months ago (2014-07-11 20:50:01 UTC) #2
ananta
The CQ bit was checked by ananta@chromium.org
6 years, 5 months ago (2014-07-11 20:50:22 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ananta@chromium.org/383263002/1
6 years, 5 months ago (2014-07-11 20:51:29 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-12 00:48:12 UTC) #5
Message was sent while issue was closed.
Change committed as 282759

Powered by Google App Engine
This is Rietveld 408576698