Improve performance of Error.stack when stack contains local functions.

BUG=http://crbug.com/53303
TEST=Use the test case attached in the bug report.

Patch by Xianzhu Wang <wangxianzhu@google.com>

Review URL: http://codereview.chromium.org/3167042


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2010-09-06 09:10:11 +00:00
parent d59bb82f1f
commit aa48d61c2b

View File

@ -831,11 +831,11 @@ function FormatSourcePosition(frame) {
}
var line = "";
var functionName = frame.getFunction().name;
var methodName = frame.getMethodName();
var addPrefix = true;
var isConstructor = frame.isConstructor();
var isMethodCall = !(frame.isToplevel() || isConstructor);
if (isMethodCall) {
var methodName = frame.getMethodName();
line += frame.getTypeName() + ".";
if (functionName) {
line += functionName;