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

Unified Diff: src/frames.cc

Issue 62146: Add name inference for anonymous functions to facilitate debugging and profiling of JS code. (Closed)
Patch Set: updated v8_base_arm project Created 11 years, 8 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-arm.cc » ('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 88c723d6932d2eabae3a1bfd86c1604c81fa9d15..a9bbbede388f9197193412287781fa45b918c9e6 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -86,7 +86,6 @@ StackFrameIterator::StackFrameIterator(bool use_top, Address fp, Address sp)
if (use_top || fp != NULL) {
Reset();
}
- JavaScriptFrame_.DisableHeapAccess();
}
#undef INITIALIZE_SINGLETON
@@ -232,7 +231,11 @@ bool SafeStackFrameIterator::CanIterateHandles(StackFrame* frame,
bool SafeStackFrameIterator::IsValidFrame(StackFrame* frame) const {
- return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp());
+ return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp()) &&
+ // JavaScriptFrame uses function shared info to advance, hence it must
+ // point to a valid function object.
+ (!frame->is_java_script() ||
+ reinterpret_cast<JavaScriptFrame*>(frame)->is_at_function());
}
@@ -278,7 +281,7 @@ void SafeStackFrameIterator::Reset() {
SafeStackTraceFrameIterator::SafeStackTraceFrameIterator(
Address fp, Address sp, Address low_bound, Address high_bound) :
SafeJavaScriptFrameIterator(fp, sp, low_bound, high_bound) {
- if (!done() && !frame()->is_java_script()) Advance();
+ if (!done() && !frame()->is_at_function()) Advance();
}
@@ -286,7 +289,7 @@ void SafeStackTraceFrameIterator::Advance() {
while (true) {
SafeJavaScriptFrameIterator::Advance();
if (done()) return;
- if (frame()->is_java_script()) return;
+ if (frame()->is_at_function()) return;
}
}
#endif
« no previous file with comments | « src/frames.h ('k') | src/frames-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698