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; |
} |