diff options
| author | bunnei <bunneidev@gmail.com> | 2021-04-30 14:48:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-30 14:48:32 -0700 |
| commit | fa3ffff8ded9ca071908701c911142001cc62f73 (patch) | |
| tree | 1db00dd99592d3cfb3807606b1d3edbf72a4e1ff /src/yuzu/applets/web_browser.h | |
| parent | aab57b79754e268c142b8ad7c5db11affe0a4cca (diff) | |
| parent | 0af182baa2f35d91b8dfaf0b5a8fef06b77dd03a (diff) | |
Merge pull request #6257 from Morph1984/fix-use-after-free-webapplet
applets/web: Fix a use-after-free when passing in the URL string
Diffstat (limited to 'src/yuzu/applets/web_browser.h')
| -rw-r--r-- | src/yuzu/applets/web_browser.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/yuzu/applets/web_browser.h b/src/yuzu/applets/web_browser.h index 47f960d69..7ad07409f 100644 --- a/src/yuzu/applets/web_browser.h +++ b/src/yuzu/applets/web_browser.h @@ -58,7 +58,7 @@ public: * @param main_url The url to the file. * @param additional_args Additional arguments appended to the main url. */ - void LoadLocalWebPage(std::string_view main_url, std::string_view additional_args); + void LoadLocalWebPage(const std::string& main_url, const std::string& additional_args); /** * Loads an external website. Cannot be used to load local urls. @@ -66,7 +66,7 @@ public: * @param main_url The url to the website. * @param additional_args Additional arguments appended to the main url. */ - void LoadExternalWebPage(std::string_view main_url, std::string_view additional_args); + void LoadExternalWebPage(const std::string& main_url, const std::string& additional_args); /** * Sets the background color of the web page. @@ -193,16 +193,17 @@ public: explicit QtWebBrowser(GMainWindow& parent); ~QtWebBrowser() override; - void OpenLocalWebPage(std::string_view local_url, std::function<void()> extract_romfs_callback_, + void OpenLocalWebPage(const std::string& local_url, + std::function<void()> extract_romfs_callback_, std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const override; - void OpenExternalWebPage(std::string_view external_url, + void OpenExternalWebPage(const std::string& external_url, std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback_) const override; signals: - void MainWindowOpenWebPage(std::string_view main_url, std::string_view additional_args, + void MainWindowOpenWebPage(const std::string& main_url, const std::string& additional_args, bool is_local) const; private: |
