Don't execute URLRequest callback for already canceled requests (issue #1685)

This commit is contained in:
Marshall Greenblatt 2015-08-20 17:05:14 -04:00
parent 1999a3f237
commit 9ec03906a8
1 changed files with 3 additions and 1 deletions

View File

@ -122,7 +122,9 @@ class CefBeforeResourceLoadCallbackImpl : public CefRequestCallback {
disconnector->Disconnect();
request->RemoveUserData(UserDataKey());
callback.Run(allow ? net::OK : net::ERR_ABORTED);
// Only execute the callback if the request has not been canceled.
if (request->status().status() != net::URLRequestStatus::CANCELED)
callback.Run(allow ? net::OK : net::ERR_ABORTED);
}
static inline void* UserDataKey() {