Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 7e2bc4f

Browse files
Indicate breakpoint expiration using the refers_to field (#268)
PR-URL: #268
1 parent 14fee82 commit 7e2bc4f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/agent/debuglet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ Debuglet.prototype.scheduleBreakpointExpiry_ = function(breakpoint) {
651651
format: 'The snapshot has expired'
652652
},
653653
isError: true,
654-
refersTo: 'unspecified'
654+
refersTo: StatusMessage.BREAKPOINT_AGE
655655
};
656656
that.completeBreakpoint_(breakpoint);
657657
}, (expiryTime - now) * 1000).unref();

src/status-message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ function StatusMessage(refersTo, description, isError) {
3535
/** @const */ StatusMessage.BREAKPOINT_EXPRESSION = 'BREAKPOINT_EXPRESSION';
3636
/** @const */ StatusMessage.VARIABLE_NAME = 'VARIABLE_NAME';
3737
/** @const */ StatusMessage.VARIABLE_VALUE = 'VARIABLE_VALUE';
38+
/** @const */ StatusMessage.BREAKPOINT_AGE = 'BREAKPOINT_AGE';
3839

3940
module.exports = StatusMessage;

test/test-debuglet.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,9 @@ describe('Debuglet', function() {
660660
.reply(200, {breakpoints: [bp]})
661661
.put(BPS_PATH + '/test',
662662
function(body) {
663-
return body.breakpoint.status.description.format ===
664-
'The snapshot has expired';
663+
var status = body.breakpoint.status;
664+
return status.description.format === 'The snapshot has expired' &&
665+
status.refersTo === 'BREAKPOINT_AGE';
665666
})
666667
.reply(200);
667668

0 commit comments

Comments
 (0)