diff options
| author | Callum Prentice <callum@lindenlab.com> | 2025-08-11 18:45:15 -0700 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2025-08-11 18:45:15 -0700 |
| commit | 1bbad3fd00a9db28944bab1ec9c0e10fd5d1c2f2 (patch) | |
| tree | ff0e1132ece49aaebad07529bebbdd00d3381331 /indra/media_plugins/cef | |
| parent | 356b682f617c708c08de9f87b6f25e7683e701fb (diff) | |
This commit introduces CEF 139 which works now that each media instance has its own cache/cookies folder (previous commit). It also changes the Test Bookmarks page to a heavily updated one with new links and a filter/search mechanism
Diffstat (limited to 'indra/media_plugins/cef')
| -rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index a96187119e..d77eb83b00 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -71,7 +71,7 @@ private: void onLoadStartCallback(); void onRequestExitCallback(); void onLoadEndCallback(int httpStatusCode, std::string url); - void onLoadError(int status, const std::string error_text); + void onLoadError(int status, const std::string error_text, const std::string error_url); void onAddressChangeCallback(std::string url); void onOpenPopupCallback(std::string url, std::string target); bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); @@ -249,15 +249,17 @@ void MediaPluginCEF::onLoadStartCallback() ///////////////////////////////////////////////////////////////////////////////// // -void MediaPluginCEF::onLoadError(int status, const std::string error_text) +void MediaPluginCEF::onLoadError(int status, const std::string error_text, const std::string error_url) { std::stringstream msg; - msg << "<b>Loading error!</b>"; + msg << "<b>Loading error</b>"; msg << "<p>"; - msg << "Message: " << error_text; - msg << "<br>"; - msg << "Code: " << status; + msg << "Error message: " << error_text; + msg << "<p>"; + msg << "Error URL: <tt>" << error_url << "</tt>"; + msg << "<p>"; + msg << "Error code: " << status; mCEFLib->showBrowserMessage(msg.str()); } @@ -614,7 +616,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnTooltipCallback(std::bind(&MediaPluginCEF::onTooltipCallback, this, std::placeholders::_1)); mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this)); mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1, std::placeholders::_2)); - mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2)); + + // CEF 139 seems to have introduced a loading failure at the login page (only??) I haven't seen it on + // any other page and it only happens about 1 in 8 times. Without this handler for the error page + // (red box, error message/code/url) the page load recovers after display a brief built in error. + // Not ideal but better than stopping altgoether. Will restore this once I discover the error. + //mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1)); mCEFLib->setOnOpenPopupCallback(std::bind(&MediaPluginCEF::onOpenPopupCallback, this, std::placeholders::_1, std::placeholders::_2)); mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); |
