Changeset 142242 in webkit


Ignore:
Timestamp:
Feb 8, 2013 12:24:16 AM (11 years ago)
Author:
loislo@chromium.org
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):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r142230 r142242  
     12013-02-06  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
     4        https://bugs.webkit.org/show_bug.cgi?id=109051
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * wtf/MemoryInstrumentation.cpp:
     9        (WTF::MemoryInstrumentation::WrapperBase::processPointer):
     10
    1112013-02-07  David Kilzer  <ddkilzer@apple.com>
    212
  • trunk/Source/WTF/wtf/MemoryInstrumentation.cpp

    r141992 r142242  
    9292    const void* realAddress = memoryObjectInfo.reportedPointer();
    9393    ASSERT(realAddress);
    94     if (realAddress != m_pointer) {
     94
     95    if (memoryObjectInfo.firstVisit()) {
     96        memoryInstrumentation->countObjectSize(realAddress, memoryObjectInfo.objectType(), memoryObjectInfo.objectSize());
     97        memoryInstrumentation->m_client->reportNode(memoryObjectInfo);
     98    }
     99
     100    if (realAddress != m_pointer)
    95101        memoryInstrumentation->m_client->reportBaseAddress(m_pointer, realAddress);
    96         if (!memoryObjectInfo.firstVisit())
    97             return;
    98     }
    99     memoryInstrumentation->countObjectSize(realAddress, memoryObjectInfo.objectType(), memoryObjectInfo.objectSize());
    100     memoryInstrumentation->m_client->reportNode(memoryObjectInfo);
    101     if (!memoryObjectInfo.customAllocation() && !memoryInstrumentation->checkCountedObject(realAddress)) {
     102
     103    if (memoryObjectInfo.firstVisit()
     104        && !memoryObjectInfo.customAllocation()
     105        && !memoryInstrumentation->checkCountedObject(realAddress)) {
    102106#if DEBUG_POINTER_INSTRUMENTATION
    103107        fputs("Unknown object counted:\n", stderr);
Note: See TracChangeset for help on using the changeset viewer.