From 3359b0db7533f810979210b6f5111556f2e45bb9 Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Wed, 6 Feb 2019 16:51:01 +0000 Subject: [PATCH] Bug 1520972 - return setOptionsRequester. r=bhackett Differential Revision: https://phabricator.services.mozilla.com/D18770 --HG-- extra : moz-landing-system : lando --- devtools/shared/client/breakpoint-client.js | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/devtools/shared/client/breakpoint-client.js b/devtools/shared/client/breakpoint-client.js index c97ce321904f..61289261bd3f 100644 --- a/devtools/shared/client/breakpoint-client.js +++ b/devtools/shared/client/breakpoint-client.js @@ -68,30 +68,30 @@ BreakpointClient.prototype = { */ setOptions: function(options) { if (this._client.mainRoot.traits.nativeLogpoints) { - this.setOptionsRequester(options); - } else { - // Older servers need to reinstall breakpoints when the condition changes. - const deferred = promise.defer(); - - const info = { - line: this.location.line, - column: this.location.column, - options, - }; - - // Remove the current breakpoint and add a new one with the specified - // information. - this.remove(response => { - if (response && response.error) { - deferred.reject(response); - return; - } - - deferred.resolve(this.source.setBreakpoint(info).then(([, newBreakpoint]) => { - return newBreakpoint; - })); - }); + return this.setOptionsRequester(options).then(() => this); } + // Older servers need to reinstall breakpoints when the condition changes. + const deferred = promise.defer(); + + const info = { + line: this.location.line, + column: this.location.column, + options, + }; + + // Remove the current breakpoint and add a new one with the specified + // information. + this.remove(response => { + if (response && response.error) { + deferred.reject(response); + return; + } + + deferred.resolve(this.source.setBreakpoint(info).then(([, newBreakpoint]) => { + return newBreakpoint; + })); + }); + return deferred; }, };