Title: [222940] trunk/Source/WebCore
- Revision
- 222940
- Author
- [email protected]
- Date
- 2017-10-05 16:02:52 -0700 (Thu, 05 Oct 2017)
Log Message
Web Inspector: EventLoop::cycle() should not send nil NSEvents
https://bugs.webkit.org/show_bug.cgi?id=177971
<rdar://problem/20387399>
Reviewed by Joseph Pecoraro.
It is possible for the next matching event to be nil.
WebKit clients don't expect to be sent a nil NSEvent, so add a null check here.
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222939 => 222940)
--- trunk/Source/WebCore/ChangeLog 2017-10-05 22:52:27 UTC (rev 222939)
+++ trunk/Source/WebCore/ChangeLog 2017-10-05 23:02:52 UTC (rev 222940)
@@ -1,3 +1,17 @@
+2017-10-05 Brian Burg <[email protected]>
+
+ Web Inspector: EventLoop::cycle() should not send nil NSEvents
+ https://bugs.webkit.org/show_bug.cgi?id=177971
+ <rdar://problem/20387399>
+
+ Reviewed by Joseph Pecoraro.
+
+ It is possible for the next matching event to be nil.
+ WebKit clients don't expect to be sent a nil NSEvent, so add a null check here.
+
+ * platform/mac/EventLoopMac.mm:
+ (WebCore::EventLoop::cycle):
+
2017-10-05 Chris Dumez <[email protected]>
Drop unused parameters for CookiesStrategy::cookiesEnabled()
Modified: trunk/Source/WebCore/platform/mac/EventLoopMac.mm (222939 => 222940)
--- trunk/Source/WebCore/platform/mac/EventLoopMac.mm 2017-10-05 22:52:27 UTC (rev 222939)
+++ trunk/Source/WebCore/platform/mac/EventLoopMac.mm 2017-10-05 23:02:52 UTC (rev 222940)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2017 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,7 +31,8 @@
void EventLoop::cycle()
{
[NSApp setWindowsNeedUpdate:YES];
- [NSApp sendEvent:[NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05] inMode:NSDefaultRunLoopMode dequeue:YES]];
+ if (NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05] inMode:NSDefaultRunLoopMode dequeue:YES])
+ [NSApp sendEvent:event];
}
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes