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(); }); },