https://bugs.webkit.org/show_bug.cgi?id=193204
<rdar://problem/
45550428>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2019-01-07
Reviewed by Devin Rousso.
* UIProcess/mac/RemoteWebInspectorProxyMac.mm:
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
* UIProcess/mac/WKInspectorViewController.mm:
(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239697
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-01-07 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Remote inspector can crash if attempting to navigate inspector page
+ https://bugs.webkit.org/show_bug.cgi?id=193204
+ <rdar://problem/45550428>
+
+ Reviewed by Devin Rousso.
+
+ * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
+ (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
+ * UIProcess/mac/WKInspectorViewController.mm:
+ (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
+
2019-01-07 Eric Carlson <eric.carlson@apple.com>
Deactivate audio session whenever possible
{
m_objCAdapter = adoptNS([[WKRemoteWebInspectorProxyObjCAdapter alloc] initWithRemoteWebInspectorProxy:this]);
- m_inspectorView = adoptNS([[WKInspectorViewController alloc] initWithInspectedPage:nil]);
+ m_inspectorView = adoptNS([[WKInspectorViewController alloc] initWithInspectedPage:nullptr]);
[m_inspectorView.get() setDelegate:m_objCAdapter.get()];
m_window = WebInspectorProxy::createFrontendWindow(NSZeroRect);
decisionHandler(WKNavigationActionPolicyCancel);
// And instead load it in the inspected page.
- _inspectedPage->loadRequest(navigationAction.request);
+ if (_inspectedPage)
+ _inspectedPage->loadRequest(navigationAction.request);
}
// MARK: WKInspectorWKWebViewDelegate methods