| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index 3bf4c93e39893bba2031a58dd984e9ba450603c1..227fa67d54b2ba854a2682c890a8ae6bc4efe9a5 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -520,6 +520,31 @@ void JavaScriptFrame::Print(StringStream* accumulator,
|
| Code* code = NULL;
|
| if (IsConstructor()) accumulator->Add("new ");
|
| accumulator->PrintFunction(function, receiver, &code);
|
| +
|
| + if (function->IsJSFunction()) {
|
| + Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared());
|
| + Object* script_obj = shared->script();
|
| + if (script_obj->IsScript()) {
|
| + Handle<Script> script(Script::cast(script_obj));
|
| + accumulator->Add(" [");
|
| + accumulator->PrintName(script->name());
|
| +
|
| + Address pc = this->pc();
|
| + if (code != NULL && code->kind() == Code::FUNCTION &&
|
| + pc >= code->instruction_start() && pc < code->relocation_start()) {
|
| + int source_pos = code->SourcePosition(pc);
|
| + int line = GetScriptLineNumberSafe(script, source_pos) + 1;
|
| + accumulator->Add(":%d", line);
|
| + } else {
|
| + int function_start_pos = shared->start_position();
|
| + int line = GetScriptLineNumberSafe(script, function_start_pos) + 1;
|
| + accumulator->Add(":~%d", line);
|
| + }
|
| +
|
| + accumulator->Add("] ");
|
| + }
|
| + }
|
| +
|
| accumulator->Add("(this=%o", receiver);
|
|
|
| // Get scope information for nicer output, if possible. If code is
|
|
|