on master help sign in
Math.floor more accurately reflects the variable's name
fd86988Michael James
runtime/Debugger.js+2−2
@@ -177,9 +177,9 @@ function debugModule(module, runtime) {
177 if (position > 0) {
177 if (position > 0) {
178 // If we're not unpausing at the head, then we need to dump the
178 // If we're not unpausing at the head, then we need to dump the
179 // events that are ahead of where we're continuing.
179 // events that are ahead of where we're continuing.
180− var lastSnapshotPosition = Math.ceil(position / EVENTS_PER_SAVE);
180+ var lastSnapshotPosition = Math.floor(position / EVENTS_PER_SAVE);
181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182− snapshots = snapshots.slice(0, lastSnapshotPosition);
182+ snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
183 recordedEvents = recordedEvents.slice(0, position);
183 recordedEvents = recordedEvents.slice(0, position);
184 tracePath.clearTracesAfter(position);
184 tracePath.clearTracesAfter(position);
185 eventCounter = position;
185 eventCounter = position;