Ignore:
Timestamp:
May 13, 2008, 12:35:31 PM (17 years ago)
Author:
[email protected]
Message:

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

Reviewed by Sam.

<rdar://problem/5770054> JavaScript profiler (10928)

  • Made some functions static (as per Adam) and changed from using raw pointers to RefPtr for making these JavaScript Objects.
  • profiler/FunctionCallProfile.cpp: (KJS::FunctionCallProfile::addChild): (KJS::FunctionCallProfile::findChild):
  • profiler/FunctionCallProfile.h: (KJS::FunctionCallProfile::create):
  • profiler/Profile.cpp: (KJS::Profile::Profile): (KJS::Profile::willExecute): (KJS::Profile::didExecute): (KJS::functionNameCountPairComparator):
  • profiler/Profile.h: (KJS::Profile::create): (KJS::Profile::title): (KJS::Profile::callTree):
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling):
  • profiler/Profiler.h: (KJS::Profiler::allProfiles): (KJS::Profiler::clearProfiles):
File:
1 edited

Legend:

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

    r32760 r33382  
    4545}
    4646
    47 FunctionCallProfile::~FunctionCallProfile()
    48 {
    49     deleteAllValues(m_children);
    50 }
    51 
    52 
    5347void FunctionCallProfile::willExecute()
    5448{
     
    7266}
    7367
    74 void FunctionCallProfile::addChild(FunctionCallProfile* child)
     68void FunctionCallProfile::addChild(RefPtr<FunctionCallProfile>& child)
    7569{
    7670    if (!child)
     
    8983    for (StackIterator currentChild = m_children.begin(); currentChild != m_children.end(); ++currentChild) {
    9084        if ((*currentChild)->functionName() == name)
    91             return *currentChild;
     85            return (*currentChild).get();
    9286    }
    9387
Note: See TracChangeset for help on using the changeset viewer.