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

Unified Diff: vm/unit_test.h

Issue 8334031: - Fix the snapshot generation python script to return an error code when snapshot generation fail... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years, 1 month 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
« vm/dart_api_impl.cc ('K') | « vm/port_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« vm/dart_api_impl.cc ('K') | « vm/port_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698