| Index: runtime/vm/allocation.cc
|
| diff --git a/runtime/vm/allocation.cc b/runtime/vm/allocation.cc
|
| index 6353cc8f5b8a2587120189c3a54a7e8a3ddc094d..93ee9d065198f5e1799cb853dd88c501446553fa 100644
|
| --- a/runtime/vm/allocation.cc
|
| +++ b/runtime/vm/allocation.cc
|
| @@ -19,18 +19,15 @@ static void* Allocate(uword size, Zone* zone) {
|
| return reinterpret_cast<void*>(zone->AllocUnsafe(size));
|
| }
|
|
|
| -
|
| void* ZoneAllocated::operator new(uword size) {
|
| return Allocate(size, Thread::Current()->zone());
|
| }
|
|
|
| -
|
| void* ZoneAllocated::operator new(uword size, Zone* zone) {
|
| ASSERT(Thread::Current()->ZoneIsOwnedByThread(zone));
|
| return Allocate(size, zone);
|
| }
|
|
|
| -
|
| StackResource::~StackResource() {
|
| if (thread_ != NULL) {
|
| StackResource* top = thread_->top_resource();
|
| @@ -45,12 +42,10 @@ StackResource::~StackResource() {
|
| #endif
|
| }
|
|
|
| -
|
| Isolate* StackResource::isolate() const {
|
| return thread_ == NULL ? NULL : thread_->isolate();
|
| }
|
|
|
| -
|
| void StackResource::Init(Thread* thread) {
|
| // We can only have longjumps and exceptions when there is a current
|
| // thread and isolate. If there is no current thread, we don't need to
|
| @@ -65,7 +60,6 @@ void StackResource::Init(Thread* thread) {
|
| }
|
| }
|
|
|
| -
|
| void StackResource::UnwindAbove(Thread* thread, StackResource* new_top) {
|
| StackResource* current_resource = thread->top_resource();
|
| while (current_resource != new_top) {
|
| @@ -74,13 +68,11 @@ void StackResource::UnwindAbove(Thread* thread, StackResource* new_top) {
|
| }
|
| }
|
|
|
| -
|
| #if defined(DEBUG)
|
| NoSafepointScope::NoSafepointScope() : StackResource(Thread::Current()) {
|
| thread()->IncrementNoSafepointScopeDepth();
|
| }
|
|
|
| -
|
| NoSafepointScope::~NoSafepointScope() {
|
| thread()->DecrementNoSafepointScopeDepth();
|
| }
|
|
|