Index: src/profiler/profiler-listener.cc |
diff --git a/src/profiler/profiler-listener.cc b/src/profiler/profiler-listener.cc |
index 1612a539a3bf9debaf7b71971dec467435c2b1f5..7ce874e6c1ef82dcdd927252095ba9856ba3f561 100644 |
--- a/src/profiler/profiler-listener.cc |
+++ b/src/profiler/profiler-listener.cc |
@@ -283,7 +283,15 @@ void ProfilerListener::RecordDeoptInlinedFrames(CodeEntry* entry, |
it.Next(); // Skip height |
SharedFunctionInfo* shared = SharedFunctionInfo::cast( |
deopt_input_data->LiteralArray()->get(shared_info_id)); |
- int source_position = Deoptimizer::ComputeSourcePosition(shared, ast_id); |
+ int source_position; |
+ if (opcode == Translation::INTERPRETED_FRAME) { |
+ source_position = |
+ Deoptimizer::ComputeSourcePositionFromBytecodeArray(shared, ast_id); |
+ } else { |
+ DCHECK(opcode == Translation::JS_FRAME); |
+ source_position = |
+ Deoptimizer::ComputeSourcePositionFromBaselineCode(shared, ast_id); |
+ } |
int script_id = v8::UnboundScript::kNoScriptId; |
if (shared->script()->IsScript()) { |
Script* script = Script::cast(shared->script()); |