Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 7cad7b628044f008d2a79d242e2ace05af2ed09a..a4397f226e987047d7cfa453b7b34d33537159ba 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -1732,6 +1732,14 @@ class Function : public Object { |
V8EXPORT Handle<Value> GetName() const; |
/** |
+ * Name inferred from variable or property assignment of this function. |
+ * Used to facilitate debugging and profiling of JavaScript code written |
+ * in an OO style, where many functions are anonymous but are assigned |
+ * to object properties. |
+ */ |
+ V8EXPORT Handle<Value> GetInferredName() const; |
+ |
+ /** |
* Returns zero based line number of function body and |
* kLineOffsetNotFound if no information available. |
*/ |
@@ -2845,6 +2853,17 @@ class V8EXPORT StartupDataDecompressor { // NOLINT |
*/ |
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. |
*/ |
@@ -3188,6 +3207,13 @@ class V8EXPORT V8 { |
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. |