| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 import 'dart:developer'; | 6 import 'dart:developer'; |
| 7 import 'package:observatory/service_io.dart'; | 7 import 'package:observatory/service_io.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 import 'service_test_common.dart'; | 9 import 'service_test_common.dart'; |
| 10 import 'test_helper.dart'; | 10 import 'test_helper.dart'; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Rewind the top stack frame. | 62 // Rewind the top stack frame. |
| 63 bool caughtException; | 63 bool caughtException; |
| 64 try { | 64 try { |
| 65 result = await isolate.rewind(1); | 65 result = await isolate.rewind(1); |
| 66 expect(false, isTrue, reason:'Unreachable'); | 66 expect(false, isTrue, reason:'Unreachable'); |
| 67 } on ServerRpcException catch(e) { | 67 } on ServerRpcException catch(e) { |
| 68 caughtException = true; | 68 caughtException = true; |
| 69 expect(e.code, equals(ServerRpcException.kCannotResume)); | 69 expect(e.code, equals(ServerRpcException.kCannotResume)); |
| 70 expect(e.message, | 70 expect(e.message, |
| 71 'Cannot rewind to frame 1 due to conflicting compiler ' | 71 startsWith('Cannot rewind to frame 1 due to conflicting compiler ' |
| 72 'optimizations. Run the vm with --no-prune-dead-locals to ' | 72 'optimizations. Run the vm with --no-prune-dead-locals ' |
| 73 'disallow these optimizations. Next valid rewind frame is 4.'); | 73 'to disallow these optimizations. Next valid rewind ' |
| 74 'frame is ')); |
| 74 } | 75 } |
| 75 expect(caughtException, isTrue); | 76 expect(caughtException, isTrue); |
| 76 }, | 77 }, |
| 77 ]; | 78 ]; |
| 78 | 79 |
| 79 | 80 |
| 80 main(args) => runIsolateTests(args, tests, testeeConcurrent: test, | 81 main(args) => runIsolateTests(args, tests, testeeConcurrent: test, |
| 81 extraArgs: | 82 extraArgs: |
| 82 ['--trace-rewind', | 83 ['--trace-rewind', |
| 83 '--prune-dead-locals', | 84 '--prune-dead-locals', |
| 84 '--enable-inlining-annotations', | 85 '--enable-inlining-annotations', |
| 85 '--no-background-compilation', | 86 '--no-background-compilation', |
| 86 '--optimization-counter-threshold=10']); | 87 '--optimization-counter-threshold=10']); |
| OLD | NEW |