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

Side by Side Diff: runtime/vm/dart.cc

Issue 1397883007: Don't cleanup thread list mutex until VM shutdown is clean (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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Set the VM isolate as current isolate. 249 // Set the VM isolate as current isolate.
250 Thread::EnsureInit(); 250 Thread::EnsureInit();
251 Thread::EnterIsolate(vm_isolate_); 251 Thread::EnterIsolate(vm_isolate_);
252 252
253 ShutdownIsolate(); 253 ShutdownIsolate();
254 vm_isolate_ = NULL; 254 vm_isolate_ = NULL;
255 ASSERT(Isolate::IsolateListLength() == 0); 255 ASSERT(Isolate::IsolateListLength() == 0);
256 256
257 TargetCPUFeatures::Cleanup(); 257 TargetCPUFeatures::Cleanup();
258 StoreBuffer::ShutDown(); 258 StoreBuffer::ShutDown();
259
260 Thread::Shutdown();
259 } else { 261 } else {
260 // Shutdown the service isolate. 262 // Shutdown the service isolate.
261 ServiceIsolate::Shutdown(); 263 ServiceIsolate::Shutdown();
262 } 264 }
263 265
264 CodeObservers::DeleteAll(); 266 CodeObservers::DeleteAll();
265 Timeline::Shutdown(); 267 Timeline::Shutdown();
266 Metric::Cleanup(); 268 Metric::Cleanup();
267 269
268 Thread::Shutdown();
269
270 return NULL; 270 return NULL;
271 } 271 }
272 272
273 273
274 Isolate* Dart::CreateIsolate(const char* name_prefix, 274 Isolate* Dart::CreateIsolate(const char* name_prefix,
275 const Dart_IsolateFlags& api_flags) { 275 const Dart_IsolateFlags& api_flags) {
276 // Create a new isolate. 276 // Create a new isolate.
277 Isolate* isolate = Isolate::Init(name_prefix, api_flags); 277 Isolate* isolate = Isolate::Init(name_prefix, api_flags);
278 return isolate; 278 return isolate;
279 } 279 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 return predefined_handles_->handles_.IsValidScopedHandle(address); 421 return predefined_handles_->handles_.IsValidScopedHandle(address);
422 } 422 }
423 423
424 424
425 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 425 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
426 ASSERT(predefined_handles_ != NULL); 426 ASSERT(predefined_handles_ != NULL);
427 return predefined_handles_->api_handles_.IsValidHandle(handle); 427 return predefined_handles_->api_handles_.IsValidHandle(handle);
428 } 428 }
429 429
430 } // namespace dart 430 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698