Commit 35211e95 authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

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
parent b7e685ff
......@@ -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<Object**>(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));
}
......
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