summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/Console.cpp')
-rw-r--r--WebCore/page/Console.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/WebCore/page/Console.cpp b/WebCore/page/Console.cpp
index 2273a5e..8f55c78 100644
--- a/WebCore/page/Console.cpp
+++ b/WebCore/page/Console.cpp
@@ -41,11 +41,9 @@
#include "PageGroup.h"
#include "PlatformString.h"
-#if ENABLE(JAVASCRIPT_DEBUGGER)
-#include <profiler/Profiler.h>
-#endif
-
#include "ScriptCallStack.h"
+#include "ScriptProfile.h"
+#include "ScriptProfiler.h"
#include <stdio.h>
#include <wtf/UnusedParam.h>
@@ -314,38 +312,40 @@ String Console::lastWMLErrorMessage() const
}
#endif
-#if ENABLE(JAVASCRIPT_DEBUGGER)
+// FIXME: "USE(V8)" and "USE(JSC)" below are temporary measures until JAVASCRIPT_DEBUGGER is
+// enabled when building Chromium.
+#if ENABLE(JAVASCRIPT_DEBUGGER) || USE(V8)
-void Console::profile(const JSC::UString& title, ScriptCallStack* callStack)
+void Console::profile(const String& title, ScriptCallStack* callStack)
{
Page* page = this->page();
if (!page)
return;
-#if ENABLE(INSPECTOR)
+#if ENABLE(INSPECTOR) && USE(JSC)
InspectorController* controller = page->inspectorController();
// FIXME: log a console message when profiling is disabled.
if (!controller->profilerEnabled())
return;
#endif
- JSC::UString resolvedTitle = title;
- if (title.isNull()) // no title so give it the next user initiated profile title.
-#if ENABLE(INSPECTOR)
+ String resolvedTitle = title;
+ if (title.isNull()) // no title so give it the next user initiated profile title.
+#if ENABLE(INSPECTOR) && USE(JSC)
resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
#else
resolvedTitle = "";
#endif
- JSC::Profiler::profiler()->startProfiling(callStack->state(), resolvedTitle);
+ ScriptProfiler::start(callStack->state(), resolvedTitle);
-#if ENABLE(INSPECTOR)
+#if ENABLE(INSPECTOR) && USE(JSC)
const ScriptCallFrame& lastCaller = callStack->at(0);
controller->addStartProfilingMessageToConsole(resolvedTitle, lastCaller.lineNumber(), lastCaller.sourceURL());
#endif
}
-void Console::profileEnd(const JSC::UString& title, ScriptCallStack* callStack)
+void Console::profileEnd(const String& title, ScriptCallStack* callStack)
{
Page* page = this->page();
if (!page)
@@ -354,19 +354,19 @@ void Console::profileEnd(const JSC::UString& title, ScriptCallStack* callStack)
if (!this->page())
return;
-#if ENABLE(INSPECTOR)
+#if ENABLE(INSPECTOR) && USE(JSC)
InspectorController* controller = page->inspectorController();
if (!controller->profilerEnabled())
return;
#endif
- RefPtr<JSC::Profile> profile = JSC::Profiler::profiler()->stopProfiling(callStack->state(), title);
+ RefPtr<ScriptProfile> profile = ScriptProfiler::stop(callStack->state(), title);
if (!profile)
return;
m_profiles.append(profile);
-#if ENABLE(INSPECTOR)
+#if ENABLE(INSPECTOR) && USE(JSC)
const ScriptCallFrame& lastCaller = callStack->at(0);
controller->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
#endif