Fix potential crash trying to use D2D 1.0




4 years ago
3 years ago


(Reporter: dvander, Assigned: dvander)



Firefox Tracking Flags

(firefox46 fixed, firefox47 unaffected)



(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]

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]

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]

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:
Setting 46 to fixed per comment 8.
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.