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

Commit 2ec1732

Browse files
authored
Change argument order in updateBreakpoint (#204)
1 parent b19b32d commit 2ec1732

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/agent/debuglet.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Debuglet.prototype.normalizeConfig_ = function(config) {
100100
config = extend({}, defaultConfig, config);
101101

102102
if (config.keyFilename || config.credentials || config.projectId) {
103-
throw new Error('keyFilename, projectId or credentials should be provided' +
103+
throw new Error('keyFilename, projectId or credentials should be provided' +
104104
' to the Debug module constructor rather than startAgent');
105105
}
106106

@@ -151,7 +151,7 @@ Debuglet.prototype.start = function() {
151151
that.emit('initError', err);
152152
return;
153153
}
154-
154+
155155
that.v8debug_ = v8debugapi.create(that.logger_, that.config_, jsStats, mapper);
156156

157157
id = id || hash;
@@ -365,7 +365,7 @@ Debuglet.prototype.scheduleBreakpointFetch_ = function(seconds) {
365365
err);
366366
that.fetcherActive_ = false;
367367
// We back-off from fetching breakpoints, and try to register again
368-
// after a while. Successful registration will restart the breakpoint
368+
// after a while. Successful registration will restart the breakpoint
369369
// fetcher.
370370
that.scheduleRegistration_(
371371
that.config_.internal.registerDelayOnFetcherErrorSec);
@@ -538,7 +538,7 @@ Debuglet.prototype.completeBreakpoint_ = function(breakpoint) {
538538

539539
that.logger_.info('\tupdating breakpoint data on server', breakpoint.id);
540540
that.debugletApi_.updateBreakpoint(
541-
breakpoint, that.debuggee_, function(err /*, body*/) {
541+
that.debuggee_, breakpoint, function(err /*, body*/) {
542542
if (err) {
543543
that.logger_.error('Unable to complete breakpoint on server', err);
544544
} else {
@@ -557,7 +557,7 @@ Debuglet.prototype.rejectBreakpoint_ = function(breakpoint) {
557557
var that = this;
558558

559559
that.debugletApi_.updateBreakpoint(
560-
breakpoint, that.debuggee_, function(err /*, body*/) {
560+
that.debuggee_, breakpoint, function(err /*, body*/) {
561561
if (err) {
562562
that.logger_.error('Unable to complete breakpoint on server', err);
563563
}

src/controller.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ util.inherits(Controller, common.ServiceObject);
4545

4646
/**
4747
* Register to the API (implementation)
48-
*
48+
*
4949
* @param {!function(?Error,Object=)} callback
5050
* @private
5151
*/
@@ -112,10 +112,11 @@ Controller.prototype.listBreakpoints = function(debuggee, callback) {
112112

113113
/**
114114
* Update the server about breakpoint state
115+
* @param {!Debuggee} debuggee
115116
* @param {!Breakpoint} breakpoint
116117
* @param {!Function} callback accepting (err, body)
117118
*/
118-
Controller.prototype.updateBreakpoint = function(breakpoint, debuggee, callback) {
119+
Controller.prototype.updateBreakpoint = function(debuggee, breakpoint, callback) {
119120
assert(debuggee.id, 'should have a registered debuggee');
120121

121122
breakpoint.action = 'capture';

test/test-controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ describe('Controller API', function() {
243243
.reply(200, { kind: 'debugletcontroller#updateActiveBreakpointResponse'});
244244
var debuggee = { id: 'fake-debuggee' };
245245
var controller = new Controller(fakeDebug);
246-
controller.updateBreakpoint(breakpoint, debuggee,
246+
controller.updateBreakpoint(debuggee, breakpoint,
247247
function(err, result) {
248248
assert(!err, 'not expecting an error');
249249
assert.equal(result.kind, 'debugletcontroller#updateActiveBreakpointResponse');

0 commit comments

Comments
 (0)