Bug 837052 - Editing or deleting getters and setters appears to be allowed even if no eval method is provided, r=past

This commit is contained in:
Victor Porof 2013-02-07 16:18:08 +02:00
Родитель 8cec10d191
Коммит c589a602ce
2 изменённых файлов: 14 добавлений и 3 удалений

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

@ -2140,8 +2140,20 @@ create({ constructor: Variable, proto: Scope.prototype }, {
separatorLabel.hidden = true;
valueLabel.hidden = true;
this.delete = VariablesView.getterOrSetterDeleteCallback;
this.evaluationMacro = VariablesView.overrideValueEvalMacro;
// Changing getter/setter names is never allowed.
this.switch = null;
// Getter/setter properties require special handling when it comes to
// evaluation and deletion.
if (this.ownerView.eval) {
this.delete = VariablesView.getterOrSetterDeleteCallback;
this.evaluationMacro = VariablesView.overrideValueEvalMacro;
}
// Deleting getters and setters individually is not allowed if no
// evaluation method is provided.
else {
this.delete = null;
}
let getter = this.addProperty("get", { value: descriptor.get });
let setter = this.addProperty("set", { value: descriptor.set });

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

@ -428,7 +428,6 @@
.property > .title > .value {
-moz-padding-start: 6px;
-moz-padding-end: 4px;
cursor: text;
}
.property[editable] > .title > .value {