зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520972 - return setOptionsRequester. r=bhackett
Differential Revision: https://phabricator.services.mozilla.com/D18770 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a371e5fe19
Коммит
3359b0db75
|
@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче