Skip to content

Commit

Permalink
lib: use standard property names
Browse files Browse the repository at this point in the history
The standard property names that aren't strings can be used where
appropiate, this is one of them.

PR-URL: nodejs#39981
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
null8626 authored and nodejs-github-bot committed Sep 8, 2021
1 parent 6e9a54c commit 7d51c6a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/v8.js
Expand Up @@ -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]
};
}

Expand Down Expand Up @@ -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]
};
}

Expand Down

0 comments on commit 7d51c6a

Please sign in to comment.