Re: [1/2] gdiplus: Don't keep a reference to HDC in the GpBitmap object.

2012-07-27 Thread Dmitry Timoshkov
Vincent Povirk wrote: > You're adding a test that relies on a corner case that should be > regarded as a broken program, and that could easily result in a > use-after-free on native. I'm not convinced this is reliable, as the > native codepath could involve a use-after-free and still work by > co

Re: [1/2] gdiplus: Don't keep a reference to HDC in the GpBitmap object.

2012-07-27 Thread Vincent Povirk
>> > an image passed to GdipGetImageGraphicsContext() is destroyed right after >> > the graphics object was created, then later on all calls using that HDC >> > fail >> > and silently lead to using invalid or not initilazed values. >> >> You have to keep the image alive as long as you're using the

Re: [1/2] gdiplus: Don't keep a reference to HDC in the GpBitmap object.

2012-07-27 Thread Dmitry Timoshkov
Vincent Povirk wrote: > > an image passed to GdipGetImageGraphicsContext() is destroyed right after > > the graphics object was created, then later on all calls using that HDC fail > > and silently lead to using invalid or not initilazed values. > > You have to keep the image alive as long as yo

Re: [1/2] gdiplus: Don't keep a reference to HDC in the GpBitmap object.

2012-07-27 Thread Vincent Povirk
> an image passed to GdipGetImageGraphicsContext() is destroyed right after > the graphics object was created, then later on all calls using that HDC fail > and silently lead to using invalid or not initilazed values. You have to keep the image alive as long as you're using the Graphics object. If