2010-11-02 Mikhail Naganov <mnaganov@chromium.org>
authormnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 15:47:26 +0000 (15:47 +0000)
committermnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 15:47:26 +0000 (15:47 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: Fix console messages about starting and finishing profiling.

        https://bugs.webkit.org/show_bug.cgi?id=48825

        * inspector/InspectorProfilerAgent.cpp:
        (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
        * inspector/front-end/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/InspectorProfilerAgent.cpp
WebCore/inspector/front-end/ProfilesPanel.js

index 56e0926..7b07a41 100644 (file)
@@ -1,3 +1,16 @@
+2010-11-02  Mikhail Naganov  <mnaganov@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Fix console messages about starting and finishing profiling.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48825
+
+        * inspector/InspectorProfilerAgent.cpp:
+        (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
+
 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Reviewed by Andreas Kling.
index 71c7231..456a0c6 100644 (file)
@@ -95,7 +95,7 @@ void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<Scrip
 
 void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL)
 {
-    String message = makeString("Profile \"webkit-profile://", CPUProfileType, '/', encodeWithURLEscapeSequences(title), "#0 \" started.");
+    String message = makeString("Profile \"webkit-profile://", CPUProfileType, '/', encodeWithURLEscapeSequences(title), "#0\" started.");
     m_inspectorController->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
 }
 
index ca02f9e..5f124ca 100644 (file)
@@ -443,12 +443,12 @@ WebInspector.ProfilesPanel.prototype = {
             if (!(titleKey in this._profileGroupsForLinks))
                 this._profileGroupsForLinks[titleKey] = 0;
 
-            groupNumber = ++this._profileGroupsForLinks[titleKey];
+            var groupNumber = ++this._profileGroupsForLinks[titleKey];
 
             if (groupNumber > 2)
                 // The title is used in the console message announcing that a profile has started so it gets
                 // incremented twice as often as it's displayed
-                title += " " + WebInspector.UIString("Run %d", groupNumber / 2);
+                title += " " + WebInspector.UIString("Run %d", (groupNumber + 1) / 2);
         }
         
         return title;