mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 03:47:31 +09:00
[Basilisk] Add error handling to MIME type processing in prefs.
Port of MoonchildProductions/Pale-Moon#1959
This commit is contained in:
parent
de8213f561
commit
51091fd760
2 changed files with 20 additions and 5 deletions
|
|
@ -1076,11 +1076,26 @@ var gApplicationsPane = {
|
||||||
if (mimeType.type in this._handledTypes) {
|
if (mimeType.type in this._handledTypes) {
|
||||||
handlerInfoWrapper = this._handledTypes[mimeType.type];
|
handlerInfoWrapper = this._handledTypes[mimeType.type];
|
||||||
} else {
|
} else {
|
||||||
|
if (mimeType.type == '') {
|
||||||
|
// If an incorrect empty MIME type is present, don't break.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
try {
|
||||||
let wrappedHandlerInfo =
|
let wrappedHandlerInfo =
|
||||||
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
|
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
|
||||||
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
|
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
|
||||||
handlerInfoWrapper.handledOnlyByPlugin = true;
|
handlerInfoWrapper.handledOnlyByPlugin = true;
|
||||||
this._handledTypes[mimeType.type] = handlerInfoWrapper;
|
this._handledTypes[mimeType.type] = handlerInfoWrapper;
|
||||||
|
#ifdef DEBUG
|
||||||
|
console.log("Enumerate MIME type: " + mimeType.type);
|
||||||
|
#endif
|
||||||
|
} catch(e) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
console.log("Error fetching MIME type info for " + mimeType.type);
|
||||||
|
console.log(e);
|
||||||
|
#endif
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
|
handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ browser.jar:
|
||||||
content/browser/preferences/in-content/main.js
|
content/browser/preferences/in-content/main.js
|
||||||
content/browser/preferences/in-content/privacy.js
|
content/browser/preferences/in-content/privacy.js
|
||||||
content/browser/preferences/in-content/advanced.js
|
content/browser/preferences/in-content/advanced.js
|
||||||
content/browser/preferences/in-content/applications.js
|
* content/browser/preferences/in-content/applications.js
|
||||||
* content/browser/preferences/in-content/content.js
|
* content/browser/preferences/in-content/content.js
|
||||||
#ifdef MOZ_SERVICES_SYNC
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
content/browser/preferences/in-content/sync.js
|
content/browser/preferences/in-content/sync.js
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue