search: destroy result actors before forgetting about them

We can't let live (ie, never destroyed) actors undergo GC, because
they will emit :destroy signals during finalization and assert/crash
libmozjs. Properly destroy all actors before letting the GC
free them.

https://bugzilla.gnome.org/show_bug.cgi?id=724798
This commit is contained in:
Giovanni Campagna 2014-02-23 16:18:46 +01:00
parent c2cc504837
commit b78e00f372

View File

@ -315,6 +315,8 @@ const SearchResultsBase = new Lang.Class({
}, },
clear: function() { clear: function() {
for (let resultId in this._resultDisplays)
this._resultDisplays[resultId].actor.destroy();
this._resultDisplays = {}; this._resultDisplays = {};
this._clearResultDisplay(); this._clearResultDisplay();
this.actor.hide(); this.actor.hide();