Skip to content

Commit

Permalink
Disable zapping of global handles in release mode.
Browse files Browse the repository at this point in the history
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
mstarzinger@chromium.org committed Mar 21, 2013
1 parent 295d07c commit e19a71f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/common.gypi
Expand Up @@ -401,7 +401,7 @@
}, # Debug
'Release': {
'variables': {
'v8_enable_extra_checks%': 1,
'v8_enable_extra_checks%': 0,
},
'conditions': [
['v8_enable_extra_checks==1', {
Expand Down
7 changes: 3 additions & 4 deletions src/global-handles.cc
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e19a71f

Please sign in to comment.