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

Unified Diff: runtime/vm/source_report.cc

Issue 1562993003: Add the forceCompile param to _getSourceReport. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review Created 4 years, 11 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/service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/source_report.cc
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 4da21b6e8a350f7cbe4fc5e918b271d8af71d95c..8c08726353de2cbbd98bd5fc0ee493a12c143f9e 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -244,6 +244,15 @@ void SourceReport::VisitFunction(JSONArray* jsarr, const Function& func) {
}
ASSERT(!code.IsNull());
+ // We skip compiled async functions. Once an async function has
+ // been compiled, there is another function with the same range which
+ // actually contains the user code.
+ if (func.IsAsyncFunction() ||
+ func.IsAsyncGenerator() ||
+ func.IsSyncGenerator()) {
+ return;
+ }
+
JSONObject range(jsarr);
range.AddProperty("scriptIndex", GetScriptIndex(script));
range.AddProperty("startPos", begin_pos);
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698