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

Side by Side Diff: src/log-utils.cc

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/log.cc ('k') | src/macro-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 for (int i = 0; i < len; i++) { 376 for (int i = 0; i < len; i++) {
377 uc32 c = str->Get(i); 377 uc32 c = str->Get(i);
378 if (c > 0xff) { 378 if (c > 0xff) {
379 Append("\\u%04x", c); 379 Append("\\u%04x", c);
380 } else if (c < 32 || c > 126) { 380 } else if (c < 32 || c > 126) {
381 Append("\\x%02x", c); 381 Append("\\x%02x", c);
382 } else if (c == ',') { 382 } else if (c == ',') {
383 Append("\\,"); 383 Append("\\,");
384 } else if (c == '\\') { 384 } else if (c == '\\') {
385 Append("\\\\"); 385 Append("\\\\");
386 } else if (c == '\"') {
387 Append("\"\"");
386 } else { 388 } else {
387 Append("%lc", c); 389 Append("%lc", c);
388 } 390 }
389 } 391 }
390 } 392 }
391 393
392 394
393 void LogMessageBuilder::AppendStringPart(const char* str, int len) { 395 void LogMessageBuilder::AppendStringPart(const char* str, int len) {
394 if (pos_ + len > Log::kMessageBufferSize) { 396 if (pos_ + len > Log::kMessageBufferSize) {
395 len = Log::kMessageBufferSize - pos_; 397 len = Log::kMessageBufferSize - pos_;
(...skipping 16 matching lines...) Expand all
412 if (written != pos_) { 414 if (written != pos_) {
413 log_->stop(); 415 log_->stop();
414 log_->logger_->LogFailure(); 416 log_->logger_->LogFailure();
415 } 417 }
416 } 418 }
417 419
418 420
419 #endif // ENABLE_LOGGING_AND_PROFILING 421 #endif // ENABLE_LOGGING_AND_PROFILING
420 422
421 } } // namespace v8::internal 423 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698