Changeset 244970 in webkit
- Timestamp:
- May 6, 2019 1:24:29 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r244969 r244970 1 2019-05-06 Alex Christensen <achristensen@webkit.org> 2 3 Null check m_mainFrame in WebPageProxy.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=197618 5 <rdar://problem/47463054> 6 7 Reviewed by Geoffrey Garen. 8 9 It's already null checked in some places, and the places where it isn't are causing crashes. 10 Let's fix all of them. 11 12 * UIProcess/WebPageProxy.cpp: 13 (WebKit::WebPageProxy::decidePolicyForNavigationAction): 14 (WebKit::WebPageProxy::decidePolicyForNewWindowAction): 15 (WebKit::WebPageProxy::createNewPage): 16 1 17 2019-05-06 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r244966 r244970 4678 4678 4679 4679 auto userInitiatedActivity = process->userInitiatedActivity(navigationActionData.userGestureTokenIdentifier); 4680 bool shouldOpenAppLinks = !m_shouldSuppressAppLinksInNextNavigationPolicyDecision && destinationFrameInfo->isMainFrame() && !hostsAreEqual(URL({ }, m_mainFrame->url()), request.url()) && navigationActionData.navigationType != WebCore::NavigationType::BackForward; 4680 bool shouldOpenAppLinks = !m_shouldSuppressAppLinksInNextNavigationPolicyDecision 4681 && destinationFrameInfo->isMainFrame() 4682 && (m_mainFrame ? !hostsAreEqual(m_mainFrame->url(), request.url()) : false) 4683 && navigationActionData.navigationType != WebCore::NavigationType::BackForward; 4681 4684 4682 4685 auto navigationAction = API::NavigationAction::create(WTFMove(navigationActionData), sourceFrameInfo.get(), destinationFrameInfo.ptr(), WTF::nullopt, WTFMove(request), originalRequest.url(), shouldOpenAppLinks, WTFMove(userInitiatedActivity), mainFrameNavigation); … … 4808 4811 4809 4812 auto userInitiatedActivity = m_process->userInitiatedActivity(navigationActionData.userGestureTokenIdentifier); 4810 bool shouldOpenAppLinks = !hostsAreEqual(URL({ }, m_mainFrame->url()), request.url());4813 bool shouldOpenAppLinks = m_mainFrame ? !hostsAreEqual(m_mainFrame->url(), request.url()) : false; 4811 4814 auto navigationAction = API::NavigationAction::create(WTFMove(navigationActionData), sourceFrameInfo.get(), nullptr, frameName, WTFMove(request), URL { }, shouldOpenAppLinks, WTFMove(userInitiatedActivity)); 4812 4815 … … 4995 4998 MESSAGE_CHECK(m_process, m_process->webFrame(originatingFrameInfoData.frameID)); 4996 4999 auto originatingFrameInfo = API::FrameInfo::create(originatingFrameInfoData, m_process->webPage(originatingPageID)); 4997 auto mainFrameURL = m_mainFrame ->url();5000 auto mainFrameURL = m_mainFrame ? m_mainFrame->url() : URL(); 4998 5001 auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply)] (RefPtr<WebPageProxy> newPage) mutable { 4999 5002 if (!newPage) {
Note: See TracChangeset
for help on using the changeset viewer.