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

Unified Diff: include/v8.h

Issue 63693005: include: make HeapStatistics getters const correct
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index cb105ac3bf6be677efeceb167310a62838624ebf..465658e9b86b03a333563af916fb1a06a784ccf3 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3914,11 +3914,11 @@ typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags);
class V8_EXPORT HeapStatistics {
public:
HeapStatistics();
- size_t total_heap_size() { return total_heap_size_; }
- size_t total_heap_size_executable() { return total_heap_size_executable_; }
- size_t total_physical_size() { return total_physical_size_; }
- size_t used_heap_size() { return used_heap_size_; }
- size_t heap_size_limit() { return heap_size_limit_; }
+ V8_INLINE size_t total_heap_size() const;
+ V8_INLINE size_t total_heap_size_executable() const;
+ V8_INLINE size_t total_physical_size() const;
+ V8_INLINE size_t used_heap_size() const;
+ V8_INLINE size_t heap_size_limit() const;
private:
size_t total_heap_size_;
@@ -6494,6 +6494,31 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) {
}
+size_t HeapStatistics::total_heap_size() const {
+ return total_heap_size_;
+}
+
+
+size_t HeapStatistics::total_heap_size_executable() const {
+ return total_heap_size_executable_;
+}
+
+
+size_t HeapStatistics::total_physical_size() const {
+ return total_physical_size_;
+}
+
+
+size_t HeapStatistics::used_heap_size() const {
+ return used_heap_size_;
+}
+
+
+size_t HeapStatistics::heap_size_limit() const {
+ return heap_size_limit_;
+}
+
+
/**
* \example shell.cc
* A simple shell that takes a list of expressions on the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698