Title: [231303] tags/Safari-606.1.16/Source/WebKit
- Revision
- 231303
- Author
- [email protected]
- Date
- 2018-05-03 07:22:47 -0700 (Thu, 03 May 2018)
Log Message
Cherry-pick r231295. rdar://problem/39928458
AX: Missing kAXSWebAccessibilityEventsEnabledNotification causes a crash
https://bugs.webkit.org/show_bug.cgi?id=185237
Reviewed by Dan Bernstein.
When libAccessibility.dylib is missing, the compiler would optimize out the global
notification and lead to a crash. Fixed it by using the isNullFunction check instead,
since we are sure the global notification would be there when the corresponding function
is available.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: tags/Safari-606.1.16/Source/WebKit/ChangeLog (231302 => 231303)
--- tags/Safari-606.1.16/Source/WebKit/ChangeLog 2018-05-03 13:46:06 UTC (rev 231302)
+++ tags/Safari-606.1.16/Source/WebKit/ChangeLog 2018-05-03 14:22:47 UTC (rev 231303)
@@ -1,3 +1,38 @@
+2018-05-03 Jason Marcell <[email protected]>
+
+ Cherry-pick r231295. rdar://problem/39928458
+
+ AX: Missing kAXSWebAccessibilityEventsEnabledNotification causes a crash
+ https://bugs.webkit.org/show_bug.cgi?id=185237
+
+ Reviewed by Dan Bernstein.
+
+ When libAccessibility.dylib is missing, the compiler would optimize out the global
+ notification and lead to a crash. Fixed it by using the isNullFunction check instead,
+ since we are sure the global notification would be there when the corresponding function
+ is available.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-05-02 Nan Wang <[email protected]>
+
+ AX: Missing kAXSWebAccessibilityEventsEnabledNotification causes a crash
+ https://bugs.webkit.org/show_bug.cgi?id=185237
+
+ Reviewed by Dan Bernstein.
+
+ When libAccessibility.dylib is missing, the compiler would optimize out the global
+ notification and lead to a crash. Fixed it by using the isNullFunction check instead,
+ since we are sure the global notification would be there when the corresponding function
+ is available.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+
2018-05-02 Jason Marcell <[email protected]>
Cherry-pick r231257. rdar://problem/39916202
Modified: tags/Safari-606.1.16/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (231302 => 231303)
--- tags/Safari-606.1.16/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-05-03 13:46:06 UTC (rev 231302)
+++ tags/Safari-606.1.16/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-05-03 14:22:47 UTC (rev 231303)
@@ -694,8 +694,9 @@
#endif
#if ENABLE(ACCESSIBILITY_EVENTS)
- const auto* notificationPtr = &kAXSWebAccessibilityEventsEnabledNotification;
- if (notificationPtr)
+ // Check _AXSWebAccessibilityEventsEnabled here to avoid compiler optimizing
+ // out the null check of kAXSWebAccessibilityEventsEnabledNotification.
+ if (!isNullFunctionPointer(_AXSWebAccessibilityEventsEnabled))
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), accessibilityEventsEnabledChangedCallback, kAXSWebAccessibilityEventsEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
[self _updateAccessibilityEventsEnabled];
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes