[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

loislo at chromium.org loislo at chromium.org
Sun Feb 20 23:31:55 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 075d118341eb6fdf9906232f6c594fce915393eb
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 21 10:06:52 2011 +0000

    2011-01-21  Sheriff Bot  <webkit.review.bot at 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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76337 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 2899ee5..9cbb966 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2011-01-21  Sheriff Bot  <webkit.review.bot at 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):
+
 2011-01-21  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
index 64b9494..d11f720 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
+++ b/Source/WebCore/inspector/InspectorController.cpp
@@ -983,11 +983,23 @@ void InspectorController::didCloseWebSocket(unsigned long identifier)
 #endif // ENABLE(WEB_SOCKETS)
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
+void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
+{
+    if (!enabled())
+        return;
+    m_profilerAgent->addProfile(prpProfile, lineNumber, sourceURL);
+}
+
 bool InspectorController::isRecordingUserInitiatedProfile() const
 {
     return m_profilerAgent->isRecordingUserInitiatedProfile();
 }
 
+String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber)
+{
+    return m_profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
+}
+
 void InspectorController::startUserInitiatedProfiling()
 {
     if (!enabled())
diff --git a/Source/WebCore/inspector/InspectorController.h b/Source/WebCore/inspector/InspectorController.h
index eaaa1e5..dcdf7bc 100644
--- a/Source/WebCore/inspector/InspectorController.h
+++ b/Source/WebCore/inspector/InspectorController.h
@@ -227,7 +227,9 @@ public:
     void drawElementTitle(GraphicsContext&, const IntRect& boundingBox, const FloatRect& overlayRect, WebCore::Settings*) const;
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
+    void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
     bool isRecordingUserInitiatedProfile() const;
+    String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
     void startProfiling() { startUserInitiatedProfiling(); }
     void startUserInitiatedProfiling();
     void stopProfiling() { stopUserInitiatedProfiling(); }
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index 5f8d105..c28a82a 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -552,33 +552,6 @@ void InspectorInstrumentation::addStartProfilingMessageToConsoleImpl(InspectorCo
     if (InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent())
         profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
 }
-
-void InspectorInstrumentation::addProfileImpl(InspectorController* inspectorController, RefPtr<ScriptProfile> profile, ScriptCallStack* callStack)
-{
-    if (InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent()) {
-        const ScriptCallFrame& lastCaller = callStack->at(0);
-        profilerAgent->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
-    }
-}
-
-bool InspectorInstrumentation::profilerEnabledImpl(InspectorController* inspectorController)
-{
-    if (inspectorController->enabled())
-        return false;
-
-    InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent();
-    if (!profilerAgent)
-        return false;
-
-    return profilerAgent->enabled();
-}
-
-String InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(InspectorController* inspectorController, bool incrementProfileNumber)
-{
-    if (InspectorProfilerAgent* profilerAgent = inspectorController->profilerAgent())
-        return profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
-    return "";
-}
 #endif
 
 #if ENABLE(DATABASE)
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
index 7a7ee43..28867cb 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -139,9 +139,6 @@ public:
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
-    static void addProfile(Page*, RefPtr<ScriptProfile>, ScriptCallStack*);
-    static bool profilerEnabled(Page*);
-    static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
 #endif
 
 #if ENABLE(DATABASE)
@@ -249,9 +246,6 @@ private:
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     static void addStartProfilingMessageToConsoleImpl(InspectorController*, const String& title, unsigned lineNumber, const String& sourceURL);
-    static void addProfileImpl(InspectorController*, RefPtr<ScriptProfile>, ScriptCallStack*);
-    static bool profilerEnabledImpl(InspectorController*);
-    static String getCurrentUserInitiatedProfileNameImpl(InspectorController*, bool incrementProfileNumber);
 #endif
 
 #if ENABLE(DATABASE)
@@ -887,32 +881,6 @@ inline void InspectorInstrumentation::addStartProfilingMessageToConsole(Page* pa
         addStartProfilingMessageToConsoleImpl(inspectorController, title, lineNumber, sourceURL);
 #endif
 }
-
-inline void InspectorInstrumentation::addProfile(Page* page, RefPtr<ScriptProfile> profile, ScriptCallStack* callStack)
-{
-#if ENABLE(INSPECTOR)
-    if (InspectorController* inspectorController = inspectorControllerForPage(page))
-        addProfileImpl(inspectorController, profile, callStack);
-#endif
-}
-
-inline bool InspectorInstrumentation::profilerEnabled(Page* page)
-{
-#if ENABLE(INSPECTOR)
-    if (InspectorController* inspectorController = inspectorControllerForPage(page))
-        return profilerEnabledImpl(inspectorController);
-#endif
-    return false;
-}
-
-inline String InspectorInstrumentation::getCurrentUserInitiatedProfileName(Page* page, bool incrementProfileNumber)
-{
-#if ENABLE(INSPECTOR)
-    if (InspectorController* inspectorController = inspectorControllerForPage(page))
-        return InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(inspectorController, incrementProfileNumber);
-#endif
-    return "";
-}
 #endif
 
 #if ENABLE(INSPECTOR)
@@ -968,7 +936,6 @@ inline InspectorController* InspectorInstrumentation::inspectorControllerWithFro
     }
     return 0;
 }
-
 #endif
 
 } // namespace WebCore
diff --git a/Source/WebCore/page/Console.cpp b/Source/WebCore/page/Console.cpp
index 0c19421..d4aed41 100644
--- a/Source/WebCore/page/Console.cpp
+++ b/Source/WebCore/page/Console.cpp
@@ -262,13 +262,20 @@ void Console::profile(const String& title, ScriptState* state, PassRefPtr<Script
     if (!page)
         return;
 
+#if ENABLE(INSPECTOR)
+    InspectorController* controller = page->inspectorController();
     // FIXME: log a console message when profiling is disabled.
-    if (!InspectorInstrumentation::profilerEnabled(page))
+    if (!controller->profilerEnabled())
         return;
+#endif
 
     String resolvedTitle = title;
     if (title.isNull()) // no title so give it the next user initiated profile title.
-        resolvedTitle = InspectorInstrumentation::getCurrentUserInitiatedProfileName(page, true);
+#if ENABLE(INSPECTOR)
+        resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
+#else
+        resolvedTitle = "";
+#endif
 
     ScriptProfiler::start(state, resolvedTitle);
 
@@ -282,15 +289,22 @@ void Console::profileEnd(const String& title, ScriptState* state, PassRefPtr<Scr
     if (!page)
         return;
 
-    if (!InspectorInstrumentation::profilerEnabled(page))
+#if ENABLE(INSPECTOR)
+    InspectorController* controller = page->inspectorController();
+    if (!controller->profilerEnabled())
         return;
+#endif
 
     RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title);
     if (!profile)
         return;
 
     m_profiles.append(profile);
-    InspectorInstrumentation::addProfile(page, profile, callStack.get());
+
+#if ENABLE(INSPECTOR)
+    const ScriptCallFrame& lastCaller = callStack->at(0);
+    controller->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
+#endif
 }
 
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list