Index: Source/core/workers/WorkerConsole.cpp |
diff --git a/Source/core/workers/WorkerConsole.cpp b/Source/core/workers/WorkerConsole.cpp |
index 7991d2814f048c1e14e09bd2d476ac00f7cd1635..6227d9d6290d15d803b5363b6aa25a50b6392175 100644 |
--- a/Source/core/workers/WorkerConsole.cpp |
+++ b/Source/core/workers/WorkerConsole.cpp |
@@ -51,9 +51,11 @@ WorkerConsole::~WorkerConsole() |
void WorkerConsole::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage) |
{ |
- const ScriptCallFrame& lastCaller = consoleMessage->callStack()->at(0); |
- consoleMessage->setURL(lastCaller.sourceURL()); |
- consoleMessage->setLineNumber(lastCaller.lineNumber()); |
+ if (RefPtrWillBeRawPtr<ScriptCallStack> callStack = consoleMessage->callStack()) { |
+ const ScriptCallFrame& lastCaller = callStack->at(0); |
+ consoleMessage->setURL(lastCaller.sourceURL()); |
+ consoleMessage->setLineNumber(lastCaller.lineNumber()); |
+ } |
kozyatinskiy1
2014/09/15 12:57:25
We have two places where we call this function: Co
sof
2014/09/15 13:09:33
That seems quite brittle - by inference, we should
kozyatinskiy1
2014/09/15 13:31:29
Ok, I agree with you but in this case, it is diffi
|
m_scope->addConsoleMessage(consoleMessage); |
} |