зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
640f63599e
Коммит
9ff0c95989
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче