From 2cfaf74bfddaae505247ba7f9a684b38bc0f5b1e Mon Sep 17 00:00:00 2001 From: Yury Puzynya <3y3@bk.ru> Date: Tue, 9 Feb 2016 00:32:03 +0300 Subject: [PATCH] Fix deleteAllSnapshots --- v8-profiler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v8-profiler.js b/v8-profiler.js index be7526b..2f6621d 100644 --- a/v8-profiler.js +++ b/v8-profiler.js @@ -169,8 +169,8 @@ var profiler = { }, deleteAllSnapshots: function () { - binding.heap.snapshots.forEach(function(snapshot) { - snapshot.delete(); + Object.keys(binding.heap.snapshots).forEach(function(key) { + binding.heap.snapshots[key].delete(); }); },