Index: src/global-handles.h |
diff --git a/src/global-handles.h b/src/global-handles.h |
index 37b2b44522e55ea628a433f8546b5a5fd6e8da74..2740eb008010256a988e6f4ad6735d88c37f912d 100644 |
--- a/src/global-handles.h |
+++ b/src/global-handles.h |
@@ -48,10 +48,13 @@ namespace internal { |
class ObjectGroup : public Malloced { |
public: |
ObjectGroup() : objects_(4) {} |
- explicit ObjectGroup(size_t capacity) |
- : objects_(static_cast<int>(capacity)) { } |
+ ObjectGroup(size_t capacity, v8::RetainedObjectInfo* info) |
+ : objects_(static_cast<int>(capacity)), |
+ info_(info) { } |
+ ~ObjectGroup() { if (info_ != NULL) info_->Dispose(); } |
List<Object**> objects_; |
+ v8::RetainedObjectInfo* info_; |
Vitaly Repeshko
2011/03/09 14:15:49
Needs DISALLOW_COPY_AND_ASSIGN to prevent accident
mnaganov (inactive)
2011/03/09 15:26:32
Done.
|
}; |
@@ -75,6 +78,8 @@ class GlobalHandles : public AllStatic { |
void* parameter, |
WeakReferenceCallback callback); |
+ static void SetWrapperClassId(Object** location, uint16_t class_id); |
+ |
// Returns the current number of weak handles. |
static int NumberOfWeakHandles() { return number_of_weak_handles_; } |
@@ -105,6 +110,9 @@ class GlobalHandles : public AllStatic { |
// Iterates over all handles. |
static void IterateAllRoots(ObjectVisitor* v); |
+ // Iterates over all handles that has embedder-assigned class ID. |
Vitaly Repeshko
2011/03/09 14:15:49
"has" -> "have"
mnaganov (inactive)
2011/03/09 15:26:32
Done.
|
+ static void IterateAllRootsWithClassIds(ObjectVisitor* v); |
+ |
// Iterates over all weak roots in heap. |
static void IterateWeakRoots(ObjectVisitor* v); |
@@ -119,7 +127,9 @@ class GlobalHandles : public AllStatic { |
// Add an object group. |
// Should only used in GC callback function before a collection. |
// All groups are destroyed after a mark-compact collection. |
- static void AddGroup(Object*** handles, size_t length); |
+ static void AddGroup(Object*** handles, |
+ size_t length, |
+ v8::RetainedObjectInfo* info); |
// Returns the object groups. |
static List<ObjectGroup*>* ObjectGroups(); |