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

Unified Diff: src/global-handles.h

Issue 6685052: Version 3.2.2. Fixed a number of crash and correctness bugs. Improved Cranksh... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 9 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 | « src/flag-definitions.h ('k') | src/global-handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.h
===================================================================
--- src/global-handles.h (revision 7161)
+++ src/global-handles.h (working copy)
@@ -48,10 +48,16 @@
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_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ObjectGroup);
};
@@ -75,6 +81,8 @@
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 +113,9 @@
// Iterates over all handles.
static void IterateAllRoots(ObjectVisitor* v);
+ // Iterates over all handles that have embedder-assigned class ID.
+ static void IterateAllRootsWithClassIds(ObjectVisitor* v);
+
// Iterates over all weak roots in heap.
static void IterateWeakRoots(ObjectVisitor* v);
@@ -119,7 +130,9 @@
// 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();
« no previous file with comments | « src/flag-definitions.h ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698