Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 525ccec5bab91ee5be43811162396fd7c322672c..682eb535cefdf491e896d13020826835a077e655 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -1603,7 +1603,11 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo( |
SetFunction(output_frame->GetFunction()); |
expression_count_ = output_frame->GetExpressionCount(); |
expression_stack_ = new Object*[expression_count_]; |
- pc_ = output_frame->GetPc(); |
+ // Get the source position using the unoptimized code. |
+ Address pc = reinterpret_cast<Address>(output_frame->GetPc()); |
+ Code* code = Code::cast(Isolate::Current()->heap()->FindCodeObject(pc)); |
+ source_position_ = code->SourcePosition(pc); |
+ |
for (int i = 0; i < expression_count_; i++) { |
SetExpression(i, output_frame->GetExpression(i)); |
} |
@@ -1626,6 +1630,7 @@ DeoptimizedFrameInfo::~DeoptimizedFrameInfo() { |
delete[] parameters_; |
} |
+ |
void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
v->VisitPointer(BitCast<Object**>(&function_)); |
v->VisitPointers(parameters_, parameters_ + parameters_count_); |