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

Unified Diff: src/frames.cc

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 years, 5 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/flags.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 7e0079bcf62917c47bd3c273cab8f55415a25403..7eb3e20159d28c37f33e31aa34f6526e4dce888a 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1273,10 +1273,12 @@ void JavaScriptFrame::Print(StringStream* accumulator,
// Print details about the function.
if (FLAG_max_stack_trace_source_length != 0 && code != NULL) {
+ OStringStream os;
SharedFunctionInfo* shared = function->shared();
- accumulator->Add("--------- s o u r c e c o d e ---------\n");
- shared->SourceCodePrint(accumulator, FLAG_max_stack_trace_source_length);
- accumulator->Add("\n-----------------------------------------\n");
+ os << "--------- s o u r c e c o d e ---------\n"
+ << SourceCodeOf(shared, FLAG_max_stack_trace_source_length)
+ << "\n-----------------------------------------\n";
+ accumulator->Add(os.c_str());
}
accumulator->Add("}\n\n");
« no previous file with comments | « src/flags.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698