Fix potential crash trying to use D2D 1.0

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: dvander, Assigned: dvander)

Tracking

unspecified
Points:
---

Firefox Tracking Flags

(firefox46 fixed, firefox47 unaffected)

Details

Attachments

(1 attachment, 1 obsolete attachment)

On the Aurora branch, and Aurora only, if D3D11 device creation fails in a content process, but previously succeeded in the parent process, the content process will switch to Direct2D 1.0. If this happens, we will almost immediately crash because Direct2D 1.0 does not support the PushLayer API introduced in Aurora.

Easiest fix is to just outright disable Direct2D 1.0 on 46, since it has no chance of working anyway.
Comment on attachment 8720498 [details] [diff] [review]
bug1249126-d2d-crash.patch

Review of attachment 8720498 [details] [diff] [review]:
-----------------------------------------------------------------

I think this will disable D2D everywhere on aurora... doesn't it?
Attachment #8720498 - Flags: review?(bas) → review-
Posted patch v2Splinter Review
Err... yep. Tested this one.
Attachment #8720498 - Attachment is obsolete: true
Attachment #8720692 - Flags: review?(bas)
Attachment #8720692 - Flags: review?(bas) → review+
Comment on attachment 8720692 [details] [diff] [review]
v2

Approval Request Comment
[Feature/regressing bug #]: bug 1220629
[User impact if declined]: Rare but potential startup crash when a content process fails to acquire an accelerated device in E10S.
[Describe test coverage new/current, TreeHerder]: 
[Risks and why]: Firefox 46 introduced a graphics function that can crash if Direct2D 1.0 is used instead of Direct2D 1.1. This should never happen, but a small hole exists in our graphics initialization code that makes it possible on E10S. The fix is to ensure Direct2D 1.0 has no chance of being used. Fixing this should be low-risk: our Direct2D 1.0 code has not been active for a long time, and has been removed entirely in Firefox 47.
[String/UUID change made/needed]:
Attachment #8720692 - Flags: approval-mozilla-aurora?
Comment on attachment 8720692 [details] [diff] [review]
v2

46-only fix for a gfx/e10s startup crash. Let's go for it.
Attachment #8720692 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whoops - I was wondering how this could possibly fail, and realized I checked in v1 of the patch by accident. Glad a test caught that.
Flags: needinfo?(dvander)
And, somehow managed to check it in again... sorry about that. Correct commit is here:

https://hg.mozilla.org/releases/mozilla-aurora/rev/259032c2660a
Setting 46 to fixed per comment 8.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.