Ignore:
Timestamp:
Sep 3, 2008, 2:53:17 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-09-03 Kevin McCullough <[email protected]>

Reviewed by Tim.

Remove the rest of the "zombie" code from the profiler.

  • There is no longer a need for the ProfilerClient callback mechanism.
  • API/JSProfilerPrivate.cpp: (JSStartProfiling):
  • JavaScriptCore.exp:
  • profiler/HeavyProfile.h:
  • profiler/ProfileGenerator.cpp: (KJS::ProfileGenerator::create): (KJS::ProfileGenerator::ProfileGenerator):
  • profiler/ProfileGenerator.h: (KJS::ProfileGenerator::profileGroup):
  • profiler/Profiler.cpp: (KJS::Profiler::startProfiling): (KJS::Profiler::stopProfiling): Immediately return the profile when stopped instead of using a callback.
  • profiler/Profiler.h:
  • profiler/TreeProfile.h:

WebCore:

2008-09-03 Kevin McCullough <[email protected]>

Reviewed by Tim.

Remove the rest of the "zombie" code from the profiler.

  • There is no longer a need for the ProfilerClient callback mechanism.
  • page/Console.cpp: (WebCore::Console::Console): (WebCore::Console::profile): (WebCore::Console::profileEnd): Move the variables from the header to here since we don't have to wait for a callback to use them.
  • page/Console.h:
  • page/InspectorController.cpp: (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::stopUserInitiatedProfiling):
  • page/InspectorController.h:
File:
1 edited

Legend:

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

    r36058 r36068  
    5757}   
    5858
    59 void Profiler::startProfiling(ExecState* exec, const UString& title, ProfilerClient* client)
     59void Profiler::startProfiling(ExecState* exec, const UString& title)
    6060{
    6161    ASSERT_ARG(exec, exec);
     
    7171
    7272    s_sharedEnabledProfilerReference = this;
    73     RefPtr<ProfileGenerator> profileGenerator = ProfileGenerator::create(title, exec, client, ++ProfilesUID);
     73    RefPtr<ProfileGenerator> profileGenerator = ProfileGenerator::create(title, exec, ++ProfilesUID);
    7474    m_currentProfiles.append(profileGenerator);
    7575}
    7676
    77 void Profiler::stopProfiling(ExecState* exec, const UString& title)
     77PassRefPtr<Profile> Profiler::stopProfiling(ExecState* exec, const UString& title)
    7878{
    7979    ExecState* globalExec = exec->lexicalGlobalObject()->globalExec();
     
    8181        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
    8282        if (profileGenerator->originatingGlobalExec() == globalExec && (title.isNull() || profileGenerator->title() == title)) {
    83             PassRefPtr<ProfileGenerator> prpProfileGenerator = m_currentProfiles[i].release();
     83            profileGenerator->stopProfiling();
     84            RefPtr<Profile> returnProfile = profileGenerator->profile();
     85
    8486            m_currentProfiles.remove(i);
    85 
    8687            if (!m_currentProfiles.size())
    8788                s_sharedEnabledProfilerReference = 0;
    88 
    89 
    90             prpProfileGenerator->stopProfiling();
    91             if (ProfilerClient* client = prpProfileGenerator->client())
    92                 client->finishedProfiling(prpProfileGenerator->profile());
     89           
     90            return returnProfile;
    9391        }
    9492    }
     93
     94    return 0;
    9595}
    9696
Note: See TracChangeset for help on using the changeset viewer.