Reviewers: ,

Description:
include: make HeapStatistics getters const correct

Please review this at https://codereview.chromium.org/63693005/

Affected files (+30, -5 lines):
  M include/v8.h


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


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to