3 https://bugzilla.mozilla.org/show_bug.cgi?id=1450912
5 Should be more investigated and reopen bug.
7 diff -r c56ef1c14a55 gfx/gl/GLContext.cpp
8 --- a/gfx/gl/GLContext.cpp Wed Mar 14 00:40:07 2018 +0200
9 +++ b/gfx/gl/GLContext.cpp Wed Apr 04 14:51:13 2018 +0000
12 static bool ParseVersion(const std::string& versionStr,
13 uint32_t* const out_major, uint32_t* const out_minor) {
14 - static const std::regex kVersionRegex("([0-9]+)\\.([0-9]+)");
16 - if (!std::regex_search(versionStr, match, kVersionRegex)) return false;
18 - const auto& majorStr = match.str(1);
19 - const auto& minorStr = match.str(2);
20 + size_t dot_index = versionStr.find('.', 0);
21 + if (dot_index == -1)
23 + const auto& majorStr = versionStr.substr(0, dot_index);
24 + const auto& minorStr = versionStr.substr(dot_index+1, 2);
25 *out_major = atoi(majorStr.c_str());
26 *out_minor = atoi(minorStr.c_str());