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

Unified Diff: runtime/vm/stack_frame.cc

Issue 1411703004: Pass Thread into StackFrameIterator (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« runtime/vm/stack_frame.h ('K') | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 4bb0858bee95c0f6f25f71b64efda5a0bcb972c7..3aead8622994494e0b3bc6f74550a36ff19cfcdf 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -271,7 +271,8 @@ bool StackFrame::IsValid() const {
void StackFrameIterator::SetupLastExitFrameData() {
- uword exit_marker = Thread::Current()->top_exit_frame_info();
+ ASSERT(thread_ != NULL);
+ uword exit_marker = thread_->top_exit_frame_info();
frames_.fp_ = exit_marker;
}
@@ -294,13 +295,16 @@ static void UnpoisonStack(Isolate* isolate, uword fp) {
}
-StackFrameIterator::StackFrameIterator(bool validate, Isolate* isolate)
+StackFrameIterator::StackFrameIterator(bool validate,
+ Isolate* isolate,
+ Thread* thread)
: validate_(validate),
entry_(isolate),
exit_(isolate),
frames_(isolate),
current_frame_(NULL),
- isolate_(isolate) {
+ isolate_(isolate),
+ thread_(thread) {
ASSERT((isolate_ == Isolate::Current()) ||
OS::AllowStackFrameIteratorFromAnotherThread());
SetupLastExitFrameData(); // Setup data for last exit frame.
@@ -308,13 +312,14 @@ StackFrameIterator::StackFrameIterator(bool validate, Isolate* isolate)
StackFrameIterator::StackFrameIterator(uword last_fp, bool validate,
- Isolate* isolate)
+ Isolate* isolate, Thread* thread)
: validate_(validate),
entry_(isolate),
exit_(isolate),
frames_(isolate),
current_frame_(NULL),
- isolate_(isolate) {
+ isolate_(isolate),
+ thread_(thread) {
ASSERT((isolate_ == Isolate::Current()) ||
OS::AllowStackFrameIteratorFromAnotherThread());
frames_.fp_ = last_fp;
@@ -324,13 +329,15 @@ StackFrameIterator::StackFrameIterator(uword last_fp, bool validate,
StackFrameIterator::StackFrameIterator(uword fp, uword sp, uword pc,
- bool validate, Isolate* isolate)
+ bool validate, Isolate* isolate,
+ Thread* thread)
: validate_(validate),
entry_(isolate),
exit_(isolate),
frames_(isolate),
current_frame_(NULL),
- isolate_(isolate) {
+ isolate_(isolate),
+ thread_(thread) {
ASSERT((isolate_ == Isolate::Current()) ||
OS::AllowStackFrameIteratorFromAnotherThread());
frames_.fp_ = fp;
« runtime/vm/stack_frame.h ('K') | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698