Skip to content
Permalink
Browse files
Drop useless check in SpeculativeLoadManager::registerLoad()
https://bugs.webkit.org/show_bug.cgi?id=157204

Reviewed by Antti Koivisto.

Drop useless check in SpeculativeLoadManager::registerLoad(). There is
no way to end up this code path with a non-HTTP family request.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):

Canonical link: https://commits.webkit.org/175321@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Apr 30, 2016
1 parent eace627 commit 90aabfd60d0ba6b63e60e11e03a05b388aeb85b6
Showing with 15 additions and 1 deletion.
  1. +13 −0 Source/WebKit2/ChangeLog
  2. +2 −1 Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
@@ -1,3 +1,16 @@
2016-04-29 Chris Dumez <cdumez@apple.com>

Drop useless check in SpeculativeLoadManager::registerLoad()
https://bugs.webkit.org/show_bug.cgi?id=157204

Reviewed by Antti Koivisto.

Drop useless check in SpeculativeLoadManager::registerLoad(). There is
no way to end up this code path with a non-HTTP family request.

* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):

2016-04-29 Brian Burg <bburg@apple.com>

Web Automation: add SPI to mark an existing NSEvent as synthesized for automation
@@ -358,8 +358,9 @@ bool SpeculativeLoadManager::retrieve(const GlobalFrameID& frameID, const Key& s
void SpeculativeLoadManager::registerLoad(const GlobalFrameID& frameID, const ResourceRequest& request, const Key& resourceKey)
{
ASSERT(RunLoop::isMain());
ASSERT(request.url().protocolIsInHTTPFamily());

if (!request.url().protocolIsInHTTPFamily() || request.httpMethod() != "GET")
if (request.httpMethod() != "GET")
return;

auto isMainResource = request.requester() == ResourceRequest::Requester::Main;

0 comments on commit 90aabfd

Please sign in to comment.