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

Unified Diff: runtime/vm/profiler_service.cc

Issue 1952023002: Minor cleanup based on profiler output of CompileParseFunction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index c0ac69d47b2166490ad000d93c1bdebaa5be0c2d..4d5c4a52f21431260a9c6eb784a35fa9e2032326 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -2544,12 +2544,13 @@ const char* ProfileTrieWalker::CurrentToken() {
// No function.
return NULL;
}
- const Script& script = Script::Handle(function.script());
+ Zone* zone = Thread::Current()->zone();
+ const Script& script = Script::Handle(zone, function.script());
if (script.IsNull()) {
// No script.
return NULL;
}
- const TokenStream& token_stream = TokenStream::Handle(script.tokens());
+ const TokenStream& token_stream = TokenStream::Handle(zone, script.tokens());
if (token_stream.IsNull()) {
// No token position.
return NULL;
@@ -2567,8 +2568,8 @@ const char* ProfileTrieWalker::CurrentToken() {
if (token_pos.IsSynthetic()) {
token_pos = token_pos.FromSynthetic();
}
- TokenStream::Iterator iterator(token_stream, token_pos);
- const String& str = String::Handle(iterator.CurrentLiteral());
+ TokenStream::Iterator iterator(zone, token_stream, token_pos);
+ const String& str = String::Handle(zone, iterator.CurrentLiteral());
if (str.IsNull()) {
return NULL;
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698