| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/service.h" | 5 #include "vm/service.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2169 } | 2169 } |
| 2170 | 2170 |
| 2171 | 2171 |
| 2172 static bool HandleIsolateResume(Isolate* isolate, JSONStream* js) { | 2172 static bool HandleIsolateResume(Isolate* isolate, JSONStream* js) { |
| 2173 const char* step_param = js->LookupParam("step"); | 2173 const char* step_param = js->LookupParam("step"); |
| 2174 if (isolate->message_handler()->paused_on_start()) { | 2174 if (isolate->message_handler()->paused_on_start()) { |
| 2175 isolate->message_handler()->set_pause_on_start(false); | 2175 isolate->message_handler()->set_pause_on_start(false); |
| 2176 JSONObject jsobj(js); | 2176 JSONObject jsobj(js); |
| 2177 jsobj.AddProperty("type", "Success"); | 2177 jsobj.AddProperty("type", "Success"); |
| 2178 jsobj.AddProperty("id", ""); | 2178 jsobj.AddProperty("id", ""); |
| 2179 { |
| 2180 DebuggerEvent resumeEvent(isolate, DebuggerEvent::kIsolateResumed); |
| 2181 Service::HandleDebuggerEvent(&resumeEvent); |
| 2182 } |
| 2179 return true; | 2183 return true; |
| 2180 } | 2184 } |
| 2181 if (isolate->message_handler()->paused_on_exit()) { | 2185 if (isolate->message_handler()->paused_on_exit()) { |
| 2182 isolate->message_handler()->set_pause_on_exit(false); | 2186 isolate->message_handler()->set_pause_on_exit(false); |
| 2183 JSONObject jsobj(js); | 2187 JSONObject jsobj(js); |
| 2184 jsobj.AddProperty("type", "Success"); | 2188 jsobj.AddProperty("type", "Success"); |
| 2185 jsobj.AddProperty("id", ""); | 2189 jsobj.AddProperty("id", ""); |
| 2190 // We don't send a resume event because we will be exiting. |
| 2186 return true; | 2191 return true; |
| 2187 } | 2192 } |
| 2188 if (isolate->debugger()->PauseEvent() != NULL) { | 2193 if (isolate->debugger()->PauseEvent() != NULL) { |
| 2189 if (step_param != NULL) { | 2194 if (step_param != NULL) { |
| 2190 if (strcmp(step_param, "into") == 0) { | 2195 if (strcmp(step_param, "into") == 0) { |
| 2191 isolate->debugger()->SetSingleStep(); | 2196 isolate->debugger()->SetSingleStep(); |
| 2192 } else if (strcmp(step_param, "over") == 0) { | 2197 } else if (strcmp(step_param, "over") == 0) { |
| 2193 isolate->debugger()->SetStepOver(); | 2198 isolate->debugger()->SetStepOver(); |
| 2194 } else if (strcmp(step_param, "out") == 0) { | 2199 } else if (strcmp(step_param, "out") == 0) { |
| 2195 isolate->debugger()->SetStepOut(); | 2200 isolate->debugger()->SetStepOut(); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2858 while (current != NULL) { | 2863 while (current != NULL) { |
| 2859 if (strcmp(name, current->name()) == 0) { | 2864 if (strcmp(name, current->name()) == 0) { |
| 2860 return current; | 2865 return current; |
| 2861 } | 2866 } |
| 2862 current = current->next(); | 2867 current = current->next(); |
| 2863 } | 2868 } |
| 2864 return NULL; | 2869 return NULL; |
| 2865 } | 2870 } |
| 2866 | 2871 |
| 2867 } // namespace dart | 2872 } // namespace dart |
| OLD | NEW |