bug 1145049 - Fix nodepicker when reopening toolbox for the same app. r=pbrosset

This commit is contained in:
Alexandre Poirot 2015-09-14 02:47:13 -07:00
parent 5560ecc489
commit e4d3bb3440
2 changed files with 10 additions and 2 deletions

View File

@ -3515,6 +3515,10 @@ var InspectorActor = exports.InspectorActor = protocol.ActorClass({
destroy: function () {
protocol.Actor.prototype.destroy.call(this);
this._highlighterPromise = null;
this._pageStylePromise = null;
this._walkerPromise = null;
this.walker = null;
},
// Forces destruction of the actor and all its children
@ -3570,7 +3574,9 @@ var InspectorActor = exports.InspectorActor = protocol.ActorClass({
}
this._pageStylePromise = this.getWalker().then(walker => {
return PageStyleActor(this);
let pageStyle = PageStyleActor(this);
this.manage(pageStyle);
return pageStyle;
});
return this._pageStylePromise;
}, {

View File

@ -332,7 +332,9 @@ let PageStyleActor = protocol.ActorClass({
// If this font comes from a @font-face rule
if (font.rule) {
fontFace.rule = StyleRuleActor(this, font.rule);
let styleActor = StyleRuleActor(this, font.rule);
this.manage(styleActor);
fontFace.rule = styleActor;
fontFace.ruleText = font.rule.cssText;
}