Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
| 6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 864 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) | 864 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) |
| 865 #undef GLOBAL_ARRAY_ACCESSOR | 865 #undef GLOBAL_ARRAY_ACCESSOR |
| 866 | 866 |
| 867 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ | 867 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ |
| 868 inline Handle<type> name(); \ | 868 inline Handle<type> name(); \ |
| 869 inline bool is_##name(type* value); | 869 inline bool is_##name(type* value); |
| 870 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) | 870 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) |
| 871 #undef NATIVE_CONTEXT_FIELD_ACCESSOR | 871 #undef NATIVE_CONTEXT_FIELD_ACCESSOR |
| 872 | 872 |
| 873 Bootstrapper* bootstrapper() { return bootstrapper_; } | 873 Bootstrapper* bootstrapper() { return bootstrapper_; } |
| 874 // Use for updating counters on a foreground thread. | |
| 874 Counters* counters() { | 875 Counters* counters() { |
| 875 // Call InitializeLoggingAndCounters() if logging is needed before | 876 DCHECK(!IsIsolateInBackground()); |
| 876 // the isolate is fully initialized. | 877 // Make sure InitializeCounters() has been called. |
| 877 DCHECK_NOT_NULL(counters_shared_.get()); | 878 DCHECK_NOT_NULL(counters_shared_.get()); |
| 878 return counters_shared_.get(); | 879 return counters_shared_.get(); |
| 879 } | 880 } |
| 880 std::shared_ptr<Counters> counters_shared() { return counters_shared_; } | 881 // Use for updating counters on a background thread. |
| 882 std::shared_ptr<Counters> counters_shared() { | |
|
Mircea Trofin
2017/06/22 18:42:24
nit: shared_counters?
kschimpf
2017/06/22 20:38:31
Actually, to make clear it's context, I'll rename
| |
| 883 DCHECK(!IsIsolateInBackground()); | |
| 884 // Make sure InitializeCounters() has been called. | |
| 885 DCHECK_NOT_NULL(counters_shared_.get()); | |
| 886 return counters_shared_; | |
| 887 } | |
| 881 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; } | 888 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; } |
| 882 CompilationCache* compilation_cache() { return compilation_cache_; } | 889 CompilationCache* compilation_cache() { return compilation_cache_; } |
| 883 Logger* logger() { | 890 Logger* logger() { |
| 884 // Call InitializeLoggingAndCounters() if logging is needed before | 891 // Call InitializeLoggingAndCounters() if logging is needed before |
| 885 // the isolate is fully initialized. | 892 // the isolate is fully initialized. |
| 886 DCHECK_NOT_NULL(logger_); | 893 DCHECK_NOT_NULL(logger_); |
| 887 return logger_; | 894 return logger_; |
| 888 } | 895 } |
| 889 StackGuard* stack_guard() { return &stack_guard_; } | 896 StackGuard* stack_guard() { return &stack_guard_; } |
| 890 Heap* heap() { return &heap_; } | 897 Heap* heap() { return &heap_; } |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1831 | 1838 |
| 1832 EmbeddedVector<char, 128> filename_; | 1839 EmbeddedVector<char, 128> filename_; |
| 1833 FILE* file_; | 1840 FILE* file_; |
| 1834 int scope_depth_; | 1841 int scope_depth_; |
| 1835 }; | 1842 }; |
| 1836 | 1843 |
| 1837 } // namespace internal | 1844 } // namespace internal |
| 1838 } // namespace v8 | 1845 } // namespace v8 |
| 1839 | 1846 |
| 1840 #endif // V8_ISOLATE_H_ | 1847 #endif // V8_ISOLATE_H_ |
| OLD | NEW |