Title: [268537] trunk/Source/WebKit
- Revision
- 268537
- Author
- [email protected]
- Date
- 2020-10-15 11:17:40 -0700 (Thu, 15 Oct 2020)
Log Message
Crash in -[WKDateTimePicker setDateTimePickerToInitialValue]
https://bugs.webkit.org/show_bug.cgi?id=217763
<rdar://problem/68635008>
Reviewed by Wenson Hsieh.
Crash occurs due to the use of an autoreleased NSString in
setDateTimePickerToInitialValue. To fix, make the variable
a RetainPtr.
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker setDateTimePickerToInitialValue]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (268536 => 268537)
--- trunk/Source/WebKit/ChangeLog 2020-10-15 18:07:52 UTC (rev 268536)
+++ trunk/Source/WebKit/ChangeLog 2020-10-15 18:17:40 UTC (rev 268537)
@@ -1,3 +1,18 @@
+2020-10-15 Aditya Keerthi <[email protected]>
+
+ Crash in -[WKDateTimePicker setDateTimePickerToInitialValue]
+ https://bugs.webkit.org/show_bug.cgi?id=217763
+ <rdar://problem/68635008>
+
+ Reviewed by Wenson Hsieh.
+
+ Crash occurs due to the use of an autoreleased NSString in
+ setDateTimePickerToInitialValue. To fix, make the variable
+ a RetainPtr.
+
+ * UIProcess/ios/forms/WKDateTimeInputControl.mm:
+ (-[WKDateTimePicker setDateTimePickerToInitialValue]):
+
2020-10-15 Chris Lord <[email protected]>
[GTK][WPE] Add support for smooth scrolling animation with async scrolling
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm (268536 => 268537)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2020-10-15 18:07:52 UTC (rev 268536)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm 2020-10-15 18:17:40 UTC (rev 268537)
@@ -49,7 +49,7 @@
> {
RetainPtr<UIDatePicker> _datePicker;
NSString *_formatString;
- NSString *_initialValue;
+ RetainPtr<NSString> _initialValue;
NSTimeInterval _initialValueAsNumber;
BOOL _shouldRemoveTimeZoneInformation;
BOOL _isTimeInput;
@@ -383,7 +383,7 @@
} else if (_formatString) {
// Convert the string value to a date object for the fields where we have a format string.
RetainPtr<NSDateFormatter> dateFormatter = [self dateFormatterForPicker];
- NSDate *parsedDate = [dateFormatter dateFromString:[self _sanitizeInputValueForFormatter:_initialValue]];
+ NSDate *parsedDate = [dateFormatter dateFromString:[self _sanitizeInputValueForFormatter:_initialValue.get()]];
[_datePicker setDate:parsedDate ? parsedDate : [NSDate date]];
} else {
// Convert the number value to a date object for the fields affected by timezones.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes