| Index: src/global-handles.h
|
| diff --git a/src/global-handles.h b/src/global-handles.h
|
| index 78fb3a1147f9ea0489b25f1de1bb14d03ed8d3bf..c5f44503ba5de7043d05e427bfd0fd0e5ebda370 100644
|
| --- a/src/global-handles.h
|
| +++ b/src/global-handles.h
|
| @@ -41,15 +41,14 @@ namespace v8 { namespace internal {
|
| // Callback function on handling weak global handles.
|
| // typedef bool (*WeakSlotCallback)(Object** pointer);
|
|
|
| -// An object group is indexed by an id. An object group is treated like
|
| -// a single JS object: if one of object in the group is alive,
|
| -// all objects in the same group are considered alive.
|
| +// An object group is treated like a single JS object: if one of object in
|
| +// the group is alive, all objects in the same group are considered alive.
|
| // An object group is used to simulate object relationship in a DOM tree.
|
| class ObjectGroup : public Malloced {
|
| public:
|
| - explicit ObjectGroup(void* id) : id_(id), objects_(4) {}
|
| + ObjectGroup() : objects_(4) {}
|
| + explicit ObjectGroup(size_t capacity) : objects_(capacity) {}
|
|
|
| - void* id_;
|
| List<Object**> objects_;
|
| };
|
|
|
| @@ -102,15 +101,13 @@ class GlobalHandles : public AllStatic {
|
| // Mark the weak pointers based on the callback.
|
| static void MarkWeakRoots(WeakSlotCallback f);
|
|
|
| - // Add an object to a group indexed by an id.
|
| + // 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 AddToGroup(void* id, Object** location);
|
| + static void AddGroup(Object*** handles, size_t length);
|
|
|
| // Returns the object groups.
|
| - static List<ObjectGroup*>& ObjectGroups() {
|
| - return object_groups_;
|
| - }
|
| + static List<ObjectGroup*>* ObjectGroups();
|
|
|
| // Remove bags, this should only happen after GC.
|
| static void RemoveObjectGroups();
|
| @@ -143,9 +140,6 @@ class GlobalHandles : public AllStatic {
|
| static Node* first_free_;
|
| static Node* first_free() { return first_free_; }
|
| static void set_first_free(Node* value) { first_free_ = value; }
|
| -
|
| - // A list of object groups.
|
| - static List<ObjectGroup*> object_groups_;
|
| };
|
|
|
|
|
|
|