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 authored and Myles Borins committed 2018-06-01 16:45:16 +02:00
1 parent 2d3137c5a9
commit aa08f6464c
1 file changed
+2 -1
+2 -1
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);