Chromium Code Reviews| Index: vm/unit_test.h |
| =================================================================== |
| --- vm/unit_test.h (revision 1129) |
| +++ vm/unit_test.h (working copy) |
| @@ -12,6 +12,7 @@ |
| #include "vm/globals.h" |
| #include "vm/heap.h" |
| #include "vm/isolate.h" |
| +#include "vm/longjump.h" |
| #include "vm/object.h" |
| #include "vm/object_store.h" |
| #include "vm/zone.h" |
| @@ -172,7 +173,17 @@ |
| class TestIsolateScope { |
| public: |
| TestIsolateScope() { |
| - isolate_ = Dart::CreateIsolate(NULL, NULL); |
| + isolate_ = Dart::CreateIsolate(); |
|
Ivan Posva
2011/11/04 17:24:42
Why not just use the Dart_CreateIsolate call here
siva
2011/11/04 22:01:57
Good point, simplifies stuff a lot.
On 2011/11/04
|
| + LongJump jump; |
| + isolate_->set_long_jump_base(&jump); |
| + if (setjmp(*jump.Set()) == 0) { |
| + Dart::InitializeIsolate(NULL, NULL); |
| + isolate_->set_long_jump_base(NULL); |
| + } else { |
| + Dart::ShutdownIsolate(); |
| + isolate_ = NULL; |
| + EXPECT(false); // The test fails here. |
| + } |
| Dart_EnterScope(); // Create a Dart API scope for unit tests. |
| } |
| ~TestIsolateScope() { |