Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: runtime/vm/service.cc

Issue 2278613002: Do not allow a hot reload if the isolate has a sticky error (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Do not allow a hot reload if the isolate has a sticky error Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/json_stream.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698