OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 Append("\\\\"); | 373 Append("\\\\"); |
374 } else { | 374 } else { |
375 Append("%lc", c); | 375 Append("%lc", c); |
376 } | 376 } |
377 } | 377 } |
378 } | 378 } |
379 | 379 |
380 // Write the log message to the log file currently opened. | 380 // Write the log message to the log file currently opened. |
381 void LogMessageBuilder::WriteToLogFile() { | 381 void LogMessageBuilder::WriteToLogFile() { |
382 ASSERT(pos_ <= Logger::kMessageBufferSize); | 382 ASSERT(pos_ <= Logger::kMessageBufferSize); |
383 fwrite(Logger::message_buffer_, 1, pos_, Logger::logfile_); | 383 size_t rv = fwrite(Logger::message_buffer_, 1, pos_, Logger::logfile_); |
| 384 ASSERT(rv == static_cast<size_t>(pos_)); |
384 } | 385 } |
385 #endif | 386 #endif |
386 | 387 |
387 | 388 |
388 // | 389 // |
389 // Logger class implementation. | 390 // Logger class implementation. |
390 // | 391 // |
391 Ticker* Logger::ticker_ = NULL; | 392 Ticker* Logger::ticker_ = NULL; |
392 char* Logger::message_buffer_ = NULL; | 393 char* Logger::message_buffer_ = NULL; |
393 FILE* Logger::logfile_ = NULL; | 394 FILE* Logger::logfile_ = NULL; |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 if (FLAG_log_state_changes) { | 1131 if (FLAG_log_state_changes) { |
1131 LOG(UncheckedStringEvent("Leaving", StateToString(state_))); | 1132 LOG(UncheckedStringEvent("Leaving", StateToString(state_))); |
1132 if (previous_) { | 1133 if (previous_) { |
1133 LOG(UncheckedStringEvent("To", StateToString(previous_->state_))); | 1134 LOG(UncheckedStringEvent("To", StateToString(previous_->state_))); |
1134 } | 1135 } |
1135 } | 1136 } |
1136 } | 1137 } |
1137 #endif | 1138 #endif |
1138 | 1139 |
1139 } } // namespace v8::internal | 1140 } } // namespace v8::internal |
OLD | NEW |