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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 328663008: Add support to trace warnings in TraceBuffer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 37220)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -3970,12 +3970,12 @@
const Function& function = parsed_function_->function();
va_list args;
va_start(args, format);
+ const Script& script = Script::Handle(I, function.script());
const Error& error = Error::Handle(
I,
LanguageError::NewFormattedV(
Error::Handle(I, Error::null()), // No previous error.
- Script::Handle(I, function.script()),
- token_pos, LanguageError::kWarning,
+ script, token_pos, LanguageError::kWarning,
Heap::kNew, format, args));
va_end(args);
if (FLAG_warning_as_error) {
@@ -3983,6 +3983,9 @@
UNREACHABLE();
} else {
OS::Print("%s", error.ToErrorCString());
+ va_start(args, format);
+ TraceBuffer::TraceWarningV(I, script, token_pos, format, args);
+ va_end(args);
}
}
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/trace_buffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698