Skip to content
This repository
Browse code

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...
commit e19a71f508efceaf003c10edbde8e6cbc3f92c59 1 parent 295d07c
mstarzinger@chromium.org authored

Showing 2 changed files with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 1  build/common.gypi
  2. +3 4 src/global-handles.cc
2  build/common.gypi
@@ -401,7 +401,7 @@
401 401 }, # Debug
402 402 'Release': {
403 403 'variables': {
404   - 'v8_enable_extra_checks%': 1,
  404 + 'v8_enable_extra_checks%': 0,
405 405 },
406 406 'conditions': [
407 407 ['v8_enable_extra_checks==1', {
7 src/global-handles.cc
@@ -72,7 +72,7 @@ class GlobalHandles::Node {
72 72 Internals::kNodeIsPartiallyDependentShift);
73 73 }
74 74
75   -#ifdef DEBUG
  75 +#ifdef ENABLE_EXTRA_CHECKS
76 76 ~Node() {
77 77 // TODO(1428): if it's a weak handle we should have invoked its callback.
78 78 // Zap the values for eager trapping.
@@ -111,10 +111,9 @@ class GlobalHandles::Node {
111 111 void Release(GlobalHandles* global_handles) {
112 112 ASSERT(state() != FREE);
113 113 set_state(FREE);
114   - // TODO(mstarzinger): Put behind debug flag once embedders are stabilized.
115   - object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
116   -#ifdef DEBUG
  114 +#ifdef ENABLE_EXTRA_CHECKS
117 115 // Zap the values for eager trapping.
  116 + object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
118 117 class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId;
119 118 set_independent(false);
120 119 set_partially_dependent(false);

0 comments on commit e19a71f

Please sign in to comment.
Something went wrong with that request. Please try again.