0a5a8f17af
It was created to improve StackResource construction/destruction https://chromiumcodereview.appspot.com//10008030, but then StackResource constructor was refactored away from using BaseIsolate. TEST=ci Change-Id: Ie2e1ac1d04210032f33cbfd6c8e0827ac745e0b3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401540 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
31 lines
725 B
C++
31 lines
725 B
C++
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/thread_stack_resource.h"
|
|
|
|
#include "platform/assert.h"
|
|
#include "vm/isolate.h"
|
|
#include "vm/thread.h"
|
|
#include "vm/zone.h"
|
|
|
|
namespace dart {
|
|
|
|
ThreadStackResource::~ThreadStackResource() {
|
|
#if defined(DEBUG)
|
|
if (thread() != nullptr) {
|
|
ASSERT(isolate() == Isolate::Current());
|
|
}
|
|
#endif
|
|
}
|
|
|
|
Isolate* ThreadStackResource::isolate() const {
|
|
return thread()->isolate();
|
|
}
|
|
|
|
IsolateGroup* ThreadStackResource::isolate_group() const {
|
|
return thread()->isolate_group();
|
|
}
|
|
|
|
} // namespace dart
|