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

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

Issue 21095008: Revert the latest set of platform changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/isolate.cc ('k') | src/mutex.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 30 matching lines...) Expand all
41 Log::Log(Logger* logger) 41 Log::Log(Logger* logger)
42 : is_stopped_(false), 42 : is_stopped_(false),
43 output_handle_(NULL), 43 output_handle_(NULL),
44 mutex_(NULL), 44 mutex_(NULL),
45 message_buffer_(NULL), 45 message_buffer_(NULL),
46 logger_(logger) { 46 logger_(logger) {
47 } 47 }
48 48
49 49
50 void Log::Initialize(const char* log_file_name) { 50 void Log::Initialize(const char* log_file_name) {
51 mutex_ = new Mutex; 51 mutex_ = OS::CreateMutex();
52 message_buffer_ = NewArray<char>(kMessageBufferSize); 52 message_buffer_ = NewArray<char>(kMessageBufferSize);
53 53
54 // --log-all enables all the log flags. 54 // --log-all enables all the log flags.
55 if (FLAG_log_all) { 55 if (FLAG_log_all) {
56 FLAG_log_runtime = true; 56 FLAG_log_runtime = true;
57 FLAG_log_api = true; 57 FLAG_log_api = true;
58 FLAG_log_code = true; 58 FLAG_log_code = true;
59 FLAG_log_gc = true; 59 FLAG_log_gc = true;
60 FLAG_log_suspect = true; 60 FLAG_log_suspect = true;
61 FLAG_log_handles = true; 61 FLAG_log_handles = true;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 ASSERT(pos_ <= Log::kMessageBufferSize); 255 ASSERT(pos_ <= Log::kMessageBufferSize);
256 const int written = log_->WriteToFile(log_->message_buffer_, pos_); 256 const int written = log_->WriteToFile(log_->message_buffer_, pos_);
257 if (written != pos_) { 257 if (written != pos_) {
258 log_->stop(); 258 log_->stop();
259 log_->logger_->LogFailure(); 259 log_->logger_->LogFailure();
260 } 260 }
261 } 261 }
262 262
263 263
264 } } // namespace v8::internal 264 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/mutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698