[Webkit-unassigned] [Bug 66145] [chromium] Assert that main thread and compositor thread are used safely

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 12 10:37:03 PDT 2011


--- Comment #1 from Iain Merrick <husky at google.com>  2011-08-12 10:37:03 PST ---
Created an attachment (id=103780)
 --> (https://bugs.webkit.org/attachment.cgi?id=103780&action=review)
CCThreadRestriction class that checks only specified mode(s) used during its lifetime.

Suggested implementation: each thread has a set of permitted modes. We can temporarily restrict the modes a thread can use (e.g., lock it down to "Paint" only). If we find ourselves trying to widen the set of modes (e.g. we're currently in "Update" and we try to restrict to "Paint") we assert.

Pro: easy to use correctly, non-invasive.
Con: failures happen inside CCThreadRestriction. Hard to see where the errors are really occurring without debugging.

I also added an ASSERT macro but that can only do an one-off check. Not obvious how to combine that with a scoped object.

I started sprinkling checks through LayerRendererChromium, but rapidly hit asserts.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list