| Index: runtime/vm/profiler.cc
|
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
|
| index d1d52b887ddfbbaeaf5122a46963658a489df7b8..cc6e6b8fc044cc983ccec44b0b1cf6df4c5639b5 100644
|
| --- a/runtime/vm/profiler.cc
|
| +++ b/runtime/vm/profiler.cc
|
| @@ -747,17 +747,19 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
|
| uword* stack_lower,
|
| uword* stack_upper) {
|
| ASSERT(thread != NULL);
|
| - Isolate* isolate = thread->isolate();
|
| - ASSERT(isolate != NULL);
|
| + OSThread* os_thread = thread->os_thread();
|
| + ASSERT(os_thread != NULL);
|
| ASSERT(stack_lower != NULL);
|
| ASSERT(stack_upper != NULL);
|
| #if defined(USING_SIMULATOR)
|
| const bool in_dart_code = thread->IsExecutingDartCode();
|
| if (in_dart_code) {
|
| + Isolate* isolate = thread->isolate();
|
| + ASSERT(isolate != NULL);
|
| Simulator* simulator = isolate->simulator();
|
| *stack_lower = simulator->StackBase();
|
| *stack_upper = simulator->StackTop();
|
| - } else if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper)) {
|
| + } else if (!os_thread->GetProfilerStackBounds(stack_lower, stack_upper)) {
|
| // Could not get stack boundary.
|
| return false;
|
| }
|
| @@ -765,7 +767,7 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
|
| return false;
|
| }
|
| #else
|
| - if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper) ||
|
| + if (!os_thread->GetProfilerStackBounds(stack_lower, stack_upper) ||
|
| (*stack_lower == 0) || (*stack_upper == 0)) {
|
| // Could not get stack boundary.
|
| return false;
|
| @@ -782,12 +784,12 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
|
| }
|
|
|
| if ((sp < *stack_lower) || (sp >= *stack_upper)) {
|
| - // Stack pointer is outside isolate stack boundary.
|
| + // Stack pointer is outside thread's stack boundary.
|
| return false;
|
| }
|
|
|
| if ((fp < *stack_lower) || (fp >= *stack_upper)) {
|
| - // Frame pointer is outside isolate stack boundary.
|
| + // Frame pointer is outside threads's stack boundary.
|
| return false;
|
| }
|
|
|
|
|