summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/page/Console.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-04-06 10:36:47 (GMT)
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-04-06 10:36:47 (GMT)
commitbb35b65bbfba82e0dd0ac306d3dab54436cdaff6 (patch)
tree8174cb262a960ff7b2e4aa8f1aaf154db71d2636 /src/3rdparty/webkit/WebCore/page/Console.cpp
parent4b27d0d887269583a0f76e922948f8c25e96ab88 (diff)
downloadQt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.zip
Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.gz
Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.bz2
Update src/3rdparty/webkit from trunk.
Imported from 839d8709327f925aacb3b6362c06152594def97e in branch qtwebkit-2.0 of repository git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit.git Rubber-stamped-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/Console.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/page/Console.cpp41
1 files changed, 27 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/Console.cpp b/src/3rdparty/webkit/WebCore/page/Console.cpp
index 7d0f697..99b3106 100644
--- a/src/3rdparty/webkit/WebCore/page/Console.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Console.cpp
@@ -30,6 +30,7 @@
#include "Console.h"
#include "CString.h"
+#include "Chrome.h"
#include "ChromeClient.h"
#include "ConsoleMessage.h"
#include "Frame.h"
@@ -40,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>
@@ -191,7 +190,7 @@ void Console::addMessage(MessageType type, MessageLevel level, ScriptCallStack*
for (unsigned i = 0; i < lastCaller.argumentCount(); ++i) {
String argAsString;
- if (lastCaller.argumentAt(i).getString(argAsString))
+ if (lastCaller.argumentAt(i).getString(callStack->state(), argAsString))
printf(" %s", argAsString.utf8().data());
}
printf("\n");
@@ -270,6 +269,23 @@ void Console::count(ScriptCallStack* callStack)
#endif
}
+void Console::markTimeline(ScriptCallStack* callStack)
+{
+#if ENABLE(INSPECTOR)
+ Page* page = this->page();
+ if (!page)
+ return;
+
+ const ScriptCallFrame& lastCaller = callStack->at(0);
+ String message;
+ getFirstArgumentAsString(callStack->state(), lastCaller, message);
+
+ page->inspectorController()->markTimeline(message);
+#else
+ UNUSED_PARAM(callStack);
+#endif
+}
+
#if ENABLE(WML)
String Console::lastWMLErrorMessage() const
{
@@ -298,7 +314,7 @@ String Console::lastWMLErrorMessage() const
#if ENABLE(JAVASCRIPT_DEBUGGER)
-void Console::profile(const JSC::UString& title, ScriptCallStack* callStack)
+void Console::profile(const String& title, ScriptCallStack* callStack)
{
Page* page = this->page();
if (!page)
@@ -311,15 +327,15 @@ void Console::profile(const JSC::UString& title, ScriptCallStack* callStack)
return;
#endif
- JSC::UString resolvedTitle = title;
- if (title.isNull()) // no title so give it the next user initiated profile title.
+ String resolvedTitle = title;
+ if (title.isNull()) // no title so give it the next user initiated profile title.
#if ENABLE(INSPECTOR)
resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
#else
resolvedTitle = "";
#endif
- JSC::Profiler::profiler()->startProfiling(callStack->state(), resolvedTitle);
+ ScriptProfiler::start(callStack->state(), resolvedTitle);
#if ENABLE(INSPECTOR)
const ScriptCallFrame& lastCaller = callStack->at(0);
@@ -327,22 +343,19 @@ void Console::profile(const JSC::UString& title, ScriptCallStack* callStack)
#endif
}
-void Console::profileEnd(const JSC::UString& title, ScriptCallStack* callStack)
+void Console::profileEnd(const String& title, ScriptCallStack* callStack)
{
Page* page = this->page();
if (!page)
return;
- if (!this->page())
- return;
-
#if ENABLE(INSPECTOR)
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;