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

Side by Side Diff: tests/language/vm/unregistered_closure_in_finally_test.dart

Issue 3003253002: [vm, aot] Ensure fixups applied after the world has been compiled are applied to closures in finall… (Closed)
Patch Set: . Created 3 years, 3 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/runtime_entry.cc ('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
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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.
4 // VMOptions=--no-background-compilation --enable-inlining-annotations
5
6 const NeverInline = 'NeverInline';
7
8 @NeverInline
9 doSomething() {
10 print("Hello!");
11 }
12
13 @NeverInline
14 maybeThrow(bool doThrow) {
15 if (doThrow) {
16 throw new Exception();
17 }
18 }
19
20 @NeverInline
21 run(action) {
22 try { action(); } catch(e) {}
23 }
24
25 test(bool doThrow) {
26 try {
27 maybeThrow(doThrow);
28 } finally {
29 run(() {
30 doSomething(); // Should not crash here.
31 });
32 }
33 }
34
35 main() {
36 try { test(true); } catch(e) {}
37 try { test(false); } catch(e) {}
38 }
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698