1 | // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file |
---|---|
2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #include "vm/thread_stack_resource.h" |
6 | |
7 | #include "platform/assert.h" |
8 | #include "vm/isolate.h" |
9 | #include "vm/thread.h" |
10 | #include "vm/zone.h" |
11 | |
12 | namespace dart { |
13 | |
14 | ThreadStackResource::~ThreadStackResource() { |
15 | #if defined(DEBUG) |
16 | if (thread() != nullptr) { |
17 | BaseIsolate::AssertCurrent(reinterpret_cast<BaseIsolate*>(isolate())); |
18 | } |
19 | #endif |
20 | } |
21 | |
22 | Isolate* ThreadStackResource::isolate() const { |
23 | return thread()->isolate(); |
24 | } |
25 | |
26 | IsolateGroup* ThreadStackResource::isolate_group() const { |
27 | return thread()->isolate_group(); |
28 | } |
29 | |
30 | } // namespace dart |
31 |