Title: [260953] trunk/Source/WebCore
Revision
260953
Author
andresg...@apple.com
Date
2020-04-30 09:48:20 -0700 (Thu, 30 Apr 2020)

Log Message

Fix for crash in AXLogger.
https://bugs.webkit.org/show_bug.cgi?id=211236

Reviewed by Chris Fleizach.

Covered by existing tests.

Notifications may have a null AXCoreObject target, so must check for
nullity before streaming the object.

* accessibility/AXLogger.cpp:
(WebCore::AXLogger::log):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (260952 => 260953)


--- trunk/Source/WebCore/ChangeLog	2020-04-30 16:01:11 UTC (rev 260952)
+++ trunk/Source/WebCore/ChangeLog	2020-04-30 16:48:20 UTC (rev 260953)
@@ -1,3 +1,18 @@
+2020-04-30  Andres Gonzalez  <andresg...@apple.com>
+
+        Fix for crash in AXLogger.
+        https://bugs.webkit.org/show_bug.cgi?id=211236
+
+        Reviewed by Chris Fleizach.
+
+        Covered by existing tests.
+
+        Notifications may have a null AXCoreObject target, so must check for
+        nullity before streaming the object.
+
+        * accessibility/AXLogger.cpp:
+        (WebCore::AXLogger::log):
+
 2020-04-30  Charlie Turner  <ctur...@igalia.com>
 
         [clang 11] fix build errors due to -WWc++11-narrowing

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (260952 => 260953)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2020-04-30 16:01:11 UTC (rev 260952)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2020-04-30 16:48:20 UTC (rev 260953)
@@ -84,7 +84,11 @@
 void AXLogger::log(const std::pair<RefPtr<AXCoreObject>, AXObjectCache::AXNotification>& notification)
 {
     TextStream stream(TextStream::LineMode::MultipleLine);
-    stream << "Notification " << notification.second << " for object " << *notification.first;
+    stream << "Notification " << notification.second << " for object ";
+    if (notification.first)
+        stream << *notification.first;
+    else
+        stream << "null";
     LOG(Accessibility, "%s", stream.release().utf8().data());
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to