Fix crash when sending failure message to closed WebProcess
Created attachment 283064 [details] Patch
Comment on attachment 283064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283064&action=review Please explain how this could be testable if we had HTTP tests in TestWebKitAPI > Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409 > + } else if (messageSenderConnection()) > + messageSenderConnection()->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0); } else if (auto* connection = messageSenderConnection()) connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
https://trac.webkit.org/changeset/202939
Followed up in https://trac.webkit.org/changeset/202940
Comment on attachment 283064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283064&action=review >> Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409 >> + messageSenderConnection()->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0); > > } else if (auto* connection = messageSenderConnection()) > connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0); I don't think messageSenderConnection() can return null unless |this| has been destroyed.
Comment on attachment 283064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283064&action=review >>> Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409 >>> + messageSenderConnection()->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0); >> >> } else if (auto* connection = messageSenderConnection()) >> connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0); > > I don't think messageSenderConnection() can return null unless |this| has been destroyed. My bet is that we were getting here with a destroyed NetworkResourceLoader because of https://bugs.webkit.org/show_bug.cgi?id=159691