Status: New
Owner: ----
New issue 2430 by [email protected]: crash in
HeapProfiler::ExecuteWrapperClassCallback
http://code.google.com/p/v8/issues/detail?id=2430
There should be NULL checking before calling the callback.
The case happens when a wrapper class with a large class id is defined.
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index 301b099..df0bebe 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -117,6 +117,7 @@ void HeapProfiler::DefineWrapperClass(
v8::RetainedObjectInfo* HeapProfiler::ExecuteWrapperClassCallback(
uint16_t class_id, Object** wrapper) {
if (wrapper_callbacks_.length() <= class_id) return NULL;
+ if (!wrapper_callbacks_[class_id]) return NULL;
return wrapper_callbacks_[class_id](
class_id, Utils::ToLocal(Handle<Object>(wrapper)));
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev