Disable dangling ptr check for PendingRequest::request_ (fixes #3743)
The InterceptedRequestHandlerWrapper object may be deleted (likely via ~InterceptedRequest) while the task to call InterceptedRequestHandlerWrapper:ContinueCreateURLLoaderNetworkObserver is still pending. That binding holds a WeakPtr<InterceptedRequestHandlerWrapper> (which is now nullptr) resulting in the bound std::unique_ptr<PendingRequest> being deleted while still holding a raw_ptr<network::ResourceRequest> to the already-deleted object. This is always safe (raw_ptr will never be dereferenced) because of the WeakPtr check.
This commit is contained in:
parent
da971da381
commit
9ca230c960
|
@ -147,7 +147,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t id_;
|
const int32_t id_;
|
||||||
raw_ptr<network::ResourceRequest> request_;
|
raw_ptr<network::ResourceRequest, DisableDanglingPtrDetection> request_;
|
||||||
const bool request_was_redirected_;
|
const bool request_was_redirected_;
|
||||||
OnBeforeRequestResultCallback callback_;
|
OnBeforeRequestResultCallback callback_;
|
||||||
CancelRequestCallback cancel_callback_;
|
CancelRequestCallback cancel_callback_;
|
||||||
|
|
Loading…
Reference in New Issue