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

Unified Diff: runtime/vm/object.cc

Issue 2689563003: Use zone memory for StackTrace::ToCString. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | runtime/vm/vm_sources.gypi » ('j') | runtime/vm/zone_text_buffer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d48e22f0eabf636aa3ec226a31b1771cd54b1461..f78b66ffb8db635e92174ea91865afccd4de736f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -47,6 +47,7 @@
#include "vm/type_table.h"
#include "vm/unicode.h"
#include "vm/weak_code.h"
+#include "vm/zone_text_buffer.h"
namespace dart {
@@ -22332,7 +22333,7 @@ const char* StackTrace::ToCString() const {
static void PrintStackTraceFrame(Zone* zone,
- TextBuffer* buffer,
+ ZoneTextBuffer* buffer,
const Function& function,
TokenPosition token_pos,
intptr_t frame_index) {
@@ -22370,7 +22371,7 @@ const char* StackTrace::ToCStringInternal(intptr_t* frame_index,
Code& code = Code::Handle(zone);
GrowableArray<const Function*> inlined_functions;
GrowableArray<TokenPosition> inlined_token_positions;
- TextBuffer buffer(1024);
+ ZoneTextBuffer buffer(zone, 1024);
// Iterate through the stack frames and create C string description
// for each frame.
@@ -22416,7 +22417,7 @@ const char* StackTrace::ToCStringInternal(intptr_t* frame_index,
}
}
- return buffer.Steal();
+ return buffer.buffer();
}
« no previous file with comments | « no previous file | runtime/vm/vm_sources.gypi » ('j') | runtime/vm/zone_text_buffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698