When building debug with clang on mac, this template function leads to an assert in HashTable. When building with gcc instead, the problem could not be reproduced. This even was the case if the function was not using the template parameter at all. So just having this function being a template triggered what seems to be a compiler bug.
Created attachment 133471 [details] backtrace of the assert. For the sake of completeness I am adding a backtrace to the bugreport.
Created attachment 133474 [details] patch for review.
Comment on attachment 133474 [details] patch for review. View in context: https://bugs.webkit.org/attachment.cgi?id=133474&action=review > Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h:123 > + if (shaderType == Simple) { > + RefPtr<TextureMapperShaderProgram> t = TextureMapperShaderProgramSimple::create(); > + m_textureMapperShaderProgramMap.add(shaderType, t); > + return t; > + } > + > + if (shaderType == OpacityAndMask) { > + RefPtr<TextureMapperShaderProgram> t = TextureMapperShaderProgramOpacityAndMask::create(); > + m_textureMapperShaderProgramMap.add(shaderType, t); > + return t; > + } This should be a switch, with only the different lines in it. The add and return can go outside the switch. > Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h:129 > + typedef HashMap<int, RefPtr<TextureMapperShaderProgram> > TextureMapperShaderProgramMap; Why not keep the key as ShaderType?
Created attachment 133497 [details] patch for review. - fixed issues as requested.
Comment on attachment 133497 [details] patch for review. - fixed issues as requested. Clearing flags on attachment: 133497 Committed r111986: <http://trac.webkit.org/changeset/111986>
All reviewed patches have been landed. Closing bug.