| Index: src/isolate.h
|
| diff --git a/src/isolate.h b/src/isolate.h
|
| index 99283c9238683d1b09fcbbcf8e6178e4c9fb45cf..b826ec596abaa1225b66f4b8ff926e5726b6ddbe 100644
|
| --- a/src/isolate.h
|
| +++ b/src/isolate.h
|
| @@ -1426,12 +1426,15 @@ class SaveContext BASE_EMBEDDED {
|
| class AssertNoContextChange BASE_EMBEDDED {
|
| #ifdef DEBUG
|
| public:
|
| - AssertNoContextChange() : context_(Isolate::Current()->context()) { }
|
| + AssertNoContextChange()
|
| + : isolate_(Isolate::Current()),
|
| + context_(isolate_->context()) { }
|
| ~AssertNoContextChange() {
|
| - ASSERT(Isolate::Current()->context() == *context_);
|
| + ASSERT(isolate_->context() == *context_);
|
| }
|
|
|
| private:
|
| + Isolate* isolate_;
|
| Handle<Context> context_;
|
| #else
|
| public:
|
| @@ -1445,15 +1448,17 @@ class AssertNoContextChangeWithHandleScope BASE_EMBEDDED {
|
| #ifdef DEBUG
|
| public:
|
| AssertNoContextChangeWithHandleScope() :
|
| - scope_(Isolate::Current()),
|
| - context_(Isolate::Current()->context(), Isolate::Current()) {
|
| + isolate_(Isolate::Current()),
|
| + scope_(isolate_),
|
| + context_(isolate_->context(), isolate_) {
|
| }
|
|
|
| ~AssertNoContextChangeWithHandleScope() {
|
| - ASSERT(Isolate::Current()->context() == *context_);
|
| + ASSERT(isolate_->context() == *context_);
|
| }
|
|
|
| private:
|
| + Isolate* isolate_;
|
| HandleScope scope_;
|
| Handle<Context> context_;
|
| #else
|
|
|