Skip to content

Commit edcfffe

Browse files
null8626BethGriggs
authored andcommittedSep 21, 2021
lib: use standard property names
The standard property names that aren't strings can be used where appropiate, this is one of them. PR-URL: #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>
1 parent d426ee9 commit edcfffe

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎lib/v8.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ function getHeapStatistics() {
154154
updateHeapStatisticsBuffer();
155155

156156
return {
157-
'total_heap_size': buffer[kTotalHeapSizeIndex],
158-
'total_heap_size_executable': buffer[kTotalHeapSizeExecutableIndex],
159-
'total_physical_size': buffer[kTotalPhysicalSizeIndex],
160-
'total_available_size': buffer[kTotalAvailableSize],
161-
'used_heap_size': buffer[kUsedHeapSizeIndex],
162-
'heap_size_limit': buffer[kHeapSizeLimitIndex],
163-
'malloced_memory': buffer[kMallocedMemoryIndex],
164-
'peak_malloced_memory': buffer[kPeakMallocedMemoryIndex],
165-
'does_zap_garbage': buffer[kDoesZapGarbageIndex],
166-
'number_of_native_contexts': buffer[kNumberOfNativeContextsIndex],
167-
'number_of_detached_contexts': buffer[kNumberOfDetachedContextsIndex]
157+
total_heap_size: buffer[kTotalHeapSizeIndex],
158+
total_heap_size_executable: buffer[kTotalHeapSizeExecutableIndex],
159+
total_physical_size: buffer[kTotalPhysicalSizeIndex],
160+
total_available_size: buffer[kTotalAvailableSize],
161+
used_heap_size: buffer[kUsedHeapSizeIndex],
162+
heap_size_limit: buffer[kHeapSizeLimitIndex],
163+
malloced_memory: buffer[kMallocedMemoryIndex],
164+
peak_malloced_memory: buffer[kPeakMallocedMemoryIndex],
165+
does_zap_garbage: buffer[kDoesZapGarbageIndex],
166+
number_of_native_contexts: buffer[kNumberOfNativeContextsIndex],
167+
number_of_detached_contexts: buffer[kNumberOfDetachedContextsIndex]
168168
};
169169
}
170170

@@ -209,9 +209,9 @@ function getHeapCodeStatistics() {
209209

210210
updateHeapCodeStatisticsBuffer();
211211
return {
212-
'code_and_metadata_size': buffer[kCodeAndMetadataSizeIndex],
213-
'bytecode_and_metadata_size': buffer[kBytecodeAndMetadataSizeIndex],
214-
'external_script_source_size': buffer[kExternalScriptSourceSizeIndex]
212+
code_and_metadata_size: buffer[kCodeAndMetadataSizeIndex],
213+
bytecode_and_metadata_size: buffer[kBytecodeAndMetadataSizeIndex],
214+
external_script_source_size: buffer[kExternalScriptSourceSizeIndex]
215215
};
216216
}
217217

0 commit comments

Comments
 (0)
Please sign in to comment.