Fix null pointer crash on macOS under WebKit::WebProcessPool::platformInitialize().
rdar://problem/60330751
Created attachment 393287 [details] Patch
Comment on attachment 393287 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393287&action=review r=me > Source/WTF/wtf/cocoa/SoftLinking.h:53 > +} I am shocked this doesn't already exist -- but it doesn't! > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:702 > + [[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()]; Isn't it okay to remove nil objects? I can't remember (though of course, some containers blow up if you use nil things so maybe this is one of those cases).
Committed r258284: <https://trac.webkit.org/changeset/258284/webkit>
(In reply to Brent Fulgham from comment #3) > Comment on attachment 393287 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=393287&action=review > > r=me > > > Source/WTF/wtf/cocoa/SoftLinking.h:53 > > +} > > I am shocked this doesn't already exist -- but it doesn't! > > > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:702 > > + [[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()]; > > Isn't it okay to remove nil objects? I can't remember (though of course, > some containers blow up if you use nil things so maybe this is one of those > cases). I believe the null check is needed. Thanks for reviewing!
Reopening to attach new patch.
Created attachment 393291 [details] Patch
Comment on attachment 393291 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393291&action=review Looks like Tim already got it, but r=me, too! > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:458 > + if (libAccessibilityLibrary() && _AXSApplicationAccessibilityEnabled()) { Oops!
Created attachment 393292 [details] Patch
Committed unreviewed build fix: <https://trac.webkit.org/changeset/258289/webkit>