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

Unified Diff: src/log.cc

Issue 9038: Create an abstraction for the string type flags so that they can be cached.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/log.cc
===================================================================
--- src/log.cc (revision 654)
+++ src/log.cc (working copy)
@@ -350,11 +350,12 @@
#ifdef ENABLE_LOGGING_AND_PROFILING
void Logger::LogString(Handle<String> str) {
- int len = str->length();
+ StringShape shape(*str);
+ int len = str->length(shape);
if (len > 256)
len = 256;
for (int i = 0; i < len; i++) {
- uc32 c = str->Get(i);
+ uc32 c = str->Get(shape, i);
if (c < 32 || (c > 126 && c <= 255)) {
fprintf(logfile_, "\\x%02x", c);
} else if (c > 255) {
@@ -430,7 +431,8 @@
LogRegExpSource(regexp);
fprintf(logfile_, ",");
LogString(input_string);
- fprintf(logfile_, ",%d..%d\n", start_index, input_string->length());
+ StringShape shape(*input_string);
+ fprintf(logfile_, ",%d..%d\n", start_index, input_string->length(shape));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698