Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
index 8eace1268481c1011607548a610c37f1a31625f6..e54765d0346261b6be3241d74651522318482842 100644 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -1385,15 +1385,8 @@ class SaveContext BASE_EMBEDDED { |
inline explicit SaveContext(Isolate* isolate); |
~SaveContext() { |
- if (context_.is_null()) { |
- Isolate* isolate = Isolate::Current(); |
- isolate->set_context(NULL); |
- isolate->set_save_context(prev_); |
- } else { |
- Isolate* isolate = context_->GetIsolate(); |
- isolate->set_context(*context_); |
- isolate->set_save_context(prev_); |
- } |
+ isolate_->set_context(context_.is_null() ? NULL : *context_); |
+ isolate_->set_save_context(prev_); |
} |
Handle<Context> context() { return context_; } |
@@ -1405,6 +1398,7 @@ class SaveContext BASE_EMBEDDED { |
} |
private: |
+ Isolate* isolate_; |
Handle<Context> context_; |
SaveContext* prev_; |
Address c_entry_fp_; |