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

Unified Diff: runtime/vm/longjump.h

Issue 108383007: Replaces LongJump with LongJumpScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 12 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/isolate.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/longjump.h
===================================================================
--- runtime/vm/longjump.h (revision 31435)
+++ 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 | « runtime/vm/isolate.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698