| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library dartino.vm_session; | 5 library dartino.vm_session; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'dart:typed_data' show | 9 import 'dart:typed_data' show |
| 10 ByteData; | 10 ByteData; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 case VmCommandCode.ProcessCompileTimeError: | 469 case VmCommandCode.ProcessCompileTimeError: |
| 470 interactiveExitCode = exit_codes.DART_VM_EXITCODE_COMPILE_TIME_ERROR; | 470 interactiveExitCode = exit_codes.DART_VM_EXITCODE_COMPILE_TIME_ERROR; |
| 471 running = false; | 471 running = false; |
| 472 break; | 472 break; |
| 473 | 473 |
| 474 case VmCommandCode.ProcessTerminated: | 474 case VmCommandCode.ProcessTerminated: |
| 475 interactiveExitCode = 0; | 475 interactiveExitCode = 0; |
| 476 running = false; | 476 running = false; |
| 477 loaded = false; | 477 loaded = false; |
| 478 // TODO(ahe): Let the caller terminate the session. See issue 67. | 478 terminated = true; |
| 479 await terminate(); | |
| 480 break; | 479 break; |
| 481 | 480 |
| 482 case VmCommandCode.ConnectionError: | 481 case VmCommandCode.ConnectionError: |
| 483 interactiveExitCode = exit_codes.COMPILER_EXITCODE_CONNECTION_ERROR; | 482 interactiveExitCode = exit_codes.COMPILER_EXITCODE_CONNECTION_ERROR; |
| 484 running = false; | 483 running = false; |
| 485 loaded = false; | 484 loaded = false; |
| 486 await shutdown(); | 485 await shutdown(); |
| 487 terminated = true; | 486 terminated = true; |
| 488 break; | 487 break; |
| 489 | 488 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 } | 980 } |
| 982 | 981 |
| 983 bool toggleInternal() { | 982 bool toggleInternal() { |
| 984 debugState.showInternalFrames = !debugState.showInternalFrames; | 983 debugState.showInternalFrames = !debugState.showInternalFrames; |
| 985 if (debugState.currentBackTrace != null) { | 984 if (debugState.currentBackTrace != null) { |
| 986 debugState.currentBackTrace.visibilityChanged(); | 985 debugState.currentBackTrace.visibilityChanged(); |
| 987 } | 986 } |
| 988 return debugState.showInternalFrames; | 987 return debugState.showInternalFrames; |
| 989 } | 988 } |
| 990 } | 989 } |
| OLD | NEW |