[Webkit-unassigned] [Bug 95719] [WebGL] GraphicsContext3D::compileShader stores return value of string conversion in const reference

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 20 11:45:27 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95719





--- Comment #4 from Arvid Nilsson <anilsson at rim.com>  2012-09-20 11:45:57 PST ---
(In reply to comment #3)
> (In reply to comment #1)
> > Not a problem, the C++ standard says that the life of the const reference shall be prolonged until the end of the current scope.
> > 
> > The string length might have been an issue if the source was non-UTF8, but the source would probably not pass through ANGLE if it were.
> 
> Are you sure?
> 
> >>> const CString& translatedShaderCString = translatedShaderSource.utf8();
> 
> Wouldn't the temp CString be destructed after this line?
> 
> Also we should use platform/blackberry/ReadOnlyLatin1String.cpp now, if we are sure it is latin1 string. string.latin1() also creates a new copy even the internal buffer is 8bit

I think the string code is suboptimal - utf8 sounds inappropriate for shader source. But unfortunately I named the bug after something that proved not to be an issue - I was thinking to create new bug for the string conversion stuff. Maybe rename bug is better.

-- 
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