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

Unified Diff: runtime/vm/exceptions.cc

Issue 36323003: - Ensure that the token stream from generated source matches the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 28974)
+++ runtime/vm/exceptions.cc (working copy)
@@ -505,8 +505,13 @@
DartFrameIterator iterator;
const Script& script = Script::Handle(GetCallerScript(&iterator));
- intptr_t line, column;
- script.GetTokenLocation(location, &line, &column);
+ intptr_t line;
+ intptr_t column = -1;
+ if (script.HasSource()) {
+ script.GetTokenLocation(location, &line, &column);
+ } else {
+ script.GetTokenLocation(location, &line, NULL);
+ }
// Initialize '_url', '_line', and '_column' arguments.
args.SetAt(0, String::Handle(script.url()));
args.SetAt(1, Smi::Handle(Smi::New(line)));
@@ -524,8 +529,6 @@
if (!bound_error.IsNull()) {
OS::Print("%s\n", bound_error.ToCString());
}
- intptr_t line, column;
- script.GetTokenLocation(location, &line, &column);
OS::Print("'%s': Failed type check: line %" Pd " pos %" Pd ": ",
String::Handle(script.url()).ToCString(), line, column);
if (!dst_name.IsNull() && (dst_name.Length() > 0)) {
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698