Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: src/global-handles.cc

Issue 7044007: Assert that independent handles do not participate in grouping. (Closed)
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 250f1276494c532d6f8834cb867ffeeed10b2bc5..e4bbc9582e6d33e755e67a352c1d9679241ad394 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<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));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698