+2013-02-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
+ https://bugs.webkit.org/show_bug.cgi?id=109554
+
+ In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
+ can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
+
+ Drive by fix: I introduced a client interface for the HeapGraphSerializer.
+ It helps me to do the tests for the serializer.
+
+ Reviewed by Yury Semikhatsky.
+
+ It is covered by newly added tests in TestWebKitAPI.
+
+ * inspector/HeapGraphSerializer.cpp:
+ (WebCore::HeapGraphSerializer::HeapGraphSerializer):
+ (WebCore::HeapGraphSerializer::pushUpdate):
+ (WebCore::HeapGraphSerializer::reportNode):
+ (WebCore::HeapGraphSerializer::toNodeId):
+ (WebCore::HeapGraphSerializer::addRootNode):
+ * inspector/HeapGraphSerializer.h:
+ (HeapGraphSerializer):
+ (Client):
+ (WebCore::HeapGraphSerializer::Client::~Client):
+ * inspector/InspectorMemoryAgent.cpp:
+ (WebCore):
+ (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
+
2013-02-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r143100.