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

Unified Diff: runtime/vm/service.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/observatory/tests/service/get_source_report_test.dart ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 35be737034cc8e4dad41d78a6a61baa1475a0c90..631a4ec96c50da5bf7d08b7cfbaf82452cc168be 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2332,6 +2332,7 @@ static const MethodParameter* get_source_report_params[] = {
new IdParameter("scriptId", false),
new UIntParameter("tokenPos", false),
new UIntParameter("endTokenPos", false),
+ new BoolParameter("forceCompile", false),
NULL,
};
@@ -2349,6 +2350,11 @@ static bool GetSourceReport(Thread* thread, JSONStream* js) {
reports++;
}
+ SourceReport::CompileMode compile_mode = SourceReport::kNoCompile;
+ if (BoolParameter::Parse(js->LookupParam("forceCompile"), false)) {
+ compile_mode = SourceReport::kForceCompile;
+ }
+
Script& script = Script::Handle();
intptr_t start_pos = UIntParameter::Parse(js->LookupParam("tokenPos"));
intptr_t end_pos = UIntParameter::Parse(js->LookupParam("endTokenPos"));
@@ -2379,7 +2385,7 @@ static bool GetSourceReport(Thread* thread, JSONStream* js) {
return true;
}
}
- SourceReport report(report_set);
+ SourceReport report(report_set, compile_mode);
report.PrintJSON(js, script, start_pos, end_pos);
return true;
}
« no previous file with comments | « runtime/observatory/tests/service/get_source_report_test.dart ('k') | runtime/vm/source_report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698