mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Fix test bustage by reordering reference clearing. Unit tests attempt to start new searches from result callbacks.
This commit is contained in:
parent
7f68925250
commit
a7801a361b
@ -181,19 +181,23 @@ AddonRepository.prototype = {
|
||||
_reportSuccess: function(aCount) {
|
||||
this._searching = false;
|
||||
this._request = null;
|
||||
this._callback.searchSucceeded(this._addons, this._addons.length,
|
||||
this._recommended ? -1 : aCount);
|
||||
// The callback may want to trigger a new search so clear references early
|
||||
var addons = this._addons;
|
||||
var callback = this._callback;
|
||||
this._callback = null;
|
||||
this._addons = null;
|
||||
callback.searchSucceeded(addons, addons.length, this._recommended ? -1 : aCount);
|
||||
},
|
||||
|
||||
// Notifies the callback of a failure
|
||||
_reportFailure: function(aEvent) {
|
||||
this._searching = false;
|
||||
this._request = null;
|
||||
this._callback.searchFailed();
|
||||
// The callback may want to trigger a new search so clear references early
|
||||
var callback = this._callback;
|
||||
this._callback = null;
|
||||
this._addons = null;
|
||||
callback.searchFailed();
|
||||
},
|
||||
|
||||
// Parses an add-on entry from an <addon> element
|
||||
|
Loading…
x
Reference in New Issue
Block a user