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

Unified Diff: runtime/vm/object_store.cc

Issue 9314053: Revert Dart_PropagateError until I can track down the problems in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
===================================================================
--- runtime/vm/object_store.cc (revision 3821)
+++ runtime/vm/object_store.cc (working copy)
@@ -6,6 +6,7 @@
#include "vm/exceptions.h"
#include "vm/isolate.h"
+#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/raw_object.h"
#include "vm/visitor.h"
@@ -79,26 +80,23 @@
if (preallocate_objects_called_) {
return true;
}
+
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL && isolate->object_store() == this);
- GrowableArray<const Object*> args;
- Object& result = Object::Handle();
- Instance& exception = Instance::Handle();
-
- result = Exceptions::Create(Exceptions::kStackOverflow, args);
- if (result.IsError()) {
+ LongJump* base = isolate->long_jump_base();
+ LongJump jump;
+ isolate->set_long_jump_base(&jump);
+ if (setjmp(*jump.Set()) == 0) {
+ GrowableArray<const Object*> args;
+ Instance& exception =Instance::Handle();
+ exception = Exceptions::Create(Exceptions::kStackOverflow, args);
+ set_stack_overflow(exception);
+ exception = Exceptions::Create(Exceptions::kOutOfMemory, args);
+ set_out_of_memory(exception);
+ } else {
return false;
}
- exception ^= result.raw();
- set_stack_overflow(exception);
-
- result = Exceptions::Create(Exceptions::kOutOfMemory, args);
- if (result.IsError()) {
- return false;
- }
- exception ^= result.raw();
- set_out_of_memory(exception);
-
+ isolate->set_long_jump_base(base);
preallocate_objects_called_ = true;
return true;
}
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698