Bug 990137 - Remove obsolete handling code for client side conditional breakpoints, r=jlast.

--HG--
extra : rebase_source : 41c8016979e088534e3e4bdea1d7af91ed6ace87
This commit is contained in:
Brian Hackett 2019-01-17 08:36:37 -10:00
Родитель 352047b095
Коммит 460678139f
3 изменённых файлов: 17 добавлений и 57 удалений

Просмотреть файл

@ -121,8 +121,6 @@ RootActor.prototype = {
storageInspector: true,
// Whether storage inspector is read only
storageInspectorReadOnly: true,
// Whether conditional breakpoints are supported
conditionalBreakpoints: true,
// Whether the server supports full source actors (breakpoints on
// eval scripts, etc)
debuggerSourceActors: true,

Просмотреть файл

@ -56,34 +56,6 @@ BreakpointClient.prototype = {
type: "delete",
}),
/**
* Determines if this breakpoint has a condition
*/
hasCondition: function() {
const root = this._client.mainRoot;
// XXX bug 990137: We will remove support for client-side handling of
// conditional breakpoints
if (root.traits.conditionalBreakpoints) {
return "condition" in this;
}
return "conditionalExpression" in this;
},
/**
* Get the condition of this breakpoint. Currently we have to
* support locally emulated conditional breakpoints until the
* debugger servers are updated (see bug 990137). We used a
* different property when moving it server-side to ensure that we
* are testing the right code.
*/
getCondition: function() {
const root = this._client.mainRoot;
if (root.traits.conditionalBreakpoints) {
return this.condition;
}
return this.conditionalExpression;
},
/**
* Set the condition of this breakpoint
*/
@ -91,34 +63,24 @@ BreakpointClient.prototype = {
const root = this._client.mainRoot;
const deferred = promise.defer();
if (root.traits.conditionalBreakpoints) {
const info = {
line: this.location.line,
column: this.location.column,
condition: condition,
};
const info = {
line: this.location.line,
column: this.location.column,
condition: condition,
};
// Remove the current breakpoint and add a new one with the
// condition.
this.remove(response => {
if (response && response.error) {
deferred.reject(response);
return;
}
deferred.resolve(this.source.setBreakpoint(info).then(([, newBreakpoint]) => {
return newBreakpoint;
}));
});
} else {
// The property shouldn't even exist if the condition is blank
if (condition === "") {
delete this.conditionalExpression;
} else {
this.conditionalExpression = condition;
// Remove the current breakpoint and add a new one with the
// condition.
this.remove(response => {
if (response && response.error) {
deferred.reject(response);
return;
}
deferred.resolve(this);
}
deferred.resolve(this.source.setBreakpoint(info).then(([, newBreakpoint]) => {
return newBreakpoint;
}));
});
return deferred.promise;
},

Просмотреть файл

@ -212,7 +212,7 @@ SourceClient.prototype = {
this,
response.actor,
location,
root.traits.conditionalBreakpoints ? condition : undefined
condition
);
}
if (callback) {