Bug 553334 - [Exception... 'Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryResult.removeObserver]' when adding a new folder. r=mak.

This commit is contained in:
Asaf Romano 2010-06-04 22:53:08 +03:00
Родитель 640f63599e
Коммит 9ff0c95989
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -114,13 +114,6 @@
<parameter name="queries"/>
<parameter name="options"/>
<body><![CDATA[
// Cleanup old result if exists.
let oldResult = this.result;
if (oldResult) {
oldResult.removeObserver(this.view);
oldResult.root.containerOpen = false;
}
let result = PlacesUtils.history
.executeQueries(queries, queries.length,
options);
@ -132,6 +125,10 @@
}
let treeView = new PlacesTreeView(this.flatList, callback);
// Observer removal is done within the view itself. When the tree
// goes away, treeboxobject calls view.setTree(null), which then
// calls removeObserver.
result.addObserver(treeView, false);
this.view = treeView;
if (!this._controller) {