In some cases, we need a way to asynchronously cancel pending loads. Patch incoming.
Created attachment 242083 [details] Patch
Comment on attachment 242083 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=242083&action=review > Source/WebCore/loader/ResourceLoader.cpp:289 > +void ResourceLoader::maybeSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&, bool)> callback) Weren't you going to make ResourceRequest be null instead of having a boolean flag?
(In reply to comment #2) > Comment on attachment 242083 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242083&action=review > > > Source/WebCore/loader/ResourceLoader.cpp:289 > > +void ResourceLoader::maybeSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&, bool)> callback) > > Weren't you going to make ResourceRequest be null instead of having a > boolean flag? Yes...I think that version of the patch must have gotten lost on my other computer. Will fix now.
Created attachment 242092 [details] Patch
Comment on attachment 242092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=242092&action=review > Source/WebCore/loader/ResourceLoader.h:96 > + virtual void maybeSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&)> callback); I think you should either call this willSendRequest or willSendRequestAsync. It should also take a ResourceRequest&&.
(In reply to comment #5) > Comment on attachment 242092 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242092&action=review > > > Source/WebCore/loader/ResourceLoader.h:96 > > + virtual void maybeSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse, std::function<void(ResourceRequest&)> callback); > > I think you should either call this willSendRequest or willSendRequestAsync. > It should also take a ResourceRequest&&. I wanted to call it willSendRequestAsync, but due to C++ overloading rules and the fact that there's already a function called that that's protected, with a different signature, it didn't let me. I'll change the signature though.
<rdar://problem/19110616>
Committed r176626: <http://trac.webkit.org/changeset/176626>