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 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 js->PrintError(kFeatureDisabled, | 2513 js->PrintError(kFeatureDisabled, |
2514 "Cannot reload source when running an app snapshot."); | 2514 "Cannot reload source when running an app snapshot."); |
2515 return true; | 2515 return true; |
2516 } | 2516 } |
2517 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); | 2517 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
2518 if (handler == NULL) { | 2518 if (handler == NULL) { |
2519 js->PrintError(kFeatureDisabled, | 2519 js->PrintError(kFeatureDisabled, |
2520 "A library tag handler must be installed."); | 2520 "A library tag handler must be installed."); |
2521 return true; | 2521 return true; |
2522 } | 2522 } |
| 2523 if ((isolate->sticky_error() != Error::null()) || |
| 2524 (Thread::Current()->sticky_error() != Error::null())) { |
| 2525 js->PrintError(kIsolateReloadBarred, |
| 2526 "This isolate cannot reload sources anymore because there " |
| 2527 "was an unhandled exception error. Restart the isolate."); |
| 2528 return true; |
| 2529 } |
2523 if (isolate->IsReloading()) { | 2530 if (isolate->IsReloading()) { |
2524 js->PrintError(kIsolateIsReloading, | 2531 js->PrintError(kIsolateIsReloading, |
2525 "This isolate is being reloaded."); | 2532 "This isolate is being reloaded."); |
2526 return true; | 2533 return true; |
2527 } | 2534 } |
2528 if (!isolate->CanReload()) { | 2535 if (!isolate->CanReload()) { |
2529 js->PrintError(kFeatureDisabled, | 2536 js->PrintError(kFeatureDisabled, |
2530 "This isolate cannot reload sources right now."); | 2537 "This isolate cannot reload sources right now."); |
2531 return true; | 2538 return true; |
2532 } | 2539 } |
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4164 if (strcmp(method_name, method.name) == 0) { | 4171 if (strcmp(method_name, method.name) == 0) { |
4165 return &method; | 4172 return &method; |
4166 } | 4173 } |
4167 } | 4174 } |
4168 return NULL; | 4175 return NULL; |
4169 } | 4176 } |
4170 | 4177 |
4171 #endif // !PRODUCT | 4178 #endif // !PRODUCT |
4172 | 4179 |
4173 } // namespace dart | 4180 } // namespace dart |
OLD | NEW |