Title: [200961] trunk/Source/WebKit2
Revision
200961
Author
[email protected]
Date
2016-05-16 13:01:03 -0700 (Mon, 16 May 2016)

Log Message

Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
https://bugs.webkit.org/show_bug.cgi?id=157737
<rdar://problem/26292946>

Reviewed by Timothy Hatcher.

* UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::platformSimulateKeyStroke):
AppKit expects characters passed to [NSEvent keyEventWithType:...]
to be non-nil even if there are no characters. Initialize characters
to the empty string @"". It will be overwritten if the keystroke should
produce any unicode characters.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (200960 => 200961)


--- trunk/Source/WebKit2/ChangeLog	2016-05-16 19:57:55 UTC (rev 200960)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-16 20:01:03 UTC (rev 200961)
@@ -1,5 +1,20 @@
 2016-05-16  Brian Burg  <[email protected]>
 
+        Crash simulating keystrokes at WebKit::WebAutomationSession::platformSimulateKeyStroke
+        https://bugs.webkit.org/show_bug.cgi?id=157737
+        <rdar://problem/26292946>
+
+        Reviewed by Timothy Hatcher.
+
+        * UIProcess/Cocoa/WebAutomationSessionCocoa.mm:
+        (WebKit::WebAutomationSession::platformSimulateKeyStroke):
+        AppKit expects characters passed to [NSEvent keyEventWithType:...]
+        to be non-nil even if there are no characters. Initialize characters
+        to the empty string @"". It will be overwritten if the keystroke should
+        produce any unicode characters.
+
+2016-05-16  Brian Burg  <[email protected]>
+
         Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
         https://bugs.webkit.org/show_bug.cgi?id=157739
 

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebAutomationSessionCocoa.mm (200960 => 200961)


--- trunk/Source/WebKit2/UIProcess/Cocoa/WebAutomationSessionCocoa.mm	2016-05-16 19:57:55 UTC (rev 200960)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebAutomationSessionCocoa.mm	2016-05-16 20:01:03 UTC (rev 200961)
@@ -180,7 +180,7 @@
     // The likely keyCode for the virtual key as defined in <HIToolbox/Events.h>.
     int keyCode = 0;
     // Typical characters produced by the virtual key, if any.
-    NSString *characters;
+    NSString *characters = @"";
 
     // FIXME: this function and the Automation protocol enum should probably adopt key names
     // from W3C UIEvents standard. For more details: https://w3c.github.io/uievents-code/
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to