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

Side by Side Diff: runtime/vm/isolate.h

Issue 2720723005: VM: Fix an app-jit related shutdown race. (Closed)
Patch Set: Created 3 years, 9 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 | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.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 #ifndef RUNTIME_VM_ISOLATE_H_ 5 #ifndef RUNTIME_VM_ISOLATE_H_
6 #define RUNTIME_VM_ISOLATE_H_ 6 #define RUNTIME_VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 return create_callback_; 392 return create_callback_;
393 } 393 }
394 394
395 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) { 395 static void SetShutdownCallback(Dart_IsolateShutdownCallback cb) {
396 shutdown_callback_ = cb; 396 shutdown_callback_ = cb;
397 } 397 }
398 static Dart_IsolateShutdownCallback ShutdownCallback() { 398 static Dart_IsolateShutdownCallback ShutdownCallback() {
399 return shutdown_callback_; 399 return shutdown_callback_;
400 } 400 }
401 401
402 static void SetCleanupCallback(Dart_IsolateCleanupCallback cb) {
403 cleanup_callback_ = cb;
404 }
405 static Dart_IsolateCleanupCallback CleanupCallback() {
406 return cleanup_callback_;
407 }
408
409
402 void set_object_id_ring(ObjectIdRing* ring) { object_id_ring_ = ring; } 410 void set_object_id_ring(ObjectIdRing* ring) { object_id_ring_ = ring; }
403 ObjectIdRing* object_id_ring() { return object_id_ring_; } 411 ObjectIdRing* object_id_ring() { return object_id_ring_; }
404 412
405 void AddPendingDeopt(uword fp, uword pc); 413 void AddPendingDeopt(uword fp, uword pc);
406 uword FindPendingDeopt(uword fp) const; 414 uword FindPendingDeopt(uword fp) const;
407 void ClearPendingDeoptsAtOrBelow(uword fp) const; 415 void ClearPendingDeoptsAtOrBelow(uword fp) const;
408 MallocGrowableArray<PendingLazyDeopt>* pending_deopts() const { 416 MallocGrowableArray<PendingLazyDeopt>* pending_deopts() const {
409 return pending_deopts_; 417 return pending_deopts_;
410 } 418 }
411 bool IsDeoptimizing() const { return deopt_context_ != NULL; } 419 bool IsDeoptimizing() const { return deopt_context_ != NULL; }
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 intptr_t reload_every_n_stack_overflow_checks_; 852 intptr_t reload_every_n_stack_overflow_checks_;
845 IsolateReloadContext* reload_context_; 853 IsolateReloadContext* reload_context_;
846 int64_t last_reload_timestamp_; 854 int64_t last_reload_timestamp_;
847 // Should we pause in the debug message loop after this request? 855 // Should we pause in the debug message loop after this request?
848 bool should_pause_post_service_request_; 856 bool should_pause_post_service_request_;
849 857
850 HandlerInfoCache handler_info_cache_; 858 HandlerInfoCache handler_info_cache_;
851 859
852 static Dart_IsolateCreateCallback create_callback_; 860 static Dart_IsolateCreateCallback create_callback_;
853 static Dart_IsolateShutdownCallback shutdown_callback_; 861 static Dart_IsolateShutdownCallback shutdown_callback_;
862 static Dart_IsolateCleanupCallback cleanup_callback_;
854 863
855 static void WakePauseEventHandler(Dart_Isolate isolate); 864 static void WakePauseEventHandler(Dart_Isolate isolate);
856 865
857 // Manage list of existing isolates. 866 // Manage list of existing isolates.
858 static bool AddIsolateToList(Isolate* isolate); 867 static bool AddIsolateToList(Isolate* isolate);
859 static void RemoveIsolateFromList(Isolate* isolate); 868 static void RemoveIsolateFromList(Isolate* isolate);
860 869
861 // This monitor protects isolates_list_head_, and creation_enabled_. 870 // This monitor protects isolates_list_head_, and creation_enabled_.
862 static Monitor* isolates_list_monitor_; 871 static Monitor* isolates_list_monitor_;
863 static Isolate* isolates_list_head_; 872 static Isolate* isolates_list_head_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 intptr_t* spawn_count_; 1014 intptr_t* spawn_count_;
1006 1015
1007 Dart_IsolateFlags isolate_flags_; 1016 Dart_IsolateFlags isolate_flags_;
1008 bool paused_; 1017 bool paused_;
1009 bool errors_are_fatal_; 1018 bool errors_are_fatal_;
1010 }; 1019 };
1011 1020
1012 } // namespace dart 1021 } // namespace dart
1013 1022
1014 #endif // RUNTIME_VM_ISOLATE_H_ 1023 #endif // RUNTIME_VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698