There is no guarantee that only one thread calls GraphicsContext3D::compileShader() at a time so it would be
better to use a thread local storage variable rather than use a static variable.
In my case, the race condition is occurred when multiple instances of TextureMapperShaderProgram are created on each other thread and
the constructors of TextureMapperShaderProgram call GraphicsContext3D::compileShader() simultaneously.
Created attachment 260761 [details]
Comment on attachment 260761 [details]
Clearing flags on attachment: 260761
Committed r189580: <http://trac.webkit.org/changeset/189580>
All reviewed patches have been landed. Closing bug.