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

Unified Diff: src/extensions/statistics-extension.cc

Issue 79963003: Fix Windows build (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698