Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index ed407e796b637af4072e6be69b85c8cd64fe86c0..aaf8c79e23256a12d4d3a7fe7bce939f9f604ff8 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -1311,18 +1311,19 @@ Address StubFailureTrampolineFrame::GetCallerStackPointer() const { |
Code* StubFailureTrampolineFrame::unchecked_code() const { |
- int i = 0; |
- for (; i <= StubFailureTrampolineStub::kMaxExtraExpressionStackCount; ++i) { |
- Code* trampoline; |
- StubFailureTrampolineStub(i).FindCodeInCache(&trampoline, isolate()); |
- ASSERT(trampoline != NULL); |
- Address current_pc = pc(); |
- Address code_start = trampoline->instruction_start(); |
- Address code_end = code_start + trampoline->instruction_size(); |
- if (code_start <= current_pc && current_pc < code_end) { |
- return trampoline; |
- } |
+ Code* trampoline; |
+ StubFailureTrampolineStub(NOT_JS_FUNCTION_STUB_MODE). |
+ FindCodeInCache(&trampoline, isolate()); |
+ if (trampoline->contains(pc())) { |
+ return trampoline; |
} |
+ |
+ StubFailureTrampolineStub(JS_FUNCTION_STUB_MODE). |
+ FindCodeInCache(&trampoline, isolate()); |
+ if (trampoline->contains(pc())) { |
+ return trampoline; |
+ } |
+ |
UNREACHABLE(); |
return NULL; |
} |