Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit edf7584

Browse files
author
Ian Macphail
committed
[[ libbrowser ]] Queue new load requests until the previous request is finished
This patch delays load requests sent to a WKWebView if there is on ongoing request, waiting until that request has finished before making the new request. This fixes an issue on iOS where the WebKit subprocess would be blocked from reading HTML files within an app's sandboxed documents folder if multiple requests are made without waiting for the previous request to begin.
1 parent 9e2bcc9 commit edf7584

File tree

2 files changed

+263
-77
lines changed

2 files changed

+263
-77
lines changed

libbrowser/src/libbrowser_wkwebview.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class MCWKWebViewBrowser : public MCBrowserBase
5454

5555
void SyncJavaScriptHandlers();
5656

57+
public:
58+
// return the webview used by the browser class
59+
bool GetWebView(WKWebView *&r_view);
60+
5761
protected:
5862
bool GetUrl(char *& r_url);
5963

@@ -99,7 +103,6 @@ class MCWKWebViewBrowser : public MCBrowserBase
99103
bool SetMediaPlaybackRequiresUserAction(bool p_value);
100104

101105
private:
102-
bool GetWebView(WKWebView *&r_view);
103106
bool GetContainerView(UIView *&r_view);
104107

105108
bool Reconfigure(void);

0 commit comments

Comments
 (0)