Reviewers: Mads Ager,

Description:
Fix debug builds.

[email protected]

Please review this at http://codereview.chromium.org/1572029/show

Affected files:
  M src/log.cc
  M src/vm-state.h


Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 8aefe989573fa325d7178afbf1a2aa69ab0ba7b4..34c9633ef4b700a1bdcb24e894e1df43c5bb1a43 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -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);

Index: src/vm-state.h
diff --git a/src/vm-state.h b/src/vm-state.h
index a188c5d2f830a7143fc51447a989735b5f3989fa..241df4c9d48cbb36ce5f84378f7594ab831cbc5c 100644
--- a/src/vm-state.h
+++ b/src/vm-state.h
@@ -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;
   }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

To unsubscribe, reply using "remove me" as the subject.

Reply via email to