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

Unified Diff: dart/runtime/vm/allocation_test.cc

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « dart/runtime/tools/gyp/runtime_configurations_android.gypi ('k') | dart/runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/allocation_test.cc
===================================================================
--- dart/runtime/vm/allocation_test.cc (revision 31530)
+++ dart/runtime/vm/allocation_test.cc (working copy)
@@ -84,7 +84,7 @@
}
-static void StackAllocatedLongJumpHelper(int* ptr, LongJump* jump) {
+static void StackAllocatedLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestValueObject stacked(ptr);
EXPECT_EQ(2, *ptr);
*ptr = 3;
@@ -97,7 +97,7 @@
TEST_CASE(StackAllocatedLongJump) {
- LongJump jump;
+ LongJumpScope jump;
int data = 1;
if (setjmp(*jump.Set()) == 0) {
StackAllocatedLongJumpHelper(&data, &jump);
@@ -131,7 +131,7 @@
}
-static void StackedStackResourceLongJumpHelper(int* ptr, LongJump* jump) {
+static void StackedStackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestStackedStackResource stacked(ptr);
EXPECT_EQ(4, *ptr);
*ptr = 5;
@@ -143,7 +143,7 @@
}
-static void StackResourceLongJumpHelper(int* ptr, LongJump* jump) {
+static void StackResourceLongJumpHelper(int* ptr, LongJumpScope* jump) {
TestStackResource stacked(ptr);
EXPECT_EQ(2, *ptr);
*ptr = 3;
@@ -153,13 +153,17 @@
TEST_CASE(StackResourceLongJump) {
- LongJump jump;
- int data = 1;
- if (setjmp(*jump.Set()) == 0) {
- StackResourceLongJumpHelper(&data, &jump);
- UNREACHABLE();
+ LongJumpScope* base = Isolate::Current()->long_jump_base();
+ {
+ LongJumpScope jump;
+ int data = 1;
+ if (setjmp(*jump.Set()) == 0) {
+ StackResourceLongJumpHelper(&data, &jump);
+ UNREACHABLE();
+ }
+ EXPECT_EQ(7, data);
}
- EXPECT_EQ(7, data);
+ ASSERT(base == Isolate::Current()->long_jump_base());
}
} // namespace dart
« no previous file with comments | « dart/runtime/tools/gyp/runtime_configurations_android.gypi ('k') | dart/runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698