зеркало из https://github.com/mozilla/pjs.git
Bug 481437 - browser_library_open_leak.js is throwing, fixes also some throw in placesTxn.js test, r=dietrich, sdwilsh
This commit is contained in:
Родитель
64d4e0bd5d
Коммит
d82fe473c2
|
@ -654,7 +654,12 @@ LivemarkLoadListener.prototype = {
|
|||
this._processor.listener = this;
|
||||
this._processor.parseAsync(null, channel.URI);
|
||||
|
||||
this._processor.onStartRequest(aRequest, aContext);
|
||||
try {
|
||||
this._processor.onStartRequest(aRequest, aContext);
|
||||
}
|
||||
catch (ex) {
|
||||
Components.utils.reportError("Livemark Service: feed processor received an invalid channel for " + channel.URI.spec);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -662,11 +667,16 @@ LivemarkLoadListener.prototype = {
|
|||
*/
|
||||
onStopRequest: function LLL_onStopRequest(aRequest, aContext, aStatus) {
|
||||
if (!Components.isSuccessCode(aStatus)) {
|
||||
// Something went wrong, try to load again in a bit
|
||||
this._setResourceTTL(ERROR_EXPIRATION);
|
||||
this._isAborted = true;
|
||||
MarkLivemarkLoadFailed(this._livemark.folderId);
|
||||
this._livemark.locked = false;
|
||||
var lmService = Cc[LS_CONTRACTID].getService(Ci.nsILivemarkService);
|
||||
// One of the reasons we could abort a request is when a livemark is
|
||||
// removed, in such a case the livemark itemId would already be invalid.
|
||||
if (lmService.isLivemark(this._livemark.folderId)) {
|
||||
// Something went wrong, try to load again in a bit
|
||||
this._setResourceTTL(ERROR_EXPIRATION);
|
||||
MarkLivemarkLoadFailed(this._livemark.folderId);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Set an expiration on the livemark, for reloading the data
|
||||
|
|
|
@ -412,9 +412,16 @@ TaggingService.prototype = {
|
|||
getService(Ci.nsIThreadManager);
|
||||
tm.mainThread.dispatch({
|
||||
run: function() {
|
||||
if (!self._tagFolders[aItemId] &&
|
||||
self._bms.getItemType(aItemId) == self._bms.TYPE_FOLDER)
|
||||
self._tagFolders[aItemId] = self._bms.getItemTitle(aItemId);
|
||||
try {
|
||||
if (!self._tagFolders[aItemId] &&
|
||||
self._bms.getItemType(aItemId) == self._bms.TYPE_FOLDER)
|
||||
self._tagFolders[aItemId] = self._bms.getItemTitle(aItemId);
|
||||
}
|
||||
catch(ex) {
|
||||
// Could happen that the tag is removed just after it is added, for
|
||||
// example with transactions. in such a case getting item type
|
||||
// will fail and there's no reason to register the addition.
|
||||
}
|
||||
}
|
||||
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче