Index: include/v8.h |
=================================================================== |
--- include/v8.h (revision 10398) |
+++ include/v8.h (working copy) |
@@ -2848,7 +2848,18 @@ |
*/ |
typedef bool (*EntropySource)(unsigned char* buffer, size_t length); |
+ |
/** |
+ * Interface for iterating though all external resources in the heap. |
+ */ |
+class V8EXPORT ExternalResourceVisitor { // NOLINT |
+ public: |
+ virtual ~ExternalResourceVisitor() {} |
+ virtual void VisitExternalString(Handle<String> string) {} |
+}; |
+ |
+ |
+/** |
* Container class for static utility functions. |
*/ |
class V8EXPORT V8 { |
@@ -3204,6 +3215,13 @@ |
static void GetHeapStatistics(HeapStatistics* heap_statistics); |
/** |
+ * Iterates through all external resources referenced from current isolate |
+ * heap. This method is not expected to be used except for debugging purposes |
+ * and may be quite slow. |
+ */ |
+ static void VisitExternalResources(ExternalResourceVisitor* visitor); |
+ |
+ /** |
* Optional notification that the embedder is idle. |
* V8 uses the notification to reduce memory footprint. |
* This call can be used repeatedly if the embedder remains idle. |