Title: [142242] trunk/Source/WTF
- Revision
- 142242
- Author
- [email protected]
- Date
- 2013-02-08 00:24:16 -0800 (Fri, 08 Feb 2013)
Log Message
Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
https://bugs.webkit.org/show_bug.cgi?id=109051
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::WrapperBase::processPointer):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (142241 => 142242)
--- trunk/Source/WTF/ChangeLog 2013-02-08 08:18:04 UTC (rev 142241)
+++ trunk/Source/WTF/ChangeLog 2013-02-08 08:24:16 UTC (rev 142242)
@@ -1,3 +1,13 @@
+2013-02-06 Ilya Tikhonovsky <[email protected]>
+
+ Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
+ https://bugs.webkit.org/show_bug.cgi?id=109051
+
+ Reviewed by Yury Semikhatsky.
+
+ * wtf/MemoryInstrumentation.cpp:
+ (WTF::MemoryInstrumentation::WrapperBase::processPointer):
+
2013-02-07 David Kilzer <[email protected]>
Fix #endif comment from r142163 and r142183
Modified: trunk/Source/WTF/wtf/MemoryInstrumentation.cpp (142241 => 142242)
--- trunk/Source/WTF/wtf/MemoryInstrumentation.cpp 2013-02-08 08:18:04 UTC (rev 142241)
+++ trunk/Source/WTF/wtf/MemoryInstrumentation.cpp 2013-02-08 08:24:16 UTC (rev 142242)
@@ -91,14 +91,18 @@
const void* realAddress = memoryObjectInfo.reportedPointer();
ASSERT(realAddress);
- if (realAddress != m_pointer) {
+
+ if (memoryObjectInfo.firstVisit()) {
+ memoryInstrumentation->countObjectSize(realAddress, memoryObjectInfo.objectType(), memoryObjectInfo.objectSize());
+ memoryInstrumentation->m_client->reportNode(memoryObjectInfo);
+ }
+
+ if (realAddress != m_pointer)
memoryInstrumentation->m_client->reportBaseAddress(m_pointer, realAddress);
- if (!memoryObjectInfo.firstVisit())
- return;
- }
- memoryInstrumentation->countObjectSize(realAddress, memoryObjectInfo.objectType(), memoryObjectInfo.objectSize());
- memoryInstrumentation->m_client->reportNode(memoryObjectInfo);
- if (!memoryObjectInfo.customAllocation() && !memoryInstrumentation->checkCountedObject(realAddress)) {
+
+ if (memoryObjectInfo.firstVisit()
+ && !memoryObjectInfo.customAllocation()
+ && !memoryInstrumentation->checkCountedObject(realAddress)) {
#if DEBUG_POINTER_INSTRUMENTATION
fputs("Unknown object counted:\n", stderr);
WTFPrintBacktrace(m_callStack, m_callStackSize);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes