Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index e209d3b89865c6a7a2c6bd967e984db8f8c6e3c2..ccc5309e1fdf30083f898bffe19852b472797791 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -1339,12 +1339,13 @@ static const MethodParameter* get_stack_params[] = { |
static bool GetStack(Thread* thread, JSONStream* js) { |
- if (!thread->isolate()->compilation_allowed()) { |
+ Isolate* isolate = thread->isolate(); |
+ if (isolate->debugger() == NULL) { |
js->PrintError(kFeatureDisabled, |
- "Cannot get stack when running a precompiled program."); |
+ "Cannot get stack when debugger disabled."); |
return true; |
} |
- Isolate* isolate = thread->isolate(); |
+ ASSERT(isolate->compilation_allowed()); |
DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); |
// Do we want the complete script object and complete local variable objects? |
// This is true for dump requests. |