From edcfffeaea24839f0cf3d81e055f123be6c2c2ef Mon Sep 17 00:00:00 2001 From: null <60427892+vierofernando@users.noreply.github.com> Date: Fri, 3 Sep 2021 07:48:58 +0700 Subject: [PATCH] lib: use standard property names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The standard property names that aren't strings can be used where appropiate, this is one of them. PR-URL: https://github.com/nodejs/node/pull/39981 Reviewed-By: James M Snell Reviewed-By: Gerhard Stöbich Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson --- lib/v8.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/v8.js b/lib/v8.js index b4e2d5cd1a751a..a7ae0cabbb3cd9 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -154,17 +154,17 @@ function getHeapStatistics() { updateHeapStatisticsBuffer(); return { - 'total_heap_size': buffer[kTotalHeapSizeIndex], - 'total_heap_size_executable': buffer[kTotalHeapSizeExecutableIndex], - 'total_physical_size': buffer[kTotalPhysicalSizeIndex], - 'total_available_size': buffer[kTotalAvailableSize], - 'used_heap_size': buffer[kUsedHeapSizeIndex], - 'heap_size_limit': buffer[kHeapSizeLimitIndex], - 'malloced_memory': buffer[kMallocedMemoryIndex], - 'peak_malloced_memory': buffer[kPeakMallocedMemoryIndex], - 'does_zap_garbage': buffer[kDoesZapGarbageIndex], - 'number_of_native_contexts': buffer[kNumberOfNativeContextsIndex], - 'number_of_detached_contexts': buffer[kNumberOfDetachedContextsIndex] + total_heap_size: buffer[kTotalHeapSizeIndex], + total_heap_size_executable: buffer[kTotalHeapSizeExecutableIndex], + total_physical_size: buffer[kTotalPhysicalSizeIndex], + total_available_size: buffer[kTotalAvailableSize], + used_heap_size: buffer[kUsedHeapSizeIndex], + heap_size_limit: buffer[kHeapSizeLimitIndex], + malloced_memory: buffer[kMallocedMemoryIndex], + peak_malloced_memory: buffer[kPeakMallocedMemoryIndex], + does_zap_garbage: buffer[kDoesZapGarbageIndex], + number_of_native_contexts: buffer[kNumberOfNativeContextsIndex], + number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex] }; } @@ -209,9 +209,9 @@ function getHeapCodeStatistics() { updateHeapCodeStatisticsBuffer(); return { - 'code_and_metadata_size': buffer[kCodeAndMetadataSizeIndex], - 'bytecode_and_metadata_size': buffer[kBytecodeAndMetadataSizeIndex], - 'external_script_source_size': buffer[kExternalScriptSourceSizeIndex] + code_and_metadata_size: buffer[kCodeAndMetadataSizeIndex], + bytecode_and_metadata_size: buffer[kBytecodeAndMetadataSizeIndex], + external_script_source_size: buffer[kExternalScriptSourceSizeIndex] }; }