test: add read_only_space heap space

v8.getHeapSpaceStatistics() now includes read_only_space
in its results. Update test-v8-stats.js to account for this.

Fixes: https://github.com/nodejs/node-v8/issues/44

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
This commit is contained in:
cjihrig 2018-03-27 11:17:33 -04:00 committed by Myles Borins
parent fbe6b8500f
commit 9380c1859f
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946

View File

@ -25,7 +25,8 @@ const expectedHeapSpaces = [
'old_space',
'code_space',
'map_space',
'large_object_space'
'large_object_space',
'read_only_space'
];
const heapSpaceStatistics = v8.getHeapSpaceStatistics();
const actualHeapSpaceNames = heapSpaceStatistics.map((s) => s.space_name);