Changeset 76337 in webkit
- Timestamp:
- Jan 21, 2011 2:06:52 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76335 r76337 1 2011-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 1 22 2011-01-21 Ilya Tikhonovsky <loislo@chromium.org> 2 23 -
trunk/Source/WebCore/inspector/InspectorController.cpp
r76335 r76337 984 984 985 985 #if ENABLE(JAVASCRIPT_DEBUGGER) 986 void 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 986 993 bool InspectorController::isRecordingUserInitiatedProfile() const 987 994 { 988 995 return m_profilerAgent->isRecordingUserInitiatedProfile(); 996 } 997 998 String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber) 999 { 1000 return m_profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber); 989 1001 } 990 1002 -
trunk/Source/WebCore/inspector/InspectorController.h
r76335 r76337 228 228 229 229 #if ENABLE(JAVASCRIPT_DEBUGGER) 230 void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL); 230 231 bool isRecordingUserInitiatedProfile() const; 232 String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false); 231 233 void startProfiling() { startUserInitiatedProfiling(); } 232 234 void startUserInitiatedProfiling(); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r76335 r76337 553 553 profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL); 554 554 } 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 }582 555 #endif 583 556 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r76335 r76337 140 140 #if ENABLE(JAVASCRIPT_DEBUGGER) 141 141 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);145 142 #endif 146 143 … … 250 247 #if ENABLE(JAVASCRIPT_DEBUGGER) 251 248 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);255 249 #endif 256 250 … … 888 882 #endif 889 883 } 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 #endif897 }898 899 inline bool InspectorInstrumentation::profilerEnabled(Page* page)900 {901 #if ENABLE(INSPECTOR)902 if (InspectorController* inspectorController = inspectorControllerForPage(page))903 return profilerEnabledImpl(inspectorController);904 #endif905 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 #endif914 return "";915 }916 884 #endif 917 885 … … 969 937 return 0; 970 938 } 971 972 939 #endif 973 940 -
trunk/Source/WebCore/page/Console.cpp
r76335 r76337 263 263 return; 264 264 265 #if ENABLE(INSPECTOR) 266 InspectorController* controller = page->inspectorController(); 265 267 // FIXME: log a console message when profiling is disabled. 266 if (!InspectorInstrumentation::profilerEnabled(page)) 267 return; 268 if (!controller->profilerEnabled()) 269 return; 270 #endif 268 271 269 272 String resolvedTitle = title; 270 273 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 272 279 273 280 ScriptProfiler::start(state, resolvedTitle); … … 283 290 return; 284 291 285 if (!InspectorInstrumentation::profilerEnabled(page)) 286 return; 292 #if ENABLE(INSPECTOR) 293 InspectorController* controller = page->inspectorController(); 294 if (!controller->profilerEnabled()) 295 return; 296 #endif 287 297 288 298 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title); … … 291 301 292 302 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 294 308 } 295 309
Note: See TracChangeset
for help on using the changeset viewer.