Try to fix intermittent GrAutoLocaleSetter crashes on Windows

Try to fix intermittent GrAutoLocaleSetter crashes on Windows.
The string returned by setlocale() is only valid up to
next setlocale(), so it can not be fed to setlocale().

Also, libraries such as ANGLE might call setlocale when
inside a callstack containing GrAutoLocaleSetter. This
would render the old locale pointer invalid.

Review URL: https://codereview.chromium.org/1514083002
1 file changed