Starting in http://trac.webkit.org/changeset/112571 some apps started seeing exceptions in [WebFrame loadRequest:]
The exception is -[NSURL initFileURLWithPath:]: nil string parameter
Some API clients incorrectly use full paths instead of actual file: URLs so r112571 started assuming all invalid URLs might "path as URL" attempts and tried rewriting them.
Other WebKit clients use loadRequest: with a nil NSURLRequest, or with a request that has a nil NSURL. These URLs are invalid, therefore we started trying to rewrite them, therefore we got the exception.
To continue supporting such clients, we should only rewrite invalid URLs that are also non-null.
In radar as <rdar://problem/11312853>
Created attachment 140264 [details]
Comment on attachment 140264 [details]
r=me, however I have a sinking feeling that the same issue may be present in other code I added for the same reason.
(In reply to comment #2)
> (From update of attachment 140264 [details])
> r=me, however I have a sinking feeling that the same issue may be present in other code I added for the same reason.
Auditing the sites you changed in 112571 and 107355:
[WebView setMainFrameURL:] was changed to use [NSURL _web_URLWithDataAsString:] on the passed in URL string. If the URL string is nil, [NSURL _web_URLWithDataAsString] already does the right thing.
[WebFrame loadHTMLString:baseURL:] and
[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:] and
...were all changed to use [NSURL _webkit_URLFromURLOrPath] on the passed in URLs. So if those URLs are nil, [NSURL _webkit_URLFromURLOrPath] will also return nil.
So the case I fixed here was the only one that needed fixing.
Fixed in http://trac.webkit.org/changeset/116124