Execute HandleExternalProtocolHelper on the UI thread (fixes #3821)
This commit is contained in:
parent
f8ad36e72c
commit
0860ec2f3d
|
@ -140,6 +140,8 @@ void HandleExternalProtocolHelper(
|
|||
const std::optional<url::Origin>& initiating_origin,
|
||||
content::WeakDocumentPtr initiator_document,
|
||||
const net::IsolationInfo& isolation_info) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
// May return nullptr if frame has been deleted or a cross-document navigation
|
||||
// has committed in the same RenderFrameHost.
|
||||
auto initiator_rfh = initiator_document.AsRenderFrameHostIfValid();
|
||||
|
|
|
@ -1116,7 +1116,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
|
|||
init_state_->browser_, init_state_->frame_,
|
||||
state->pending_request_.get(), allow_os_execution);
|
||||
if (allow_os_execution && init_state_->unhandled_request_callback_) {
|
||||
init_state_->unhandled_request_callback_.Run();
|
||||
CEF_POST_TASK(TID_UI, init_state_->unhandled_request_callback_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue