Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index c8912eb48c240e41cc2a646e40a21cbc6536d69c..9d07e528f97b6a33385db001bc7645390aa13bac 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -2419,6 +2419,11 @@ static const MethodParameter* get_source_report_params[] = { |
static bool GetSourceReport(Thread* thread, JSONStream* js) { |
+ if (!thread->isolate()->compilation_allowed()) { |
+ js->PrintError(kFeatureDisabled, |
+ "Cannot get source report when running a precompiled program."); |
Cutch
2016/02/17 19:13:08
We only compile if "forceCompile" is set to true.
|
+ return true; |
+ } |
const char* reports_str = js->LookupParam("reports"); |
const EnumListParameter* reports_parameter = |
static_cast<const EnumListParameter*>(get_source_report_params[1]); |