Changeset 76337 in webkit


Ignore:
Timestamp:
Jan 21, 2011 2:06:52 AM (13 years ago)
Author:
loislo@chromium.org
Message:

2011-01-21 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r76335.
http://trac.webkit.org/changeset/76335
https://bugs.webkit.org/show_bug.cgi?id=52875

profiler tests were broken (Requested by loislo on #webkit).

  • inspector/InspectorController.cpp: (WebCore::InspectorController::addProfile): (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
  • inspector/InspectorController.h:
  • inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
  • inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole): (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
  • page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd):
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76335 r76337  
     12011-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r76335.
     4        http://trac.webkit.org/changeset/76335
     5        https://bugs.webkit.org/show_bug.cgi?id=52875
     6
     7        profiler tests were broken (Requested by loislo on #webkit).
     8
     9        * inspector/InspectorController.cpp:
     10        (WebCore::InspectorController::addProfile):
     11        (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
     12        * inspector/InspectorController.h:
     13        * inspector/InspectorInstrumentation.cpp:
     14        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
     15        * inspector/InspectorInstrumentation.h:
     16        (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
     17        (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
     18        * page/Console.cpp:
     19        (WebCore::Console::profile):
     20        (WebCore::Console::profileEnd):
     21
    1222011-01-21  Ilya Tikhonovsky  <loislo@chromium.org>
    223
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r76335 r76337  
    984984
    985985#if ENABLE(JAVASCRIPT_DEBUGGER)
     986void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
     987{
     988    if (!enabled())
     989        return;
     990    m_profilerAgent->addProfile(prpProfile, lineNumber, sourceURL);
     991}
     992
    986993bool InspectorController::isRecordingUserInitiatedProfile() const
    987994{
    988995    return m_profilerAgent->isRecordingUserInitiatedProfile();
     996}
     997
     998String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber)
     999{
     1000    return m_profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
    9891001}
    9901002
  • trunk/Source/WebCore/inspector/InspectorController.h

    r76335 r76337  
    228228
    229229#if ENABLE(JAVASCRIPT_DEBUGGER)
     230    void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    230231    bool isRecordingUserInitiatedProfile() const;
     232    String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
    231233    void startProfiling() { startUserInitiatedProfiling(); }
    232234    void startUserInitiatedProfiling();
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r76335 r76337  
    553553        profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
    554554}
    555 
    556 void InspectorInstrumentation::addProfileImpl(InspectorController* inspectorController, RefPtr<ScriptProfile> profile, ScriptCallStack* callStack)
    557 {
    558     if (InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent()) {
    559         const ScriptCallFrame& lastCaller = callStack->at(0);
    560         profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
    561     }
    562 }
    563 
    564 bool InspectorInstrumentation::profilerEnabledImpl(InspectorController* inspectorController)
    565 {
    566     if (inspectorController->enabled())
    567         return false;
    568 
    569     InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent();
    570     if (!profilerAgent)
    571         return false;
    572 
    573     return profilerAgent->enabled();
    574 }
    575 
    576 String InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(InspectorController* inspectorController, bool incrementProfileNumber)
    577 {
    578     if (InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent())
    579         return profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
    580     return "";
    581 }
    582555#endif
    583556
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r76335 r76337  
    140140#if ENABLE(JAVASCRIPT_DEBUGGER)
    141141    static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
    142     static void addProfile(Page*, RefPtr<ScriptProfile>, ScriptCallStack*);
    143     static bool profilerEnabled(Page*);
    144     static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
    145142#endif
    146143
     
    250247#if ENABLE(JAVASCRIPT_DEBUGGER)
    251248    static void addStartProfilingMessageToConsoleImpl(InspectorController*, const String& title, unsigned lineNumber, const String& sourceURL);
    252     static void addProfileImpl(InspectorController*, RefPtr<ScriptProfile>, ScriptCallStack*);
    253     static bool profilerEnabledImpl(InspectorController*);
    254     static String getCurrentUserInitiatedProfileNameImpl(InspectorController*, bool incrementProfileNumber);
    255249#endif
    256250
     
    888882#endif
    889883}
    890 
    891 inline void InspectorInstrumentation::addProfile(Page* page, RefPtr<ScriptProfile> profile, ScriptCallStack* callStack)
    892 {
    893 #if ENABLE(INSPECTOR)
    894     if (InspectorController* inspectorController = inspectorControllerForPage(page))
    895         addProfileImpl(inspectorController, profile, callStack);
    896 #endif
    897 }
    898 
    899 inline bool InspectorInstrumentation::profilerEnabled(Page* page)
    900 {
    901 #if ENABLE(INSPECTOR)
    902     if (InspectorController* inspectorController = inspectorControllerForPage(page))
    903         return profilerEnabledImpl(inspectorController);
    904 #endif
    905     return false;
    906 }
    907 
    908 inline String InspectorInstrumentation::getCurrentUserInitiatedProfileName(Page* page, bool incrementProfileNumber)
    909 {
    910 #if ENABLE(INSPECTOR)
    911     if (InspectorController* inspectorController = inspectorControllerForPage(page))
    912         return InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(inspectorController, incrementProfileNumber);
    913 #endif
    914     return "";
    915 }
    916884#endif
    917885
     
    969937    return 0;
    970938}
    971 
    972939#endif
    973940
  • trunk/Source/WebCore/page/Console.cpp

    r76335 r76337  
    263263        return;
    264264
     265#if ENABLE(INSPECTOR)
     266    InspectorController* controller = page->inspectorController();
    265267    // FIXME: log a console message when profiling is disabled.
    266     if (!InspectorInstrumentation::profilerEnabled(page))
    267         return;
     268    if (!controller->profilerEnabled())
     269        return;
     270#endif
    268271
    269272    String resolvedTitle = title;
    270273    if (title.isNull()) // no title so give it the next user initiated profile title.
    271         resolvedTitle = InspectorInstrumentation::getCurrentUserInitiatedProfileName(page, true);
     274#if ENABLE(INSPECTOR)
     275        resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
     276#else
     277        resolvedTitle = "";
     278#endif
    272279
    273280    ScriptProfiler::start(state, resolvedTitle);
     
    283290        return;
    284291
    285     if (!InspectorInstrumentation::profilerEnabled(page))
    286         return;
     292#if ENABLE(INSPECTOR)
     293    InspectorController* controller = page->inspectorController();
     294    if (!controller->profilerEnabled())
     295        return;
     296#endif
    287297
    288298    RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title);
     
    291301
    292302    m_profiles.append(profile);
    293     InspectorInstrumentation::addProfile(page, profile, callStack.get());
     303
     304#if ENABLE(INSPECTOR)
     305    const ScriptCallFrame& lastCaller = callStack->at(0);
     306    controller->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
     307#endif
    294308}
    295309
Note: See TracChangeset for help on using the changeset viewer.