Bug 46383 - Fix ResourceHandleWin::cancel() for network resources
Summary: Fix ResourceHandleWin::cancel() for network resources
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks: 43712
  Show dependency treegraph
 
Reported: 2010-09-23 12:01 PDT by Patrick R. Gansterer
Modified: 2010-09-23 12:55 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.13 KB, patch)
2010-09-23 12:04 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-09-23 12:01:11 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-23 12:04:43 PDT
Created attachment 68558 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-09-23 12:22:14 PDT
Comment on attachment 68558 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=68558&action=review

> WebCore/platform/network/win/ResourceHandleWin.cpp:561
> +    if (d->m_requestHandle) {
> +        d->m_internetHandle = 0;
> +        InternetCloseHandle(d->m_requestHandle);
> +        InternetCloseHandle(d->m_connectHandle);
> +    } else

Do we need to clear out d->m_requestHandle, too?
Comment 3 Patrick R. Gansterer 2010-09-23 12:25:31 PDT
(In reply to comment #2)
> Do we need to clear out d->m_requestHandle, too?
No, d->m_requestHandle indicates if it is a network request and won't be used after cancel().
Comment 4 Adam Roben (:aroben) 2010-09-23 12:49:43 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Do we need to clear out d->m_requestHandle, too?
> No, d->m_requestHandle indicates if it is a network request and won't be used after cancel().

That seems like a tricky rule to follow. Maybe we should have a separate member that indicates whether it's a network request or not?
Comment 5 Patrick R. Gansterer 2010-09-23 12:52:41 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Do we need to clear out d->m_requestHandle, too?
> > No, d->m_requestHandle indicates if it is a network request and won't be used after cancel().
> 
> That seems like a tricky rule to follow. Maybe we should have a separate member that indicates whether it's a network request or not?
Might be a good idea. Maybe we can address this when adding handling for data:// urls?
Comment 6 WebKit Commit Bot 2010-09-23 12:55:24 PDT
Comment on attachment 68558 [details]
Patch

Clearing flags on attachment: 68558

Committed r68184: <http://trac.webkit.org/changeset/68184>
Comment 7 WebKit Commit Bot 2010-09-23 12:55:29 PDT
All reviewed patches have been landed.  Closing bug.