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

Side by Side Diff: src/isolate.h

Issue 2961443002: Remove DCHECK for isolate->counters() (Closed)
Patch Set: Created 3 years, 5 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 | « src/counters.cc ('k') | src/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 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) 842 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR)
843 #undef GLOBAL_ARRAY_ACCESSOR 843 #undef GLOBAL_ARRAY_ACCESSOR
844 844
845 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ 845 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
846 inline Handle<type> name(); \ 846 inline Handle<type> name(); \
847 inline bool is_##name(type* value); 847 inline bool is_##name(type* value);
848 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) 848 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR)
849 #undef NATIVE_CONTEXT_FIELD_ACCESSOR 849 #undef NATIVE_CONTEXT_FIELD_ACCESSOR
850 850
851 Bootstrapper* bootstrapper() { return bootstrapper_; } 851 Bootstrapper* bootstrapper() { return bootstrapper_; }
852 Counters* counters() { 852 // Use for updating counters on a foreground thread.
853 // Call InitializeLoggingAndCounters() if logging is needed before 853 Counters* counters() { return async_counters().get(); }
854 // the isolate is fully initialized. 854 // Use for updating counters on a background thread.
855 DCHECK_NOT_NULL(counters_shared_.get()); 855 const std::shared_ptr<Counters>& async_counters() {
856 return counters_shared_.get(); 856 // Make sure InitializeCounters() has been called.
857 DCHECK_NOT_NULL(async_counters_.get());
858 return async_counters_;
857 } 859 }
858 std::shared_ptr<Counters> counters_shared() { return counters_shared_; }
859 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; } 860 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; }
860 CompilationCache* compilation_cache() { return compilation_cache_; } 861 CompilationCache* compilation_cache() { return compilation_cache_; }
861 Logger* logger() { 862 Logger* logger() {
862 // Call InitializeLoggingAndCounters() if logging is needed before 863 // Call InitializeLoggingAndCounters() if logging is needed before
863 // the isolate is fully initialized. 864 // the isolate is fully initialized.
864 DCHECK_NOT_NULL(logger_); 865 DCHECK_NOT_NULL(logger_);
865 return logger_; 866 return logger_;
866 } 867 }
867 StackGuard* stack_guard() { return &stack_guard_; } 868 StackGuard* stack_guard() { return &stack_guard_; }
868 Heap* heap() { return &heap_; } 869 Heap* heap() { return &heap_; }
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 CpuProfiler* cpu_profiler() const { return cpu_profiler_; } 1415 CpuProfiler* cpu_profiler() const { return cpu_profiler_; }
1415 1416
1416 base::Atomic32 id_; 1417 base::Atomic32 id_;
1417 EntryStackItem* entry_stack_; 1418 EntryStackItem* entry_stack_;
1418 int stack_trace_nesting_level_; 1419 int stack_trace_nesting_level_;
1419 StringStream* incomplete_message_; 1420 StringStream* incomplete_message_;
1420 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT 1421 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
1421 Bootstrapper* bootstrapper_; 1422 Bootstrapper* bootstrapper_;
1422 RuntimeProfiler* runtime_profiler_; 1423 RuntimeProfiler* runtime_profiler_;
1423 CompilationCache* compilation_cache_; 1424 CompilationCache* compilation_cache_;
1424 std::shared_ptr<Counters> counters_shared_; 1425 std::shared_ptr<Counters> async_counters_;
1425 base::RecursiveMutex break_access_; 1426 base::RecursiveMutex break_access_;
1426 Logger* logger_; 1427 Logger* logger_;
1427 StackGuard stack_guard_; 1428 StackGuard stack_guard_;
1428 StubCache* load_stub_cache_; 1429 StubCache* load_stub_cache_;
1429 StubCache* store_stub_cache_; 1430 StubCache* store_stub_cache_;
1430 CodeAgingHelper* code_aging_helper_; 1431 CodeAgingHelper* code_aging_helper_;
1431 DeoptimizerData* deoptimizer_data_; 1432 DeoptimizerData* deoptimizer_data_;
1432 bool deoptimizer_lazy_throw_; 1433 bool deoptimizer_lazy_throw_;
1433 MaterializedObjectStore* materialized_object_store_; 1434 MaterializedObjectStore* materialized_object_store_;
1434 ThreadLocalTop thread_local_top_; 1435 ThreadLocalTop thread_local_top_;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 1810
1810 EmbeddedVector<char, 128> filename_; 1811 EmbeddedVector<char, 128> filename_;
1811 FILE* file_; 1812 FILE* file_;
1812 int scope_depth_; 1813 int scope_depth_;
1813 }; 1814 };
1814 1815
1815 } // namespace internal 1816 } // namespace internal
1816 } // namespace v8 1817 } // namespace v8
1817 1818
1818 #endif // V8_ISOLATE_H_ 1819 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/counters.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698