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

Unified Diff: src/isolate.h

Issue 23494046: some random isolate threading (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/checks.cc ('k') | src/jsregexp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/checks.cc ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698