[webkit-reviews] review granted: [Bug 203620] [SOUP] HSTS Support causes page loading to fail with "Operation was cancelled" : [Attachment 386681] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 3 09:00:26 PST 2020
Michael Catanzaro <mcatanzaro at gnome.org> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 203620: [SOUP] HSTS Support causes page loading to fail with "Operation was
cancelled"
https://bugs.webkit.org/show_bug.cgi?id=203620
Attachment 386681: Patch
https://bugs.webkit.org/attachment.cgi?id=386681&action=review
--- Comment #16 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 386681
--> https://bugs.webkit.org/attachment.cgi?id=386681
Patch
Aha, nice find!
One problem though: the user data parameter NetworkDataTaskSoup* task is passed
to this callback using leakRef(), but now you've added this new early return
before the ref is adopted, causing the task to leak. So this needs to go down
below that at least. How about like this:
RefPtr<NetworkDataTaskSoup> protectedThis = adoptRef(task);
if (soupRequest != task->m_soupRequest.get()) {
// ...
}
if (task->state() == State::Canceling || task->state() == State::Completed ||
!task->m_client) {
// ...
}
More information about the webkit-reviews
mailing list