Reviewers: Sven Panne,

Message:
PTAL.

Description:
Fix Windows build

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

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+11, -3 lines):
  M src/extensions/statistics-extension.cc
  M src/heap.h


Index: src/extensions/statistics-extension.cc
diff --git a/src/extensions/statistics-extension.cc b/src/extensions/statistics-extension.cc index 651d99d45261776f5bf9d1f38fb53ad76d41c5b9..586b2e37cff49b32c17290174fe8d0d7db49c8cd 100644
--- a/src/extensions/statistics-extension.cc
+++ b/src/extensions/statistics-extension.cc
@@ -58,6 +58,14 @@ static void AddNumber(v8::Local<v8::Object> object,
 }


+static void AddNumber64(v8::Local<v8::Object> object,
+                        int64_t value,
+                        const char* name) {
+  object->Set(v8::String::New(name),
+              v8::Number::New(static_cast<double>(value)));
+}
+
+
 void StatisticsExtension::GetCounters(
     const v8::FunctionCallbackInfo<v8::Value>& args) {
   Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate());
@@ -145,8 +153,8 @@ void StatisticsExtension::GetCounters(
             "lo_space_available_bytes");
   AddNumber(result, heap->lo_space()->CommittedMemory(),
             "lo_space_commited_bytes");
-  AddNumber(result, heap->amount_of_external_allocated_memory(),
-            "amount_of_external_allocated_memory");
+  AddNumber64(result, heap->amount_of_external_allocated_memory(),
+              "amount_of_external_allocated_memory");
   args.GetReturnValue().Set(result);
 }

Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 57c0f56425a37cc750e05ffe55c8c8391752705e..ee01c22a508107bc541ca23c38f4f07dfd3446af 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1783,7 +1783,7 @@ class Heap {

   bool flush_monomorphic_ics() { return flush_monomorphic_ics_; }

-  intptr_t amount_of_external_allocated_memory() {
+  int64_t amount_of_external_allocated_memory() {
     return amount_of_external_allocated_memory_;
   }



--
--
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