Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-02-23 11:27:47 +08:00
commit 7b5249f151
7 changed files with 43 additions and 10 deletions

View file

@ -268,6 +268,11 @@ function initPluginsRow() {
if (mimeType == "application/x-shockwave-flash" && plugin.name != "Shockwave Flash") {
continue;
}
// XXX: Guard against plug-ins that include an empty MIME type
// in their list of handled MIME types (e.g. latest Java SE 8 plug-in).
if (mimeType.length == 0) {
continue;
}
let permString = pluginHost.getPermissionStringForType(mimeType);
if (!permissionMap.has(permString)) {
let name = makeNicePluginName(plugin.name) + " " + plugin.version;

View file

@ -566,6 +566,11 @@ var AboutPermissions = {
if ((mimeType == gFlash.type) && (plugin.name != gFlash.name)) {
continue;
}
// XXX: Guard against plug-ins that include an empty MIME type
// in their list of handled MIME types (e.g. latest Java SE 8 plug-in).
if (mimeType.length == 0) {
continue;
}
let permString = pluginHost.getPermissionStringForType(mimeType);
if (!permissionMap.has(permString)) {
let permissionEntry = document.createElementNS(XUL_NS, "box");

View file

@ -1066,11 +1066,26 @@ var gApplicationsPane = {
if (mimeType.type in this._handledTypes) {
handlerInfoWrapper = this._handledTypes[mimeType.type];
} else {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
this._handledTypes[mimeType.type] = handlerInfoWrapper;
if (mimeType.type == '') {
// If an incorrect empty MIME type is present, don't break.
continue;
}
try {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
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;
}