| Index: src/heap-profiler.cc
|
| diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
|
| index 07b631fa7332d8de6bc1b50f6987aae4d74e58cd..3e2756a29065618871c39d970e8783f7826e381b 100644
|
| --- a/src/heap-profiler.cc
|
| +++ b/src/heap-profiler.cc
|
| @@ -364,6 +364,26 @@ HeapSnapshot* HeapProfiler::TakeSnapshot(String* name,
|
| }
|
|
|
|
|
| +void HeapProfiler::DefineWrapperClass(
|
| + uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback) {
|
| + ASSERT(singleton_ != NULL);
|
| + if (singleton_->wrapper_callbacks_.length() <= class_id) {
|
| + singleton_->wrapper_callbacks_.AddBlock(
|
| + NULL, class_id - singleton_->wrapper_callbacks_.length() + 1);
|
| + }
|
| + singleton_->wrapper_callbacks_[class_id] = callback;
|
| +}
|
| +
|
| +
|
| +v8::RetainedObjectInfo* HeapProfiler::ExecuteWrapperClassCallback(
|
| + uint16_t class_id, Object** wrapper) {
|
| + ASSERT(singleton_ != NULL);
|
| + if (singleton_->wrapper_callbacks_.length() <= class_id) return NULL;
|
| + return singleton_->wrapper_callbacks_[class_id](
|
| + class_id, Utils::ToLocal(Handle<Object>(wrapper)));
|
| +}
|
| +
|
| +
|
| HeapSnapshot* HeapProfiler::TakeSnapshotImpl(const char* name,
|
| int type,
|
| v8::ActivityControl* control) {
|
|
|