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"); |