WebGLRenderingContext::handleNPOTTextures incorrectly uses the index values of m_textureUnits to set the context's active texture, which expects a proper GL_TEXTUREn value instead. I got GL_INVALID_ENUM from glActiveTexture to show up when rendering with drawArrays using multiple NPOT textures that were incomplete (they were using GL_REPEAT instead of GL_CLAMP_TO_EDGE against spec), and handleNPOTTextures tried to set the black texture for the non-active textures. Please find the attached trivial patch to fix this.
Created attachment 170703 [details] Fixes handleNPOTTextures
This same change was made as part of Bug 148020, and landed in r188666 <http://trac.webkit.org/changeset/188666>. *** This bug has been marked as a duplicate of bug 148020 ***