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

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

Issue 1299493007: Rework service extensions to be safe (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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 VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 return deoptimized_code_array_; 700 return deoptimized_code_array_;
701 } 701 }
702 void set_deoptimized_code_array(const GrowableObjectArray& value); 702 void set_deoptimized_code_array(const GrowableObjectArray& value);
703 void TrackDeoptimizedCode(const Code& code); 703 void TrackDeoptimizedCode(const Code& code);
704 704
705 bool compilation_allowed() const { return compilation_allowed_; } 705 bool compilation_allowed() const { return compilation_allowed_; }
706 void set_compilation_allowed(bool allowed) { 706 void set_compilation_allowed(bool allowed) {
707 compilation_allowed_ = allowed; 707 compilation_allowed_ = allowed;
708 } 708 }
709 709
710 RawObject* InvokePendingExtensionCalls();
711 void AppendExtensionCall(const Instance& closure);
712
710 #if defined(DEBUG) 713 #if defined(DEBUG)
711 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ 714 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \
712 void set_reusable_##object##_handle_scope_active(bool value) { \ 715 void set_reusable_##object##_handle_scope_active(bool value) { \
713 reusable_##object##_handle_scope_active_ = value; \ 716 reusable_##object##_handle_scope_active_ = value; \
714 } \ 717 } \
715 bool reusable_##object##_handle_scope_active() const { \ 718 bool reusable_##object##_handle_scope_active() const { \
716 return reusable_##object##_handle_scope_active_; \ 719 return reusable_##object##_handle_scope_active_; \
717 } 720 }
718 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) 721 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS)
719 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS 722 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 // Visit all object pointers. Caller must ensure concurrent sweeper is not 766 // Visit all object pointers. Caller must ensure concurrent sweeper is not
764 // running, and the visitor must not allocate. 767 // running, and the visitor must not allocate.
765 void VisitObjectPointers(ObjectPointerVisitor* visitor, 768 void VisitObjectPointers(ObjectPointerVisitor* visitor,
766 bool visit_prologue_weak_persistent_handles, 769 bool visit_prologue_weak_persistent_handles,
767 bool validate_frames); 770 bool validate_frames);
768 771
769 void set_user_tag(uword tag) { 772 void set_user_tag(uword tag) {
770 user_tag_ = tag; 773 user_tag_ = tag;
771 } 774 }
772 775
776 RawGrowableObjectArray* GetAndClearPendingExtensionCalls();
777 RawGrowableObjectArray* pending_extension_calls() const {
778 return pending_extension_calls_;
779 }
780 void set_pending_extension_calls(const GrowableObjectArray& value);
781
773 void ClearMutatorThread() { 782 void ClearMutatorThread() {
774 mutator_thread_ = NULL; 783 mutator_thread_ = NULL;
775 } 784 }
776 void MakeCurrentThreadMutator(Thread* thread) { 785 void MakeCurrentThreadMutator(Thread* thread) {
777 ASSERT(thread == Thread::Current()); 786 ASSERT(thread == Thread::Current());
778 DEBUG_ASSERT(IsIsolateOf(thread)); 787 DEBUG_ASSERT(IsIsolateOf(thread));
779 mutator_thread_ = thread; 788 mutator_thread_ = thread;
780 } 789 }
781 #if defined(DEBUG) 790 #if defined(DEBUG)
782 bool IsIsolateOf(Thread* thread); 791 bool IsIsolateOf(Thread* thread);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 863
855 VMTagCounters vm_tag_counters_; 864 VMTagCounters vm_tag_counters_;
856 uword user_tag_; 865 uword user_tag_;
857 RawGrowableObjectArray* tag_table_; 866 RawGrowableObjectArray* tag_table_;
858 RawUserTag* current_tag_; 867 RawUserTag* current_tag_;
859 RawUserTag* default_tag_; 868 RawUserTag* default_tag_;
860 869
861 RawGrowableObjectArray* collected_closures_; 870 RawGrowableObjectArray* collected_closures_;
862 RawGrowableObjectArray* deoptimized_code_array_; 871 RawGrowableObjectArray* deoptimized_code_array_;
863 872
873 RawGrowableObjectArray* pending_extension_calls_;
874
864 Metric* metrics_list_head_; 875 Metric* metrics_list_head_;
865 876
866 Counters counters_; 877 Counters counters_;
867 878
868 bool compilation_allowed_; 879 bool compilation_allowed_;
869 880
870 // TODO(23153): Move this out of Isolate/Thread. 881 // TODO(23153): Move this out of Isolate/Thread.
871 CHA* cha_; 882 CHA* cha_;
872 883
873 // Isolate list next pointer. 884 // Isolate list next pointer.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 uint8_t* serialized_message_; 1086 uint8_t* serialized_message_;
1076 intptr_t serialized_message_len_; 1087 intptr_t serialized_message_len_;
1077 Isolate::Flags isolate_flags_; 1088 Isolate::Flags isolate_flags_;
1078 bool paused_; 1089 bool paused_;
1079 bool errors_are_fatal_; 1090 bool errors_are_fatal_;
1080 }; 1091 };
1081 1092
1082 } // namespace dart 1093 } // namespace dart
1083 1094
1084 #endif // VM_ISOLATE_H_ 1095 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/isolate.cc » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698