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

Issue 2124009: Fix a crasher with "select file" dialogs. (Closed)

Created:
10 years, 7 months ago by Jay Civelli
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

A crasher would sometimes happen when opening a selet file dialog (such as when loading an unpacled extension). This is because we would reinterpret cast the user data of the HWND to a WidgetWin, and in that case the Windows dialog has a user-data that we did not set. This CL checks that the HWND is at least a WindowImpl before attempting to retrieve the WidgetWin, ensuring we won't mess with windows we did not create directly. BUG=44312 TEST=Open the extension page. Move the focus by pressing TAB to the "Load unpacked extension..." button. Press ENTER many times quickly so it opens/closes the "Select dir" dialog. It should not crash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=47672

Patch Set 1 #

Patch Set 2 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M app/win/window_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M app/win/window_impl.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M views/widget/widget_win.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Jay Civelli
10 years, 7 months ago (2010-05-18 20:50:09 UTC) #1
Ben Goodger (Google)
10 years, 7 months ago (2010-05-19 00:00:16 UTC) #2
OK

Powered by Google App Engine
This is Rietveld 408576698