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

Unified Diff: src/log.cc

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lithium-codegen.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 86f5ce0967a849fb5a73cda5eec2cfa82e4f4764..1b350c4909478a2996d61755389217aafd0ab1a5 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <stdarg.h>
+#include "src/log.h"
+
+#include <cstdarg>
+#include <sstream>
#include "src/v8.h"
@@ -13,7 +16,6 @@
#include "src/cpu-profiler.h"
#include "src/deoptimizer.h"
#include "src/global-handles.h"
-#include "src/log.h"
#include "src/log-utils.h"
#include "src/macro-assembler.h"
#include "src/perf-jit.h"
@@ -1785,13 +1787,13 @@ void Logger::LogAccessorCallbacks() {
}
-static void AddIsolateIdIfNeeded(OStream& os, // NOLINT
+static void AddIsolateIdIfNeeded(std::ostream& os, // NOLINT
Isolate* isolate) {
if (FLAG_logfile_per_isolate) os << "isolate-" << isolate << "-";
}
-static void PrepareLogFileName(OStream& os, // NOLINT
+static void PrepareLogFileName(std::ostream& os, // NOLINT
Isolate* isolate, const char* file_name) {
AddIsolateIdIfNeeded(os, isolate);
for (const char* p = file_name; *p; p++) {
@@ -1836,9 +1838,9 @@ bool Logger::SetUp(Isolate* isolate) {
FLAG_log_snapshot_positions = true;
}
- OStringStream log_file_name;
+ std::ostringstream log_file_name;
PrepareLogFileName(log_file_name, isolate, FLAG_logfile);
- log_->Initialize(log_file_name.c_str());
+ log_->Initialize(log_file_name.str().c_str());
if (FLAG_perf_basic_prof) {
@@ -1852,7 +1854,7 @@ bool Logger::SetUp(Isolate* isolate) {
}
if (FLAG_ll_prof) {
- ll_logger_ = new LowLevelLogger(log_file_name.c_str());
+ ll_logger_ = new LowLevelLogger(log_file_name.str().c_str());
addCodeEventListener(ll_logger_);
}
« no previous file with comments | « src/lithium-codegen.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698