From: mstarzinger@chromium.org Date: Thu, 21 Mar 2013 14:18:16 +0000 (+0000) Subject: Disable zapping of global handles in release mode. X-Git-Tag: upstream/4.7.83~14781 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61d9399e8d312a5526338808d2c69db7afcc5d11;p=platform%2Fupstream%2Fv8.git Disable zapping of global handles in release mode. R=danno@chromium.org Review URL: https://codereview.chromium.org/12984006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/build/common.gypi b/build/common.gypi index 18aba68..a3c9ed0 100644 --- a/build/common.gypi +++ b/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', { diff --git a/src/global-handles.cc b/src/global-handles.cc index 14c00f1..cb3115a 100644 --- a/src/global-handles.cc +++ b/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(kGlobalHandleZapValue); -#ifdef DEBUG +#ifdef ENABLE_EXTRA_CHECKS // Zap the values for eager trapping. + object_ = reinterpret_cast(kGlobalHandleZapValue); class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId; set_independent(false); set_partially_dependent(false);