Ignore:
Timestamp:
May 13, 2008, 2:18:02 PM (17 years ago)
Author:
[email protected]
Message:

2008-05-13 Kevin McCullough <[email protected]>

Reviewed by Geoff.

<rdar://problem/5770054> JavaScript profiler (10928)
Use PassRefPtrs instead of RefPtrs when appropriate.

  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::addChild):
  • profiler/FunctionCallProfile.h:
  • profiler/Profile.h: (KJS::Profile::callTree):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/FunctionCallProfile.cpp

    r33382 r33388  
    6666}
    6767
    68 void FunctionCallProfile::addChild(RefPtr<FunctionCallProfile>& child)
     68void FunctionCallProfile::addChild(PassRefPtr<FunctionCallProfile> prpChild)
    6969{
    70     if (!child)
    71         return;
     70    ASSERT(prpChild);
    7271
     72    RefPtr<FunctionCallProfile> child = prpChild;
    7373    for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) {
    7474        if ((*currentChild)->functionName() == child->functionName())
     
    7676    }
    7777
    78     m_children.append(child);
     78    m_children.append(child.release());
    7979}
    8080
Note: See TracChangeset for help on using the changeset viewer.