Bug 45354 - chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
Summary: chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nico Weber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 18:38 PDT by Nico Weber
Modified: 2010-09-08 06:02 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.28 KB, patch)
2010-09-07 18:40 PDT, Nico Weber
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2010-09-07 18:38:36 PDT
chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
Comment 1 Nico Weber 2010-09-07 18:40:10 PDT
Created attachment 66823 [details]
Patch
Comment 2 Nico Weber 2010-09-07 18:41:27 PDT
Patch also removes some duplicated code.
Comment 3 Nico Weber 2010-09-07 18:42:03 PDT
This is supposed to fix http://crbug.com/54763 btw
Comment 4 Kenneth Russell 2010-09-07 19:49:14 PDT
Comment on attachment 66823 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=66823&action=prettypatch

Looks good to me. Because I've run into the issue that Chromium doesn't define PLATFORM(MAC) I'm surprised that we compile in code in the WebCore/platform/mac directory (LocalCurrentGraphicsContext).

Is there any possibility that LocalCurrentGraphicsContext is leaking its newly created NSGraphicsContext (by leaving it as the current context) if there isn't a current NSGraphicsContext going in to the constructor?

> WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:46
> +
Unneeded newline
Comment 5 Nico Weber 2010-09-07 19:57:07 PDT
Thanks for the review!

(In reply to comment #4)
> (From update of attachment 66823 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=66823&action=prettypatch
> 
> Looks good to me. Because I've run into the issue that Chromium doesn't define PLATFORM(MAC) I'm surprised that we compile in code in the WebCore/platform/mac directory (LocalCurrentGraphicsContext).

We generally build files in mac/ subdirectories. See WebCore/WebCore.gypi for a list of all files we look at and then grep WebCore/WebCore.gyp/WebCore.gyp for "exclude" for stuff we exclude from that long list.

> Is there any possibility that LocalCurrentGraphicsContext is leaking its newly created NSGraphicsContext (by leaving it as the current context) if there isn't a current NSGraphicsContext going in to the constructor?
> 
> > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:46
> > +
> Unneeded newline

Most files I looked at had a newline between system stuff and webkit stuff.
Comment 6 WebKit Commit Bot 2010-09-08 06:02:41 PDT
Comment on attachment 66823 [details]
Patch

Clearing flags on attachment: 66823

Committed r66975: <http://trac.webkit.org/changeset/66975>
Comment 7 WebKit Commit Bot 2010-09-08 06:02:46 PDT
All reviewed patches have been landed.  Closing bug.