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

Unified Diff: src/vm-state-inl.h

Issue 2840018: [Isolates] Moved more compilation-related globals (builtins, runtime, &c.)... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: rebase Created 10 years, 6 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
« src/runtime.h ('K') | « src/vm-state.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm-state-inl.h
===================================================================
--- src/vm-state-inl.h (revision 4955)
+++ src/vm-state-inl.h (working copy)
@@ -58,7 +58,8 @@
VMState::VMState(StateTag state)
: disabled_(true),
state_(OTHER),
- external_callback_(NULL) {
+ external_callback_(NULL),
+ isolate_(Isolate::Current()) {
#ifdef ENABLE_LOGGING_AND_PROFILING
if (!LOGGER->is_logging() && !CpuProfiler::is_profiling()) {
return;
@@ -74,8 +75,8 @@
if (state == EXTERNAL) state = OTHER;
#endif
state_ = state;
- previous_ = current_state_; // Save the previous state.
- current_state_ = this; // Install the new state.
+ previous_ = isolate_->vm_state(); // Save the previous state.
+ isolate_->set_vm_state(this); // Install the new state.
#ifdef ENABLE_LOGGING_AND_PROFILING
if (FLAG_log_state_changes) {
@@ -102,8 +103,9 @@
VMState::~VMState() {
+ ASSERT(isolate_ == Isolate::Current());
if (disabled_) return;
- current_state_ = previous_; // Return to the previous state.
+ isolate_->set_vm_state(previous_); // Return to the previous state.
#ifdef ENABLE_LOGGING_AND_PROFILING
if (FLAG_log_state_changes) {
« src/runtime.h ('K') | « src/vm-state.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698