| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 FILE* result; | 719 FILE* result; |
| 720 if (fopen_s(&result, path, mode) == 0) { | 720 if (fopen_s(&result, path, mode) == 0) { |
| 721 return result; | 721 return result; |
| 722 } else { | 722 } else { |
| 723 return NULL; | 723 return NULL; |
| 724 } | 724 } |
| 725 } | 725 } |
| 726 | 726 |
| 727 | 727 |
| 728 // Open log file in binary mode to avoid /n -> /r/n conversion. | 728 // Open log file in binary mode to avoid /n -> /r/n conversion. |
| 729 const char* OS::LogFileOpenMode = "wb"; | 729 const char* const OS::LogFileOpenMode = "wb"; |
| 730 | 730 |
| 731 | 731 |
| 732 // Print (debug) message to console. | 732 // Print (debug) message to console. |
| 733 void OS::Print(const char* format, ...) { | 733 void OS::Print(const char* format, ...) { |
| 734 va_list args; | 734 va_list args; |
| 735 va_start(args, format); | 735 va_start(args, format); |
| 736 VPrint(format, args); | 736 VPrint(format, args); |
| 737 va_end(args); | 737 va_end(args); |
| 738 } | 738 } |
| 739 | 739 |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 | 1948 |
| 1949 // Release the thread handles | 1949 // Release the thread handles |
| 1950 CloseHandle(data_->sampler_thread_); | 1950 CloseHandle(data_->sampler_thread_); |
| 1951 CloseHandle(data_->profiled_thread_); | 1951 CloseHandle(data_->profiled_thread_); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 | 1954 |
| 1955 #endif // ENABLE_LOGGING_AND_PROFILING | 1955 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1956 | 1956 |
| 1957 } } // namespace v8::internal | 1957 } } // namespace v8::internal |
| OLD | NEW |