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

Unified Diff: runtime/vm/exceptions.cc

Issue 2517953002: Revert "Merge of source position information from kernel-sdk." (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698