Closed Bug 1207437 Opened 9 years ago Closed 9 years ago

Fix and disallow warnings in gfx/thebes

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(3 files)

We get a ton of warnings like this in gfxWindowsPlatform.cpp:

> gfx/thebes/gfxWindowsPlatform.cpp(2016) : warning C4509: nonstandard extension used: 'gfxWindowsPlatform::AttemptD3D11DeviceCreation' uses SEH and 'adapter' has destructor

The problem is that desctructors don't run reliably if a structured exception is thrown. The fix is to put the SEH try/catch blocks in functions that don't involve local variables whose types have destructors.
W.r.t. the incoming patches, please note that I'm a total newbie when it comes to this code. Please cast a skeptical eye.
This is valid because mFeatureLevels is set when gfxWindowsPlatform is
initialized.
Attachment #8664631 - Flags: review?(dvander)
Assignee: nobody → n.nethercote
It's always obtained during gfxWindowPlatform initialization and put into
sD3D11CreateDeviceFn.
Attachment #8664632 - Flags: review?(dvander)
froydnj: I'm uncertain about the handling of |aDevice| in
CreateD3D11DecoderDeviceHelper(). I've used a RefPtr<>& because of the byRef()
call but I don't know if that's right. That's the only bit I need you to look
at, but please look carefully.

dvander: please check the whole patch.

Thank you.
Attachment #8664634 - Flags: review?(nfroyd)
Attachment #8664634 - Flags: review?(dvander)
Attachment #8664631 - Flags: review?(dvander) → review+
Attachment #8664632 - Flags: review?(dvander) → review+
Comment on attachment 8664634 [details] [diff] [review]
(part 3) - Fix and disallow warnings in gfx/thebes/

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

Looks fine to me.
Attachment #8664634 - Flags: review?(nfroyd) → review+
Comment on attachment 8664634 [details] [diff] [review]
(part 3) - Fix and disallow warnings in gfx/thebes/

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

Thanks, these warnings were really annoying.
Attachment #8664634 - Flags: review?(dvander) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: