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

Unified Diff: src/debug/debug-frames.cc

Issue 2413693003: [wasm] Stack inspection support for asm.js frames (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | src/debug/mirrors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-frames.cc
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
index c98f911f754275a42f0b92d3d226106369b71f79..5da1656fadd9977f2ff012e8e32fe3463895c3a9 100644
--- a/src/debug/debug-frames.cc
+++ b/src/debug/debug-frames.cc
@@ -77,23 +77,11 @@ Handle<Object> FrameInspector::GetExpression(int index) {
: handle(frame_->GetExpression(index), isolate_);
}
-
int FrameInspector::GetSourcePosition() {
- if (is_optimized_) return deoptimized_frame_->GetSourcePosition();
- AbstractCode* code;
- int code_offset;
- if (is_interpreted_) {
- InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_);
- code = AbstractCode::cast(frame->GetBytecodeArray());
- code_offset = frame->GetBytecodeOffset();
- } else {
- code = AbstractCode::cast(frame_->LookupCode());
- code_offset = static_cast<int>(frame_->pc() - code->instruction_start());
- }
- return code->SourcePosition(code_offset);
+ return is_optimized_ ? deoptimized_frame_->GetSourcePosition()
+ : frame_->position();
}
-
bool FrameInspector::IsConstructor() {
return is_optimized_ && !is_bottommost_
? deoptimized_frame_->HasConstructStub()
« no previous file with comments | « no previous file | src/debug/mirrors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698