Add zapping of disposed persistent handles.

R=svenpanne@chromium.org
BUG=chromium:176056

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 71a26c92
......@@ -113,6 +113,15 @@ class GlobalHandles::Node {
void Release(GlobalHandles* global_handles) {
ASSERT(state() != FREE);
set_state(FREE);
#ifdef DEBUG
// Zap the values for eager trapping.
object_ = NULL;
class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId;
set_independent(false);
set_partially_dependent(false);
weak_reference_callback_ = NULL;
near_death_callback_ = NULL;
#endif
parameter_or_next_free_.next_free = global_handles->first_free_;
global_handles->first_free_ = this;
DecreaseBlockUses(global_handles);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment