OLD | NEW |
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 #ifdef ENABLE_LOGGING_AND_PROFILING | 396 #ifdef ENABLE_LOGGING_AND_PROFILING |
397 // ApiEvent is private so all the calls come from the Logger class. It is the | 397 // ApiEvent is private so all the calls come from the Logger class. It is the |
398 // caller's responsibility to ensure that log is enabled and that | 398 // caller's responsibility to ensure that log is enabled and that |
399 // FLAG_log_api is true. | 399 // FLAG_log_api is true. |
400 void Logger::ApiEvent(const char* format, ...) { | 400 void Logger::ApiEvent(const char* format, ...) { |
401 ASSERT(Log::IsEnabled() && FLAG_log_api); | 401 ASSERT(Log::IsEnabled() && FLAG_log_api); |
402 LogMessageBuilder msg; | 402 LogMessageBuilder msg; |
403 va_list ap; | 403 va_list ap; |
404 va_start(ap, format); | 404 va_start(ap, format); |
405 msg.Append(format, ap); | 405 msg.AppendVA(format, ap); |
406 va_end(ap); | 406 va_end(ap); |
407 msg.WriteToLogFile(); | 407 msg.WriteToLogFile(); |
408 } | 408 } |
409 #endif | 409 #endif |
410 | 410 |
411 | 411 |
412 void Logger::ApiNamedSecurityCheck(Object* key) { | 412 void Logger::ApiNamedSecurityCheck(Object* key) { |
413 #ifdef ENABLE_LOGGING_AND_PROFILING | 413 #ifdef ENABLE_LOGGING_AND_PROFILING |
414 if (!Log::IsEnabled() || !FLAG_log_api) return; | 414 if (!Log::IsEnabled() || !FLAG_log_api) return; |
415 if (key->IsString()) { | 415 if (key->IsString()) { |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 } else if (previous_->state_ == EXTERNAL) { | 1243 } else if (previous_->state_ == EXTERNAL) { |
1244 // We are leaving V8. | 1244 // We are leaving V8. |
1245 Heap::Protect(); | 1245 Heap::Protect(); |
1246 } | 1246 } |
1247 } | 1247 } |
1248 #endif | 1248 #endif |
1249 } | 1249 } |
1250 #endif | 1250 #endif |
1251 | 1251 |
1252 } } // namespace v8::internal | 1252 } } // namespace v8::internal |
OLD | NEW |