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

Issue 174110: Print more info in IsStringASCII assertions. (Closed)

Created:
11 years, 4 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Print more info in IsStringASCII assertions. This will help debugging when you have only the logs. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23900

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M base/string_util.cc View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Paweł Hajdan Jr.
11 years, 4 months ago (2009-08-20 00:20:09 UTC) #1
Dean McNamee
How well does our logging system dump non-ascii strings? I guess you just get it ...
11 years, 4 months ago (2009-08-20 00:22:05 UTC) #2
Paweł Hajdan Jr.
I'm not sure, but it shouldn't crash, and will probably have some hints about fixing ...
11 years, 4 months ago (2009-08-20 00:59:32 UTC) #3
Dean McNamee
11 years, 4 months ago (2009-08-20 18:02:30 UTC) #4
Ok

On 2009/08/20 00:59:32, Paweł Hajdan Jr. wrote:
> I'm not sure, but it shouldn't crash, and will probably have some hints
> about fixing the issue.
> 
> On Wed, Aug 19, 2009 at 17:21, Dean McNamee <mailto:deanm@chromium.org> wrote:
> 
> > How well does our logging system dump non-ascii strings?  I guess you
> > just get it byte for byte in the log file?
> >
> > On Wed, Aug 19, 2009 at 5:20 PM,  <mailto:phajdan.jr@chromium.org> wrote:
> > > Reviewers: Dean McNamee, Mark Mentovai,
> > >
> > > Description:
> > > Print more info in IsStringASCII assertions.
> > >
> > > This will help debugging when you have only the logs.
> > >
> > > TEST=none
> > > BUG=none
> > >
> > > Please review this at http://codereview.chromium.org/174110
> > >
> > > Affected files:
> > >  M base/string_util.cc
> > >
> > >
> > > Index: base/string_util.cc
> > > diff --git a/base/string_util.cc b/base/string_util.cc
> > > index
> > >
> >
>
b456376ee4460d10de3ecfb45fbdbb112a504fa5..f58f105ee1653b6a9ec83948d9243b3073c300bf
> > > 100644
> > > --- a/base/string_util.cc
> > > +++ b/base/string_util.cc
> > > @@ -502,22 +502,22 @@ std::string CollapseWhitespaceASCII(const
> > std::string&
> > > text,
> > >  }
> > >
> > >  std::string WideToASCII(const std::wstring& wide) {
> > > -  DCHECK(IsStringASCII(wide));
> > > +  DCHECK(IsStringASCII(wide)) << wide;
> > >   return std::string(wide.begin(), wide.end());
> > >  }
> > >
> > >  std::wstring ASCIIToWide(const StringPiece& ascii) {
> > > -  DCHECK(IsStringASCII(ascii));
> > > +  DCHECK(IsStringASCII(ascii)) << ascii;
> > >   return std::wstring(ascii.begin(), ascii.end());
> > >  }
> > >
> > >  std::string UTF16ToASCII(const string16& utf16) {
> > > -  DCHECK(IsStringASCII(utf16));
> > > +  DCHECK(IsStringASCII(utf16)) << utf16;
> > >   return std::string(utf16.begin(), utf16.end());
> > >  }
> > >
> > >  string16 ASCIIToUTF16(const StringPiece& ascii) {
> > > -  DCHECK(IsStringASCII(ascii));
> > > +  DCHECK(IsStringASCII(ascii)) << ascii;
> > >   return string16(ascii.begin(), ascii.end());
> > >  }
> > >
> > >
> > >
> > >
> >
>

Powered by Google App Engine
This is Rietveld 408576698