WebKit Bugzilla
Attachment 346062 Details for
Bug 188170
: Potential null dereference under WebPage::applicationDidBecomeActive()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188170-20180730090855.patch (text/plain), 2.63 KB, created by
Chris Dumez
on 2018-07-30 09:08:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-07-30 09:08:55 PDT
Size:
2.63 KB
patch
obsolete
>Subversion Revision: 234367 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index f051f4140704cc10e86e403fa08b88af89fda0a9..a70d1f2df337400a56086eee6320c4e34fc70483 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-07-30 Chris Dumez <cdumez@apple.com> >+ >+ Potential null dereference under WebPage::applicationDidBecomeActive() >+ https://bugs.webkit.org/show_bug.cgi?id=188170 >+ <rdar://problem/37493418> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebPage::m_page gets nulled out when the page is closed but the WebPage object may receive IPC >+ until it gets destroyed. Therefore, we need to null-check m_page before using it in IPC message >+ handlers. >+ >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::applicationDidEnterBackground): >+ (WebKit::WebPage::applicationWillEnterForeground): >+ (WebKit::WebPage::applicationDidBecomeActive): >+ > 2018-07-29 Wenson Hsieh <wenson_hsieh@apple.com> > > Fix incorrect guards around a method declaration in PageClient.h >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index c7944932c102a64ce6d3a3be7cb6516a5b31262b..bd9553359296f315577853e47217902ac0a2d9d4 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -2796,7 +2796,8 @@ void WebPage::applicationDidEnterBackground(bool isSuspendedUnderLock) > m_isSuspendedUnderLock = isSuspendedUnderLock; > setLayerTreeStateIsFrozen(true); > >- m_page->applicationDidEnterBackground(); >+ if (m_page) >+ m_page->applicationDidEnterBackground(); > } > > void WebPage::applicationDidFinishSnapshottingAfterEnteringBackground() >@@ -2812,13 +2813,15 @@ void WebPage::applicationWillEnterForeground(bool isSuspendedUnderLock) > > [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}]; > >- m_page->applicationWillEnterForeground(); >+ if (m_page) >+ m_page->applicationWillEnterForeground(); > } > > void WebPage::applicationDidBecomeActive() > { > [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidBecomeActiveNotification object:nil]; >- m_page->applicationDidBecomeActive(); >+ if (m_page) >+ m_page->applicationDidBecomeActive(); > } > > static inline void adjustVelocityDataForBoundedScale(double& horizontalVelocity, double& verticalVelocity, double& scaleChangeRate, double exposedRectScale, double minimumScale, double maximumScale)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188170
: 346062