Changeset 250934 in webkit
- Timestamp:
- Oct 9, 2019 2:29:19 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r250904 r250934 1 2019-10-09 Andy Estes <aestes@apple.com> 2 3 [Cocoa] IPC::decode should gracefully handle a nil allowed class 4 https://bugs.webkit.org/show_bug.cgi?id=202753 5 6 Reviewed by Geoffrey Garen. 7 8 If IPC::decode is called with a nil allowed class, an NSInvalidArgumentException will be 9 thrown when trying to create an NSArray literal with a nil value. Depending on who calls 10 IPC::decode, this exception might or might not be caught, leading to dropped messages or 11 crashes. 12 13 One case of this happening is tracked by rdar://problem/55839467. In this case, the nil 14 allowed class was due to a build misconfiguration, and the exception caused the UI process 15 to not respond to a synchronous IPC message, hanging the WebContent process. 16 17 rdar://problem/55839467 was resolved by fixing the build misconfiguration, but this patch 18 improves IPC::decode so that a nil allowed class results in a message decoding failure 19 rather than a maybe-caught NSException. 20 21 * Shared/Cocoa/ArgumentCodersCocoa.h: 22 (IPC::decode): 23 1 24 2019-10-09 youenn fablet <youenn@apple.com> 2 25 -
trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
r242930 r250934 85 85 Optional<RetainPtr<T>> decode(Decoder& decoder, Class allowedClass) 86 86 { 87 return decode<T>(decoder, @[ allowedClass]);87 return decode<T>(decoder, allowedClass ? @[ allowedClass ] : @[ ]); 88 88 } 89 89
Note: See TracChangeset
for help on using the changeset viewer.