From: vitalyr@chromium.org Date: Wed, 18 May 2011 15:28:43 +0000 (+0000) Subject: Assert that independent handles do not participate in grouping. X-Git-Tag: upstream/4.7.83~19376 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35211e959e2b19d4d46f71bfdc15151e371f99ef;p=platform%2Fupstream%2Fv8.git Assert that independent handles do not participate in grouping. Review URL: http://codereview.chromium.org/7044007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/global-handles.cc b/src/global-handles.cc index 250f127..e4bbc95 100644 --- a/src/global-handles.cc +++ b/src/global-handles.cc @@ -619,6 +619,11 @@ void GlobalHandles::Print() { void GlobalHandles::AddObjectGroup(Object*** handles, size_t length, v8::RetainedObjectInfo* info) { +#ifdef DEBUG + for (size_t i = 0; i < length; ++i) { + ASSERT(!Node::FromLocation(handles[i])->independent_); + } +#endif if (length == 0) { if (info != NULL) info->Dispose(); return; @@ -630,6 +635,12 @@ void GlobalHandles::AddObjectGroup(Object*** handles, void GlobalHandles::AddImplicitReferences(HeapObject** parent, Object*** children, size_t length) { +#ifdef DEBUG + ASSERT(!Node::FromLocation(BitCast(parent))->independent_); + for (size_t i = 0; i < length; ++i) { + ASSERT(!Node::FromLocation(children[i])->independent_); + } +#endif if (length == 0) return; implicit_ref_groups_.Add(ImplicitRefGroup::New(parent, children, length)); }