Closed
Bug 1166860
Opened 11 years ago
Closed 11 years ago
Crash in BrowserViewController.webView(, didFinishNavigation:)
Categories
(Firefox for iOS :: Browser, defect)
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| fennec | + | --- |
People
(Reporter: st3fan, Assigned: st3fan)
References
Details
(Keywords: crash)
func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
let tab: Browser! = tabManager[webView]
tab.expireSnackbars()
let notificationCenter = NSNotificationCenter.defaultCenter()
var info = [NSObject: AnyObject]()
info["url"] = tab.displayURL
info["title"] = tab.title
>>> if let visitType = self.getVisitTypeForTab(tab, navigation: navigation)?.rawValue {
info["visitType"] = visitType
}
notificationCenter.postNotificationName("LocationChange", object: self, userInfo: info)
Because navigation is nil. This is interesting because I don't think that is documented to have nil as a value.
| Assignee | ||
Comment 1•11 years ago
|
||
STR taken from bug 1165745
Steps to Reproduce:
1. Open cnn.com
2. Click the first article you see
3. Verify it has reader mode available (Reader mode icon appears in URL bar)
4. Tap the "Back" button
5. Tap the "Forward" button, verify Reader mode is still available (be patient, it appears ~5 seconds after the webpage loads)
6. Tap the "Back" button
7. Tap the "Forward" button
First time going back is ok. Second time crashes.
| Assignee | ||
Comment 2•11 years ago
|
||
This is the WebKit code. See the FIXME comment. Means we can expect nil.
void NavigationState::LoaderClient::didFinishLoadForFrame(WebPageProxy& page, WebFrameProxy& webFrameProxy, API::Navigation* navigation, API::Object*)
{
if (!webFrameProxy.isMainFrame())
return;
if (!m_navigationState.m_navigationDelegateMethods.webViewDidFinishNavigation)
return;
auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
if (!navigationDelegate)
return;
// FIXME: We should assert that navigation is not null here, but it's currently null for some navigations through the page cache.
WKNavigation *wkNavigation = nil;
if (navigation)
wkNavigation = wrapper(*navigation);
[navigationDelegate webView:m_navigationState.m_webView didFinishNavigation:wkNavigation];
}
Comment 3•11 years ago
|
||
Ugh. Yay for other people's bugs! Still, should be an easy fix.
Updated•11 years ago
|
| Assignee | ||
Comment 4•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Assignee: nobody → sarentz
tracking-fennec: ? → +
You need to log in
before you can comment on or make changes to this bug.
Description
•