Browse files

Disable zapping of global handles in release mode.

R=danno@chromium.org

Review URL: https://codereview.chromium.org/12984006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@14028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information...
1 parent 295d07c commit e19a71f508efceaf003c10edbde8e6cbc3f92c59 mstarzinger@chromium.org committed Mar 21, 2013
Showing with 4 additions and 5 deletions.
  1. +1 −1 build/common.gypi
  2. +3 −4 src/global-handles.cc
View
2 build/common.gypi
@@ -401,7 +401,7 @@
}, # Debug
'Release': {
'variables': {
- 'v8_enable_extra_checks%': 1,
+ 'v8_enable_extra_checks%': 0,
},
'conditions': [
['v8_enable_extra_checks==1', {
View
7 src/global-handles.cc
@@ -72,7 +72,7 @@ class GlobalHandles::Node {
Internals::kNodeIsPartiallyDependentShift);
}
-#ifdef DEBUG
+#ifdef ENABLE_EXTRA_CHECKS
~Node() {
// TODO(1428): if it's a weak handle we should have invoked its callback.
// Zap the values for eager trapping.
@@ -111,10 +111,9 @@ class GlobalHandles::Node {
void Release(GlobalHandles* global_handles) {
ASSERT(state() != FREE);
set_state(FREE);
- // TODO(mstarzinger): Put behind debug flag once embedders are stabilized.
- object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
-#ifdef DEBUG
+#ifdef ENABLE_EXTRA_CHECKS
// Zap the values for eager trapping.
+ object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId;
set_independent(false);
set_partially_dependent(false);

0 comments on commit e19a71f

Please sign in to comment.