Version 3.8.6
Add primitive WebGL array support to d8.
Improve heap size estimation (issue 1893).
Hash collision DOS workaround extended from string keys to numeric keys.
Provide an API for iterating through all external strings referenced from the JS heap.
Adjust position recorded for call expressions. http://crbug.com/109195
Fix GC crash related to instanceof. http://crbug.com/109448
Performance improvements and bug fixes.
Review URL: http://codereview.chromium.org/9227007
git-svn-id: http://v8.googlecode.com/svn/trunk@10406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/include/v8.h b/include/v8.h
index 1819943..294b14d 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2848,6 +2848,17 @@
*/
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.
*/
@@ -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.
@@ -3816,7 +3834,7 @@
static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02;
- static const int kJSObjectType = 0xa6;
+ static const int kJSObjectType = 0xa7;
static const int kFirstNonstringType = 0x80;
static const int kForeignType = 0x85;