Index: Source/core/frame/ConsoleBase.cpp |
diff --git a/Source/core/frame/ConsoleBase.cpp b/Source/core/frame/ConsoleBase.cpp |
index bec050533171b2a666d7567d52aefb4d318f8c23..6dd5b143d9c0249d62aa08fe07c8b3e81bec2f5e 100644 |
--- a/Source/core/frame/ConsoleBase.cpp |
+++ b/Source/core/frame/ConsoleBase.cpp |
@@ -103,7 +103,7 @@ void ConsoleBase::assertCondition(ScriptState* scriptState, PassRefPtrWillBeRawP |
void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> arguments) |
{ |
- RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStack(1)); |
+ RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(1)); |
kozyatinskiy1
2014/09/15 12:57:25
createScriptCallStack(1) is equivalent createScrip
sof
2014/09/15 13:09:32
Let me answer that with a question :) Why do you n
kozyatinskiy1
2014/09/15 13:31:29
Because in internalAddMessage in case of tracing m
sof
2014/09/15 13:44:18
I don't understand why you want to optimize this.
kozyatinskiy1
2014/09/15 14:18:21
We discussed this with @vsevik in patch: https://c
|
const ScriptCallFrame& lastCaller = callStack->at(0); |
// Follow Firebug's behavior of counting with null and undefined title in |
// the same bucket as no argument |
@@ -118,6 +118,7 @@ void ConsoleBase::count(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptA |
RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message); |
consoleMessage->setType(CountMessageType); |
consoleMessage->setScriptState(scriptState); |
+ consoleMessage->setCallStack(callStack.release()); |
reportMessageToConsole(consoleMessage.release()); |
} |
@@ -170,6 +171,7 @@ void ConsoleBase::timeEnd(ScriptState* scriptState, const String& title) |
RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message); |
consoleMessage->setType(TimeEndMessageType); |
consoleMessage->setScriptState(scriptState); |
+ consoleMessage->setCallStack(createScriptCallStackForConsole(1)); |
kozyatinskiy1
2014/09/15 12:57:25
I suppose we can replace createScriptCallStackForC
|
reportMessageToConsole(consoleMessage.release()); |
} |
@@ -220,9 +222,7 @@ void ConsoleBase::internalAddMessage(MessageType type, MessageLevel level, Scrip |
consoleMessage->setScriptArguments(arguments); |
size_t stackSize = printTrace ? ScriptCallStack::maxCallStackSizeToCapture : 1; |
- RefPtrWillBeRawPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(stackSize)); |
- consoleMessage->setCallStack(callStack); |
- |
+ consoleMessage->setCallStack(createScriptCallStackForConsole(stackSize)); |
reportMessageToConsole(consoleMessage.release()); |
} |