Break cycles between the xbl views to history results (bug 381239).

This commit is contained in:
mozilla.mano@sent.com 2007-05-19 12:54:10 -07:00
parent d658713a0e
commit adbab58705
3 changed files with 8 additions and 5 deletions

View File

@ -62,6 +62,7 @@
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[
this._result = null;
]]></destructor> ]]></destructor>
<method name="_init"> <method name="_init">

View File

@ -104,6 +104,7 @@
this.genericAnnoObserver.removeObserver("bookmarks/generatedTitle", this.genericAnnoObserver.removeObserver("bookmarks/generatedTitle",
this._generatedTitleAnnoObserver); this._generatedTitleAnnoObserver);
PlacesUtils.annotations.removeObserver(this.genericAnnoObserver); PlacesUtils.annotations.removeObserver(this.genericAnnoObserver);
this._result = null;
]]></destructor> ]]></destructor>
<property name="controller" <property name="controller"

View File

@ -58,9 +58,8 @@
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[
var resultview = this.getResultView(); this._result.view = null
if (resultview) this._result = null;
resultview.removeViewObserver(this._viewObserver);
]]></destructor> ]]></destructor>
<property name="controller" <property name="controller"
@ -78,8 +77,10 @@
if (resultview) if (resultview)
resultview.removeViewObserver(this._viewObserver); resultview.removeViewObserver(this._viewObserver);
this.treeBoxObject.view = val; this.treeBoxObject.view = val;
val.QueryInterface(Ci.nsINavHistoryResultViewer).addViewObserver( if (val) {
this._viewObserver, false); val.QueryInterface(Ci.nsINavHistoryResultViewer)
.addViewObserver(this._viewObserver, false);
}
]]></setter> ]]></setter>
</property> </property>