зеркало из https://github.com/mozilla/gecko-dev.git
Bug 324111 - Extension Manager window is empty (e.g. datasource not loaded) when the extensions.rdf is corrupt. r=bsmedberg
This commit is contained in:
Родитель
1a5272733a
Коммит
1f4b648438
|
@ -6492,7 +6492,15 @@ ExtensionsDataSource.prototype = {
|
||||||
*/
|
*/
|
||||||
loadExtensions: function() {
|
loadExtensions: function() {
|
||||||
var extensionsFile = getFile(KEY_PROFILEDIR, [FILE_EXTENSIONS]);
|
var extensionsFile = getFile(KEY_PROFILEDIR, [FILE_EXTENSIONS]);
|
||||||
this._inner = gRDF.GetDataSourceBlocking(getURLSpecFromFile(extensionsFile));
|
try {
|
||||||
|
this._inner = gRDF.GetDataSourceBlocking(getURLSpecFromFile(extensionsFile));
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
LOG("Datasource::loadExtensions: removing corrupted extensions datasource " +
|
||||||
|
" file = " + extensionsFile.path + ", exception = " + e + "\n");
|
||||||
|
extensionsFile.remove(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var cu = Components.classes["@mozilla.org/rdf/container-utils;1"]
|
var cu = Components.classes["@mozilla.org/rdf/container-utils;1"]
|
||||||
.getService(Components.interfaces.nsIRDFContainerUtils);
|
.getService(Components.interfaces.nsIRDFContainerUtils);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче