Skip to content

Commit

Permalink
browser(webkit): do not crash when opening inspector on mac (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Jan 29, 2020
1 parent 6faf74b commit afc0222
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion browser_patches/webkit/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1121
1122
18 changes: 14 additions & 4 deletions browser_patches/webkit/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -10189,7 +10189,7 @@ index 8016b56c160acc7b4269600f07f737b3793767bb..651a86c41af3305e215d7baf7f149cc7
void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&) override;
void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&) override;
diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
index bf7dc132b1ef9e081275cbecb562dd1bfd3a2a0e..63eb41bc3e52c97b933e6bd8288f6824f71ca675 100644
index bf7dc132b1ef9e081275cbecb562dd1bfd3a2a0e..e389900c57adb50ae8802b58fd1992c01f44e8ed 100644
--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
@@ -78,6 +78,7 @@
Expand Down Expand Up @@ -10244,7 +10244,17 @@ index bf7dc132b1ef9e081275cbecb562dd1bfd3a2a0e..63eb41bc3e52c97b933e6bd8288f6824
NSView *activeView = this->activeView();
NSWindow *activeViewWindow = activeWindow();

@@ -456,6 +473,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)
@@ -278,7 +295,8 @@ void PageClientImpl::didRelaunchProcess()

void PageClientImpl::preferencesDidChange()
{
- m_impl->preferencesDidChange();
+ if (m_impl)
+ m_impl->preferencesDidChange();
}

void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
@@ -456,6 +474,8 @@ IntRect PageClientImpl::rootViewToAccessibilityScreen(const IntRect& rect)

void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool eventWasHandled)
{
Expand All @@ -10253,7 +10263,7 @@ index bf7dc132b1ef9e081275cbecb562dd1bfd3a2a0e..63eb41bc3e52c97b933e6bd8288f6824
m_impl->doneWithKeyEvent(event.nativeEvent(), eventWasHandled);
}

@@ -760,6 +779,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR
@@ -760,6 +780,13 @@ void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntR

#endif // ENABLE(FULLSCREEN_API)

Expand All @@ -10267,7 +10277,7 @@ index bf7dc132b1ef9e081275cbecb562dd1bfd3a2a0e..63eb41bc3e52c97b933e6bd8288f6824
void PageClientImpl::navigationGestureDidBegin()
{
m_impl->dismissContentRelativeChildWindowsWithAnimation(true);
@@ -931,6 +957,9 @@ void PageClientImpl::didRestoreScrollPosition()
@@ -931,6 +958,9 @@ void PageClientImpl::didRestoreScrollPosition()

bool PageClientImpl::windowIsFrontWindowUnderMouse(const NativeWebMouseEvent& event)
{
Expand Down

0 comments on commit afc0222

Please sign in to comment.