Bug 67003 - [chromium] Remove unsafe raw GraphicsContext3D pointer from ProgramBinding
Summary: [chromium] Remove unsafe raw GraphicsContext3D pointer from ProgramBinding
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrienne Walker
Depends on:
Reported: 2011-08-25 17:31 PDT by Adrienne Walker
Modified: 2011-09-01 16:44 PDT (History)
3 users (show)

See Also:

Patch (17.31 KB, patch)
2011-08-25 17:33 PDT, Adrienne Walker
no flags Details | Formatted Diff | Diff
Patch (16.99 KB, patch)
2011-08-31 16:27 PDT, Adrienne Walker
jamesr: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrienne Walker 2011-08-25 17:31:29 PDT
[chromium] Remove unsafe raw GraphicsContext3D pointer from ProgramBinding
Comment 1 Adrienne Walker 2011-08-25 17:33:33 PDT
Created attachment 105284 [details]
Comment 2 Adrienne Walker 2011-08-25 17:36:16 PDT
This came out of a discussion with jamesr and I figured I'd throw together a quick patch.

I would land this after 66981.
Comment 3 James Robinson 2011-08-25 17:56:18 PDT
Comment on attachment 105284 [details]

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

I think this'll hit ASSERT()s if we ever actually tried to clean stuff up in LayerRendererChromium, unless I'm misreading how cleanup() works which is very possible.

> Source/WebCore/ChangeLog:8
> +        Covered by existing tests.

I think that's actually a bit optimistic, we don't have any test coverage that this stuff is cleaned up.

> Source/WebCore/platform/graphics/chromium/ProgramBinding.cpp:67
> +    GLC(context, context->deleteProgram(m_program));
> +}

don't you need to clear m_program here to avoid hitting the assert in the dtor?
Comment 4 Adrienne Walker 2011-08-31 16:27:47 PDT
Created attachment 105855 [details]
Comment 5 Adrienne Walker 2011-09-01 09:47:51 PDT
(In reply to comment #4)
> Created an attachment (id=105855) [details]
> Patch

You're totally right.  I fixed this patch so it actually works and removed the lie that it was being tested automatically.  I tested it manually, though.
Comment 6 James Robinson 2011-09-01 09:49:00 PDT
Comment on attachment 105855 [details]

Comment 7 Adrienne Walker 2011-09-01 16:44:09 PDT
Committed r94363: <http://trac.webkit.org/changeset/94363>