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

Unified Diff: src/global-handles.h

Issue 6626043: Add an interface for an embedder to provide information about native (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix GetCopy 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/api.cc ('k') | src/global-handles.cc » ('j') | src/heap-profiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.h
diff --git a/src/global-handles.h b/src/global-handles.h
index 37b2b44522e55ea628a433f8546b5a5fd6e8da74..3bab4b8c0ac5e7fa973b4c22ebd2e303bfbbda60 100644
--- a/src/global-handles.h
+++ b/src/global-handles.h
@@ -48,10 +48,16 @@ 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_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ObjectGroup);
};
@@ -75,6 +81,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 +113,9 @@ class GlobalHandles : public AllStatic {
// 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 @@ 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();
« no previous file with comments | « src/api.cc ('k') | src/global-handles.cc » ('j') | src/heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698