Fix debug builds.

TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/1572029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mikhail.naganov@gmail.com 2010-04-08 14:00:51 +00:00
parent d265cc8e9b
commit a6e6131bf7
2 changed files with 6 additions and 1 deletions

View File

@ -1478,7 +1478,7 @@ bool Logger::Setup() {
}
}
ASSERT(VMState::current_state_ == NULL); // NULL implies outermost external.
ASSERT(VMState::is_outermost_external());
ticker_ = new Ticker(kSamplingIntervalMs);

View File

@ -42,6 +42,11 @@ class VMState BASE_EMBEDDED {
external_callback_ = external_callback;
}
// Used for debug asserts.
static bool is_outermost_external() {
return current_state_ == NULL;
}
static StateTag current_state() {
return current_state_ ? current_state_->state() : EXTERNAL;
}