Index: runtime/vm/exceptions.cc |
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc |
index 537b97fdaddd00c4714544c3fbb9cb5d91779342..db0d71024c035b5a7a612f799750706c28f8e0f1 100644 |
--- a/runtime/vm/exceptions.cc |
+++ b/runtime/vm/exceptions.cc |
@@ -506,11 +506,12 @@ void Exceptions::CreateAndThrowTypeError(TokenPosition location, |
DartFrameIterator iterator; |
const Script& script = Script::Handle(zone, GetCallerScript(&iterator)); |
- intptr_t line = -1; |
+ intptr_t line; |
intptr_t column = -1; |
- ASSERT(!script.IsNull()); |
- if (location.IsReal()) { |
+ 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(zone, script.url())); |