зеркало из https://github.com/mozilla/gecko-dev.git
Bug 990137 - Remove obsolete handling code for client side conditional breakpoints, r=jlast.
--HG-- extra : rebase_source : 41c8016979e088534e3e4bdea1d7af91ed6ace87
This commit is contained in:
Родитель
352047b095
Коммит
460678139f
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче