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

Unified Diff: runtime/vm/object.cc

Issue 1835633002: Precompilation: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 9 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
« no previous file with comments | « runtime/vm/dart.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index da8cf2272707c27819a0d17f1b3d5fe2001a5eb0..57372ea17018be2dcbda507b92a8945e1247c828 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -3340,6 +3340,10 @@ TokenPosition Class::ComputeEndTokenPos() const {
const Script& scr = Script::Handle(script());
ASSERT(!scr.IsNull());
const TokenStream& tkns = TokenStream::Handle(scr.tokens());
+ if (tkns.IsNull()) {
+ ASSERT(Dart::IsRunningPrecompiledCode());
+ return TokenPosition::kNoSource;
+ }
TokenStream::Iterator tkit(tkns,
token_pos(),
TokenStream::Iterator::kNoNewlines);
« no previous file with comments | « runtime/vm/dart.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698