Bug 128022 - Add webView:didFailNavigation:withError: delegate method
Summary: Add webView:didFailNavigation:withError: delegate method
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 14:53 PST by Anders Carlsson
Modified: 2014-02-01 09:27 PST (History)
0 users

See Also:


Attachments
Patch (13.19 KB, patch)
2014-01-31 14:53 PST, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-01-31 14:53:34 PST
Add webView:didFailNavigation:withError: delegate method
Comment 1 Anders Carlsson 2014-01-31 14:53:57 PST
Created attachment 222857 [details]
Patch
Comment 2 Darin Adler 2014-01-31 15:39:56 PST
Comment on attachment 222857 [details]
Patch

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

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:743
> +        virtual void didFailLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* frame, uint64_t navigationID, const ResourceError& error, API::Object* userData) override

Won’t we get a warning because we are not using navigationID here?

> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:487
> +    WebDocumentLoader& documentLoader = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader());

Do we have a checked version of this cast? Should we?

Seems like coreFrame should return a reference, not a pointer.
Comment 3 Anders Carlsson 2014-02-01 09:24:21 PST
(In reply to comment #2)
> (From update of attachment 222857 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=222857&action=review
> 
> > Source/WebKit2/UIProcess/API/C/WKPage.cpp:743
> > +        virtual void didFailLoadWithErrorForFrame(WebPageProxy* page, WebFrameProxy* frame, uint64_t navigationID, const ResourceError& error, API::Object* userData) override
> 
> Won’t we get a warning because we are not using navigationID here?

I don't think we enable that warning.

> 
> > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:487
> > +    WebDocumentLoader& documentLoader = static_cast<WebDocumentLoader&>(*m_frame->coreFrame()->loader().documentLoader());
> 
> Do we have a checked version of this cast? Should we?

We're sure that all document loaders are created by WebKit so I don't think we do.

> 
> Seems like coreFrame should return a reference, not a pointer.

I think the member variable backing coreFrame can end up being nulled out.
Comment 4 Anders Carlsson 2014-02-01 09:27:04 PST
Committed r163243: <http://trac.webkit.org/changeset/163243>