| 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 "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 | 10 |
| (...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 isolate->set_should_pause_post_service_request( | 2536 isolate->set_should_pause_post_service_request( |
| 2537 BoolParameter::Parse(stream->LookupParam("pause"), false)); | 2537 BoolParameter::Parse(stream->LookupParam("pause"), false)); |
| 2538 } | 2538 } |
| 2539 | 2539 |
| 2540 | 2540 |
| 2541 RawError* Service::MaybePause(Isolate* isolate, const Error& error) { | 2541 RawError* Service::MaybePause(Isolate* isolate, const Error& error) { |
| 2542 // Don't pause twice. | 2542 // Don't pause twice. |
| 2543 if (!isolate->IsPaused()) { | 2543 if (!isolate->IsPaused()) { |
| 2544 if (isolate->should_pause_post_service_request()) { | 2544 if (isolate->should_pause_post_service_request()) { |
| 2545 isolate->set_should_pause_post_service_request(false); | 2545 isolate->set_should_pause_post_service_request(false); |
| 2546 // Before pausing, restore the sticky error. The debugger will return it | 2546 if (!error.IsNull()) { |
| 2547 // from PausePostRequest. | 2547 // Before pausing, restore the sticky error. The debugger will return it |
| 2548 Thread::Current()->set_sticky_error(error); | 2548 // from PausePostRequest. |
| 2549 Thread::Current()->set_sticky_error(error); |
| 2550 } |
| 2549 return isolate->PausePostRequest(); | 2551 return isolate->PausePostRequest(); |
| 2550 } | 2552 } |
| 2551 } | 2553 } |
| 2552 return error.raw(); | 2554 return error.raw(); |
| 2553 } | 2555 } |
| 2554 | 2556 |
| 2555 | 2557 |
| 2556 static bool AddBreakpointCommon(Thread* thread, | 2558 static bool AddBreakpointCommon(Thread* thread, |
| 2557 JSONStream* js, | 2559 JSONStream* js, |
| 2558 const String& script_uri) { | 2560 const String& script_uri) { |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4166 if (strcmp(method_name, method.name) == 0) { | 4168 if (strcmp(method_name, method.name) == 0) { |
| 4167 return &method; | 4169 return &method; |
| 4168 } | 4170 } |
| 4169 } | 4171 } |
| 4170 return NULL; | 4172 return NULL; |
| 4171 } | 4173 } |
| 4172 | 4174 |
| 4173 #endif // !PRODUCT | 4175 #endif // !PRODUCT |
| 4174 | 4176 |
| 4175 } // namespace dart | 4177 } // namespace dart |
| OLD | NEW |