Closed Bug 1592444 Opened 5 years ago Closed 5 years ago

CoAllowSetForegroundWindow returns E_ACCESSDENIED when the caller is not in foreground

Categories

(Core :: Widget: Win32, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: toshi, Assigned: toshi)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Bug 1570845 added MOZ_ASSERT for the return value from CoAllowSetForegroundWindow. We noticed this API fails with E_ACCESSDENIED when the caller process is not in foreground. This case should be valid and we should not trigger an assert.

Is this another "user is running without UAC" issue?

(In reply to Aaron Klotz [:aklotz] from comment #1)

Is this another "user is running without UAC" issue?

No, this is the soft assert issue in Thunderbird's test (Bug 1588500) we discussed yesterday. There is no user impact.

Oh, I see, we're not in the foreground. Is there anything we can do about that? I mean, the function is working as intended; we can't pass foreground that we don't have...

I'm thinking simply to exclude E_ACCESSDENIED from MOZ_ASSERT because it's likely that automated tests hit this issue.

Bug 1588500 reported some of Thunderbird's tests failed because
CoAllowSetForegroundWindow failed. In that case, those tests should not launch
a default browser of the system, but we should allow E_ACCESSDENIED because
it legitimately happens if the window is not in the foreground.

Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/138b1dd63e10 Allow E_ACCESSDENIED from CoAllowSetForegroundWindow in debug build. r=aklotz
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Is there a real-world user impact for this bug which would justify uplift consideration or can this fix ride Fx72 to release?

Flags: needinfo?(tkikuchi)

Nevermind, debug-only :)

Comment on attachment 9108012 [details]
Bug 1592444 - Allow E_ACCESSDENIED from CoAllowSetForegroundWindow in debug build. r=aklotz

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Crashes TB debug tests on ESR 68. We could uplift to our branch.
  • User impact if declined: None.
  • Fix Landed on Version: 72
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Zero risk, just fixes an over-zealous assert.
  • String or UUID changes made by this patch: None.
Attachment #9108012 - Flags: approval-mozilla-esr68?

Comment on attachment 9108012 [details]
Bug 1592444 - Allow E_ACCESSDENIED from CoAllowSetForegroundWindow in debug build. r=aklotz

Go ahead and land it on your branch, Jorg.

Attachment #9108012 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68-
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: