Skip to content

Commit a742ecc

Browse files
rwlbuiswebkit-commit-queue
authored andcommitted
Store InputType in a Ref before calling setValueAsDecimal
https://bugs.webkit.org/show_bug.cgi?id=223535 Patch by Rob Buis <rbuis@igalia.com> on 2021-04-11 Reviewed by Ryosuke Niwa. Store InputType in a Ref before calling setValueAsDecimal. * html/InputType.cpp: (WebCore::InputType::applyStep): Canonical link: https://commits.webkit.org/236378@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent a7ca57b commit a742ecc

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2021-04-11 Rob Buis <rbuis@igalia.com>
2+
3+
Store InputType in a Ref before calling setValueAsDecimal
4+
https://bugs.webkit.org/show_bug.cgi?id=223535
5+
6+
Reviewed by Ryosuke Niwa.
7+
8+
Store InputType in a Ref before calling setValueAsDecimal.
9+
10+
* html/InputType.cpp:
11+
(WebCore::InputType::applyStep):
12+
113
2021-04-10 Chris Dumez <cdumez@apple.com>
214

315
Regression(r275668) Potential null pointer deref in AudioParam::exponentialRampToValueAtTime(float, double)

Source/WebCore/html/InputType.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,9 @@ ExceptionOr<void> InputType::applyStep(int count, AnyStepHandling anyStepHandlin
930930
if (newValue > stepRange.maximum())
931931
newValue = stepRange.maximum();
932932

933+
auto protectedThis = makeRef(*this);
933934
auto result = setValueAsDecimal(newValue, eventBehavior);
934-
if (result.hasException())
935+
if (result.hasException() || !element())
935936
return result;
936937

937938
if (AXObjectCache* cache = element()->document().existingAXObjectCache())

0 commit comments

Comments
 (0)