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

Unified Diff: dart/runtime/vm/longjump.h

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/vm/json_stream.cc ('k') | dart/runtime/vm/longjump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/longjump.h
===================================================================
--- dart/runtime/vm/longjump.h (revision 31530)
+++ dart/runtime/vm/longjump.h (working copy)
@@ -8,15 +8,25 @@
#include <setjmp.h>
#include "vm/allocation.h"
+#include "vm/isolate.h"
namespace dart {
class Error;
-class LongJump : public ValueObject {
+class LongJumpScope : public StackResource {
public:
- LongJump() : top_(NULL) { }
+ LongJumpScope()
+ : StackResource(Isolate::Current()),
+ top_(NULL),
+ base_(Isolate::Current()->long_jump_base()) {
+ Isolate::Current()->set_long_jump_base(this);
+ }
+ ~LongJumpScope() {
+ Isolate::Current()->set_long_jump_base(base_);
+ }
+
jmp_buf* Set();
void Jump(int value, const Error& error);
@@ -28,8 +38,9 @@
private:
jmp_buf environment_;
StackResource* top_;
+ LongJumpScope* base_;
- DISALLOW_COPY_AND_ASSIGN(LongJump);
+ DISALLOW_COPY_AND_ASSIGN(LongJumpScope);
};
} // namespace dart
« no previous file with comments | « dart/runtime/vm/json_stream.cc ('k') | dart/runtime/vm/longjump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698