Bug 415390 - refreshing a livebookmark in a bookmark menu's submenu throws 'Container view not found'. r=dietrich.

This commit is contained in:
mozilla.mano@sent.com 2008-02-19 18:08:25 -08:00
Родитель 9ca691c7f5
Коммит e21a57cec7
3 изменённых файлов: 28 добавлений и 10 удалений

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

@ -263,10 +263,18 @@
}, },
set result(val) { set result(val) {
// some methods (e.g. getURLsFromContainer) temporarily null out the
// viewer when they do temporary changes to the view, this does _not_
// call setResult(null), but then, we're called again with the result
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._self._result != val) {
this._built = false; this._built = false;
this._self._containerNodesMap = []; this._self._containerNodesMap = [];
this._self._resultNode = val.root; this._self._resultNode = val.root;
return this._self._result = val; this._self._result = val;
}
return val;
}, },
itemInserted: function PMV_itemInserted(aParentNode, aNode, aIndex) { itemInserted: function PMV_itemInserted(aParentNode, aNode, aIndex) {

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

@ -419,9 +419,6 @@
]]></body> ]]></body>
</method> </method>
<!-- Map for containerNodes<->domNodes. -->
<field name="_containerNodesMap">[]</field>
<!-- nsINavHistoryResultViewer --> <!-- nsINavHistoryResultViewer -->
<field name="_viewer"><![CDATA[({ <field name="_viewer"><![CDATA[({
_self: this, _self: this,
@ -443,9 +440,17 @@
}, },
set result(val) { set result(val) {
// some methods (e.g. getURLsFromContainer) temporarily null out the
// viewer when they do temporary changes to the view, this does _not_
// call setResult(null), but then, we're called again with the result
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._self._result != val) {
this._self._containerNodesMap = [];
this._self._result = val; this._self._result = val;
if (val) if (val) // this calls _rebuild through invalidateContainer
val.root.containerOpen = true; val.root.containerOpen = true;
}
return val; return val;
}, },

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

@ -905,6 +905,11 @@ PlacesTreeView.prototype = {
}, },
set result(val) { set result(val) {
// some methods (e.g. getURLsFromContainer) temporarily null out the
// viewer when they do temporary changes to the view, this does _not_
// call setResult(null), but then, we're called again with the result
// object which is already set for this viewer. At that point,
// we should do nothing.
if (this._result != val) { if (this._result != val) {
this._result = val; this._result = val;
this._finishInit(); this._finishInit();