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

Unified Diff: tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart

Issue 2374273002: Fix a throw returning to a frame marked for lazy deopt that captures the stacktrace. (Closed)
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart
diff --git a/tests/language/vm/lazy_deopt_with_exception_test.dart b/tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart
similarity index 79%
copy from tests/language/vm/lazy_deopt_with_exception_test.dart
copy to tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart
index a4943661bb63d035d61dfd6e7fc267ea1ad46d65..f67845a2ae7dbc577999de7233afc3931268eff8 100644
--- a/tests/language/vm/lazy_deopt_with_exception_test.dart
+++ b/tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart
@@ -28,7 +28,10 @@ AA(C c, bool b) {
T1(C c, bool b) {
try {
AA(c, b);
- } on dynamic {
+ } on dynamic catch (e, st) {
+ print(e);
+ print(st);
+ Expect.isTrue(st is StackTrace, "is StackTrace");
}
return c.x + 1;
}
@@ -38,12 +41,17 @@ T1(C c, bool b) {
T2(C c, bool b) {
try {
AA(c, b);
- } on String {
+ } on String catch(e, st) {
+ print(e);
+ print(st);
+ Expect.isTrue(st is StackTrace, "is StackTrace");
Expect.isTrue(false);
- } on int catch(e) {
+ } on int catch(e, st) {
Expect.equals(e, 123);
Expect.equals(b, true);
Expect.equals(c.x, 2.5);
+ print(st);
+ Expect.isTrue(st is StackTrace, "is StackTrace");
}
return c.x + 1;
}
@@ -60,5 +68,3 @@ main() {
Expect.equals(3.5, T1(c, true));
Expect.equals(3.5, T2(c, true));
}
-
-
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698