summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-02-02 10:21:27 +0000
committerBen Murdoch <benm@google.com>2010-02-02 10:21:27 +0000
commit22ff7dd8d1b59441735a8c7a0fe8af07fcafb6a8 (patch)
treec4d541102f66b2404e6c265ff8bf1d131c2642ac /WebCore
parent0647d20051006653118db0903488325680beeb52 (diff)
downloadexternal_webkit-22ff7dd8d1b59441735a8c7a0fe8af07fcafb6a8.zip
external_webkit-22ff7dd8d1b59441735a8c7a0fe8af07fcafb6a8.tar.gz
external_webkit-22ff7dd8d1b59441735a8c7a0fe8af07fcafb6a8.tar.bz2
Cherry pick of WebKit revision r54138 (http://trac.webkit.org/changeset/54138) to add source and line number information to ScriptCallFrames when the caller is unknown.
BUG=2376873 Change-Id: I91346705b9c24cf7862070685bf3830d2a18f12e
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/bindings/js/ScriptCallStack.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/bindings/js/ScriptCallStack.cpp b/WebCore/bindings/js/ScriptCallStack.cpp
index 824a07b..a435588 100644
--- a/WebCore/bindings/js/ScriptCallStack.cpp
+++ b/WebCore/bindings/js/ScriptCallStack.cpp
@@ -54,14 +54,15 @@ ScriptCallStack::ScriptCallStack(ExecState* exec, const ArgList& args, unsigned
exec->interpreter()->retrieveLastCaller(exec, signedLineNumber, sourceID, urlString, function);
+ unsigned lineNumber = signedLineNumber >= 0 ? signedLineNumber : 0;
+
if (function) {
m_caller = asInternalFunction(function);
- unsigned lineNumber = signedLineNumber >= 0 ? signedLineNumber : 0;
m_frames.append(ScriptCallFrame(m_caller->name(m_exec), urlString, lineNumber, args, skipArgumentCount));
} else {
// Caller is unknown, but we should still add the frame, because
// something called us, and gave us arguments.
- m_frames.append(ScriptCallFrame(UString(), UString(), 0, args, skipArgumentCount));
+ m_frames.append(ScriptCallFrame(UString(), urlString, lineNumber, args, skipArgumentCount));
}
}