summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2021-11-02SL-16207: Fix bug in ll_convert_string_to_utf8_string().Nat Goodspeed
That function wants to pass a code_page to ll_convert_string_to_wide(), but the code_page parameter was being mistaken for the length parameter, leading to access violations.
2021-11-02SL-16207: Guess Microsoft compiler isn't smart about default params?Nat Goodspeed
clang allows us to specify, as a default function parameter, an expression involving a preceding parameter, e.g. (char* ptr, size_t len=strlen(ptr)). The Microsoft compiler produces errors, requiring more overloads to address that. Also #undef llstring.h's declaration helper macros at the bottom of the file. Once we've used them to declare stuff, they need not (should not) be visible to the consuming source file.
2021-11-02SL-16207: Create uniform overload sets for wide-string conversions.Nat Goodspeed
Use new ll_convert_forms() macro in llstring.h to declare, for each wide-string conversion function of interest, four overloads. The real one, the nontrivial one, is (const char*, size_t len), implemented in llstring.cpp. Then (const string&, size_t len), (const char*) and (const string&) are each trivially implemented with an inline call to (const char*, size_t len). Notably, we change all S32 len parameters to size_t. Using S32 is old skool. Tweak each nontrivial implementation in llstring.cpp to accept (const char*, size_t len) instead of (const string&) with or without explicit length. Eliminate from llstring.cpp trivial overloads (deriving length from either a const char* or from a string), since those are now inline in the header. Of course three of those overloads will be unified once we enable C++17 and change each relevant parameter to std::string_view, but we're not yet there. Meanwhile, this suite of overloads minimizes, to the best of our ability, new string allocations solely for parameter passing. And use of a macro means we need only change the macro once we get std::string_view. We take this step because some use cases require (const char*), some require (const string&, size_t len), others (const char*, size_t len) ... We were missing some key overloads, and had to work around them by instantiating new string objects (necessitating both allocation and character copying) just to pass the desired parameter. Using the macro ensures this consistent set of overloads for every wide-string conversion function. Additionally, knowing that the ugly-name overloads exist, ll_convert_forms() implicitly defines corresponding ll_convert<TARGET>() overloads. Streamline declarations of utf16str_to_wstring(), wstring_to_utf16str(), utf8str_to_utf16str(), utf16str_to_utf8str(), utf8str_to_wstring(), wstring_to_utf8str(), ll_convert_wide_to_wstring() and ll_convert_wstring_to_wide() using ll_convert_forms(). Use corresponding new ll_convert_cp_forms() macro to declare consistent overloads for conversion functions accepting an optional unsigned int code_page parameter. We used to delegate to the .cpp file the implementation of each overload accepting code_page so llstring.h need not include the Windows header defining the CP_UTF8 default; this is more simply accomplished by introducing a small ll_wstring_default_code_page() function to retrieve it from the .cpp file. That lets us specify the code_page parameter as optional, using that function as its default value. Use ll_convert_cp_forms() to streamline declarations of ll_convert_wide_to_string() and ll_convert_string_to_wide(). Introduce real implementations of ll_convert_wide_to_wstring() and ll_convert_wstring_to_wide(). The previous implementations merely copied individual characters, which is wrong: when we convert UTF16LE to UTF32, we can and should fold multi-character UTF16LE encodings to the corresponding single UTF32 character. The real implemenations leverage our awareness that both llutf16string and Windows std::wstring (either variant) use UTF16LE encoding, so we can reuse the corresponding llutf16string conversions. Introduce generic ll_convert_length() function, specialized as either std::strlen() or std::wcslen() depending on parameter type. (Even if std::wcslen() is derived from classic C, why doesn't the C++ standard library define a std::strlen(const wchar_t*) overload to call it?) Fix ll_convert_alias()'s ll_convert_impl specialization's operator() to accept boost::call_traits::param_type, so we can pass (e.g.) const std::wstring& but also const wchar_t* instead of const wchar_t*&.
2021-11-01SL-16207: Remove CMake cxx_range_for from media_plugin_cef.Nat Goodspeed
Now that we've enabled -std=c++14 for the whole viewer source tree, that CMake directive is actually a step backwards -- since it introduces -std=gnu++11 on the compiler command line, after the one we want, which apparently overrides c++14 with gnu++11 and causes errors with legitimate C++14 constructs.
2021-10-27SL-16207: Update llstring.h handling of different string types.Nat Goodspeed
In llpreprocessor.h, consider the case of clang on Windows: #define LL_WCHAR_T_NATIVE there as well as for the Microsoft compiler with /Zc:wchar_t switch. In stdtypes.h, inject a LLWCHAR_IS_WCHAR_T symbol to allow the preprocessor to make decisions about when the types are identical. llstring.h's conversion logic deals with three types of wide strings (LLWString, std::wstring and utf16string) based on three types of wide char (llwchar, wchar_t and U16, respectively). Sometimes they're three distinct types, sometimes wchar_t is identical to llwchar and sometimes wchar_t is identical to U16. Rationalize the three cases using ll_convert_u16_alias() and new ll_convert_wstr_alias() macros. stringize.h was directly calling wstring_to_utf8str() and utf8str_to_wstring(), which was producing errors with VS 2019 clang since there isn't actually a wstring_to_utf8str(std::wstring) overload. Use ll_convert<std::string>() instead, since that redirects to the relevant ll_convert_wide_to_string() function. (And now you see why we've been trying to migrate to the uniform ll_convert<target>() wrapper!) Similarly, call ll_convert<std::wstring>() instead of a two-step conversion from utf8str_to_wstring(), producing LLWString, then a character-by-character copy from LLWString to std::wstring. That isn't even correct: on Windows, we should be encoding from UTF32 to UTF16.
2021-10-13Increment viewer version to 6.4.24Nat Goodspeed
following promotion of DRTVWR-520
2021-09-23SL-15903 SLPlugin entitlements fixAndrey Lihatskiy
2021-09-21SL-15612 Value fixAndrey Lihatskiy
2021-09-21SL-15612 Check for SKIP_NOTARIZATION evn. variableAndrey Lihatskiy
2021-09-21SL-15903 Restored the lost codeAndrey Lihatskiy
2021-09-03SL-15902 Cleanup gSecAPIHandlerMnikolenko ProductEngine
2021-08-12Merge branch 'master' into DRTVWR-520-apple-notarizationAndrey Lihatskiy
# Conflicts: # autobuild.xml # build.sh # indra/CMakeLists.txt # indra/newview/CMakeLists.txt # indra/newview/llappviewermacosx.cpp # indra/newview/llappviewerwin32.h # indra/newview/viewer_manifest.py # indra/win_crash_logger/llcrashloggerwindows.cpp
2021-08-09Increment viewer version to 6.4.23Nat Goodspeed
following promotion of DRTVWR-531
2021-07-19Merge with Master after Viewer Release (also fixed some glaring automerge ↵Callum Prentice
screw ups)
2021-07-19SL-15585 more logging for altoolAndrey Lihatskiy
2021-07-14Increment viewer version to 6.4.22Nat Goodspeed
following promotion of DRTVWR-516
2021-07-15SL-15585 typo fixAndrey Lihatskiy
2021-07-14SL-15585 Improved notarization error handlingAndrey Lihatskiy
2021-07-12Fix for SL-15560 pages with undefined html render with gray background ↵Callum Prentice
instead of white in CEF v91
2021-07-13Revert "SL-15434 Change default landmark destination"Andrey Kleshchev
This reverts commit efc8b268a2686a86c0975b4b3f67ef821a416d98.
2021-07-12Fix for SL-15559 PDF files do not load in CEF v91Callum Prentice
2021-07-01SL-15512 Update text in the Favorites Bar and Favorites windowMnikolenko Productengine
2021-06-30SL-15434 Change default landmark destinationAndrey Kleshchev
2021-06-30SL-15434 The 'Add to my Landmarks' star icon is not marked in the Top menu barAndrey Kleshchev
2021-06-25Merge branch 'master' into DRTVWR-520-apple-notarizationAndrey Lihatskiy
2021-06-25Merge branch 'master' into DRTVWR-516-maintAndrey Lihatskiy
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llvoicevivox.cpp
2021-06-24Merge branch 'master' into DRTVWR-531Callum Prentice
2021-06-24Increment viewer version to 6.4.21Nat Goodspeed
following promotion of DRTVWR-518
2021-06-24SL-10297 windows local build fixAndrey Kleshchev
win_crash_logger will be fully removed in D520, for now just fixing local relwithdebinfo build
2021-06-23SL-15292 waitForChannel crash #4Andrey Kleshchev
2021-06-23SL-15292 waitForChannel crash #3Andrey Kleshchev
2021-06-23SL-15292 waitForChannel crash #2Andrey Kleshchev
2021-06-17Fix for: SL-15422 Update version of CEF used in the Viewer to 91.0.4472.101. ↵Callum Prentice
Also includes a tweak to viewer_manifest.py to handle some CEF file changes"
2021-06-16SL-15406 Removed text below initial login screen screenshotsAndrey Kleshchev
2021-06-11Fix for SL-15389 -- Pull in the patch to add the Akamai cert fix specified ↵Callum Prentice
in SL-15370
2021-06-10Fix for SL-15381 Import Vivox VAD voice fixes into 'Viewer UI changes' branchCallum Prentice
2021-06-09SL-15363 how_to on older viewers is forced to persistAndrey Kleshchev
Older how_to floater is not set to persist in between sessions and gets stuck, ranamed new how_to into guidebook to avoid the issue
2021-06-07Merge branch 'master' into DRTVWR-531Callum Prentice
2021-06-08SL-15168 A bit of debug loggingAndrey Kleshchev
2021-06-07Merge branch 'master' into DRTVWR-520-apple-notarizationAndrey Lihatskiy
2021-06-07Merge branch 'master' into DRTVWR-518-uiAndrey Lihatskiy
2021-06-07Merge branch 'master' into DRTVWR-516-maintAndrey Lihatskiy
2021-06-07Increment viewer version to 6.4.20Nat Goodspeed
following promotion of DRTVWR-525
2021-06-04SL-15350 Update images for New User viewer log in pageAndrey Lihatskiy
2021-06-03SL-15292 waitForChannel crashAndrey Kleshchev
2021-06-03SL-15272 Bugsplat crashes at condition wait()Andrey Kleshchev
Made sure all waits will be triggered, won't loop back and that in case of http queue it had some time to trigger
2021-05-27SL-15211 Adjust unit testsAndrey Kleshchev
2021-05-27SL-15211 Remove unsused functionsAndrey Kleshchev
CRYPTO_set_id_callback and CRYPTO_set_locking_callback are no-op in ssl 1.1.x
2021-05-27SL-15211 Update OpenSSL libraryAndrey Kleshchev
2021-05-27SL-15319 FIXED Crash in LLFloaterCreateLandmark::onCancelClickedMnikolenko Productengine