Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: src/deoptimizer.cc

Issue 1618343002: [interpreter, debugger] abstraction for source position calculation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assertion Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index abc8154d3545164a8699f1b809c0d511a1cfac68..f7791d210ec3c6dde23c3f060775a5b976412b47 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2508,7 +2508,8 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(Deoptimizer* deoptimizer,
// Get the source position using the unoptimized code.
Address pc = reinterpret_cast<Address>(output_frame->GetPc());
Code* code = Code::cast(deoptimizer->isolate()->FindCodeObject(pc));
- source_position_ = code->SourcePosition(pc);
+ int offset = static_cast<int>(pc - code->instruction_start());
+ source_position_ = code->SourcePosition(offset);
for (int i = 0; i < expression_count_; i++) {
Object* value = output_frame->GetExpression(i);
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698