summaryrefslogtreecommitdiff
path: root/lib/v8.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2015-01-21 11:36:59 -0500
committercjihrig <cjihrig@gmail.com>2015-01-21 16:21:31 -0500
commit804e7aa9ab0b34fa88709ef0980b960abca5e059 (patch)
tree4e09207abd54e30bd62459e43e2f9219619a7256 /lib/v8.js
parent803883bb1a701da12c285fd735233eed7627eada (diff)
downloadandroid-node-v8-804e7aa9ab0b34fa88709ef0980b960abca5e059.tar.gz
android-node-v8-804e7aa9ab0b34fa88709ef0980b960abca5e059.tar.bz2
android-node-v8-804e7aa9ab0b34fa88709ef0980b960abca5e059.zip
lib: use const to define constants
This commit replaces a number of var statements throughout the lib code with const statements. PR-URL: https://github.com/iojs/io.js/pull/541 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/v8.js')
-rw-r--r--lib/v8.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/v8.js b/lib/v8.js
index d54f0c1b7b..c6cf015e72 100644
--- a/lib/v8.js
+++ b/lib/v8.js
@@ -14,17 +14,18 @@
'use strict';
-var v8binding = process.binding('v8');
-var smalloc = require('smalloc');
-
-var heapStatisticsBuffer = smalloc.alloc(v8binding.kHeapStatisticsBufferLength,
- v8binding.kHeapStatisticsBufferType);
-
-var kTotalHeapSizeIndex = v8binding.kTotalHeapSizeIndex;
-var kTotalHeapSizeExecutableIndex = v8binding.kTotalHeapSizeExecutableIndex;
-var kTotalPhysicalSizeIndex = v8binding.kTotalPhysicalSizeIndex;
-var kUsedHeapSizeIndex = v8binding.kUsedHeapSizeIndex;
-var kHeapSizeLimitIndex = v8binding.kHeapSizeLimitIndex;
+const v8binding = process.binding('v8');
+const smalloc = require('smalloc');
+
+const heapStatisticsBuffer =
+ smalloc.alloc(v8binding.kHeapStatisticsBufferLength,
+ v8binding.kHeapStatisticsBufferType);
+
+const kTotalHeapSizeIndex = v8binding.kTotalHeapSizeIndex;
+const kTotalHeapSizeExecutableIndex = v8binding.kTotalHeapSizeExecutableIndex;
+const kTotalPhysicalSizeIndex = v8binding.kTotalPhysicalSizeIndex;
+const kUsedHeapSizeIndex = v8binding.kUsedHeapSizeIndex;
+const kHeapSizeLimitIndex = v8binding.kHeapSizeLimitIndex;
exports.getHeapStatistics = function() {
var buffer = heapStatisticsBuffer;