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

Issue 8417004: OmniboxView: Attempt to fix a crash in GetSelectedText(). (Closed)

Created:
9 years, 1 month ago by James Hawkins
Modified:
9 years, 1 month ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, James Su
Visibility:
Public.

Description

OmniboxView: Attempt to fix a crash in GetSelectedText(). BUG=101938 TEST=none R=pkasting@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107620

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M chrome/browser/ui/views/omnibox/omnibox_view_win.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
James Hawkins
9 years, 1 month ago (2011-10-27 18:10:17 UTC) #1
Peter Kasting
LGTM with one addition http://codereview.chromium.org/8417004/diff/1/chrome/browser/ui/views/omnibox/omnibox_view_win.cc File chrome/browser/ui/views/omnibox/omnibox_view_win.cc (right): http://codereview.chromium.org/8417004/diff/1/chrome/browser/ui/views/omnibox/omnibox_view_win.cc#newcode615 chrome/browser/ui/views/omnibox/omnibox_view_win.cc:615: GetWindowText(WriteInto(&str, len), len); Can you ...
9 years, 1 month ago (2011-10-27 18:17:53 UTC) #2
James Hawkins
http://codereview.chromium.org/8417004/diff/1/chrome/browser/ui/views/omnibox/omnibox_view_win.cc File chrome/browser/ui/views/omnibox/omnibox_view_win.cc (right): http://codereview.chromium.org/8417004/diff/1/chrome/browser/ui/views/omnibox/omnibox_view_win.cc#newcode615 chrome/browser/ui/views/omnibox/omnibox_view_win.cc:615: GetWindowText(WriteInto(&str, len), len); On 2011/10/27 18:17:53, Peter Kasting wrote: ...
9 years, 1 month ago (2011-10-27 18:26:41 UTC) #3
Peter Kasting
9 years, 1 month ago (2011-10-27 18:38:54 UTC) #4
On 2011/10/27 18:26:41, James Hawkins wrote:
> On 2011/10/27 18:17:53, Peter Kasting wrote:
> > Can you also put this line under the condition:
> > 
> >   if (len > 1)
> >     GetWindowText(WriteInto(&str, len), len);
> > 
> > GetWindowText() seems to handle NULL safely but I'd rather just be
consistent.
> 
> Done. I structured it similar to the other change piece so it reads more of
> "Nothing to do in this case" than "GetWindowText() won't crash here, but we're
> being safe."  That cool?

Sure, whatever.  The other way is shorter but I don't really care much.

Powered by Google App Engine
This is Rietveld 408576698