[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:27:02 PDT 2012


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





--- Comment #3 from Yong Li <yoli at rim.com>  2012-09-20 11:27:32 PST ---
(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

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