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

Unified Diff: include/v8.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 | « no previous file | include/v8-profiler.h » ('j') | src/heap-profiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 83a5744278afe03f7a7869379f17217e74a80ea4..41bf9e22a66c77cf8667adcb47488958fc514499 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -396,6 +396,12 @@ template <class T> class Persistent : public Handle<T> {
*/
inline bool IsWeak() const;
+ /**
+ * Assigns a wrapper class ID to the handle. See RetainedObjectInfo
+ * interface description in v8-profiler.h for details.
+ */
+ inline void SetWrapperClassId(uint16_t class_id);
+
private:
friend class ImplementationUtilities;
friend class ObjectTemplate;
@@ -2533,6 +2539,8 @@ class V8EXPORT HeapStatistics {
};
+class RetainedObjectInfo;
+
/**
* Container class for static utility functions.
*/
@@ -2702,8 +2710,11 @@ class V8EXPORT V8 {
* intended to be used in the before-garbage-collection callback
* function, for instance to simulate DOM tree connections among JS
* wrapper objects.
+ * See v8-profiler.h for RetainedObjectInfo interface description.
*/
- static void AddObjectGroup(Persistent<Value>* objects, size_t length);
+ static void AddObjectGroup(Persistent<Value>* objects,
+ size_t length,
+ RetainedObjectInfo* info = NULL);
/**
* Initializes from snapshot if possible. Otherwise, attempts to
@@ -2912,6 +2923,8 @@ class V8EXPORT V8 {
static void ClearWeak(internal::Object** global_handle);
static bool IsGlobalNearDeath(internal::Object** global_handle);
static bool IsGlobalWeak(internal::Object** global_handle);
+ static void SetWrapperClassId(internal::Object** global_handle,
+ uint16_t class_id);
template <class T> friend class Handle;
template <class T> friend class Local;
@@ -3560,6 +3573,10 @@ void Persistent<T>::ClearWeak() {
V8::ClearWeak(reinterpret_cast<internal::Object**>(**this));
}
+template <class T>
+void Persistent<T>::SetWrapperClassId(uint16_t class_id) {
+ V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id);
+}
Arguments::Arguments(internal::Object** implicit_args,
internal::Object** values, int length,
« no previous file with comments | « no previous file | include/v8-profiler.h » ('j') | src/heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698