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

Unified Diff: src/frames.cc

Issue 18062006: Revert r15361 "Improved function entry hook coverage" because of ARM build error. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index edd5ddde400ffff23572c9f38f032eba66ef6a91..0ca6991488464994be3300cf56e1ec47978036a4 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -43,8 +43,19 @@ namespace v8 {
namespace internal {
-ReturnAddressLocationResolver
- StackFrame::return_address_location_resolver_ = NULL;
+static ReturnAddressLocationResolver return_address_location_resolver = NULL;
+
+
+// Resolves pc_address through the resolution address function if one is set.
+static inline Address* ResolveReturnAddressLocation(Address* pc_address) {
+ if (return_address_location_resolver == NULL) {
+ return pc_address;
+ } else {
+ return reinterpret_cast<Address*>(
+ return_address_location_resolver(
+ reinterpret_cast<uintptr_t>(pc_address)));
+ }
+}
// Iterator that supports traversing the stack handlers of a
@@ -228,7 +239,7 @@ SafeStackFrameIterator::SafeStackFrameIterator(
ASSERT(fp != NULL);
state.fp = fp;
state.sp = sp;
- state.pc_address = StackFrame::ResolveReturnAddressLocation(
+ state.pc_address = ResolveReturnAddressLocation(
reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp)));
type = StackFrame::ComputeType(this, &state);
} else {
@@ -378,8 +389,8 @@ void StackFrame::IteratePc(ObjectVisitor* v,
void StackFrame::SetReturnAddressLocationResolver(
ReturnAddressLocationResolver resolver) {
- ASSERT(return_address_location_resolver_ == NULL);
- return_address_location_resolver_ = resolver;
+ ASSERT(return_address_location_resolver == NULL);
+ return_address_location_resolver = resolver;
}
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698