Chromium Code Reviews| Index: runtime/vm/service.cc |
| diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
| index 35be737034cc8e4dad41d78a6a61baa1475a0c90..2bd4b1cfdeed34c918853b77839b37e843b900c3 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,12 @@ static bool GetSourceReport(Thread* thread, JSONStream* js) { |
| reports++; |
| } |
| + SourceReport::CompileMode compile_mode = SourceReport::kNoCompile; |
| + if (js->HasParam("forceCompile") && |
|
Cutch
2016/01/06 21:43:45
if (BoolParameter::Parse(js->LookupParam("forceCom
turnidge
2016/01/07 19:25:17
Done.
|
| + strcmp(js->LookupParam("forceCompile"), "true") == 0) { |
| + 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 +2386,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; |
| } |