This works ONLY with threaded compositing (single-threaded hangs). It also flashes checkerboards when switching to a tab that has had its context destroyed.
There are prints added that should add something like:
<onControlledLostContext>
In GPU process: GLContext::~GLContext (8 contexts exist)
</onControlledLostContext>
The destruction of the renderer-side context is inside the re-creation logic. This adds a separate function that does the renderer-side context destruction.
With just this patch, you won't see the "In GPU process" stuff -- you need https://codereview.chromium.org/10913240 as well for that.
With just this patch, you'll also lose the context as soon as you change tabs. With the non-WebKit patch, you'll be allowed a budget of 8 contexts.