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

Unified Diff: src/frames.cc

Issue 73020: Implemented "no heap access" mode for JSFrame which is used for stack sampling in profiler. (Closed)
Patch Set: Renamings as Soeren suggested 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
« src/frames.h ('K') | « 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 a9bbbede388f9197193412287781fa45b918c9e6..88c723d6932d2eabae3a1bfd86c1604c81fa9d15 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -86,6 +86,7 @@ StackFrameIterator::StackFrameIterator(bool use_top, Address fp, Address sp)
if (use_top || fp != NULL) {
Reset();
}
+ JavaScriptFrame_.DisableHeapAccess();
}
#undef INITIALIZE_SINGLETON
@@ -231,11 +232,7 @@ bool SafeStackFrameIterator::CanIterateHandles(StackFrame* frame,
bool SafeStackFrameIterator::IsValidFrame(StackFrame* frame) const {
- 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());
+ return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp());
}
@@ -281,7 +278,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_at_function()) Advance();
+ if (!done() && !frame()->is_java_script()) Advance();
}
@@ -289,7 +286,7 @@ void SafeStackTraceFrameIterator::Advance() {
while (true) {
SafeJavaScriptFrameIterator::Advance();
if (done()) return;
- if (frame()->is_at_function()) return;
+ if (frame()->is_java_script()) return;
}
}
#endif
« src/frames.h ('K') | « src/frames.h ('k') | src/frames-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698