Bug 1871187: prompt() goes through content analysis r=Gijs

Adds another text-paste case to content analysis, this time for the
prompt() command, which is not covered by the other clipboard cases
in bug 1871135.

Differential Revision: https://phabricator.services.mozilla.com/D197018
This commit is contained in:
Greg Stoll
2024-01-09 13:53:31 +00:00
parent 7a70ac7c9b
commit b7eef69b9f
3 changed files with 67 additions and 2 deletions

View File

@@ -221,7 +221,7 @@ export const ContentAnalysis = {
}
case "dlp-request-made":
{
const request = aSubj;
const request = aSubj.QueryInterface(Ci.nsIContentAnalysisRequest);
if (!request) {
console.error(
"Showing in-browser Content Analysis notification but no request was passed"
@@ -272,7 +272,7 @@ export const ContentAnalysis = {
}
break;
case "dlp-response":
const request = aSubj;
const request = aSubj.QueryInterface(Ci.nsIContentAnalysisResponse);
// Cancels timer or slow message UI,
// if present, and possibly presents the CA verdict.
if (!request) {