RESOLVED FIXED 221318
Avoid a virtual function call in HTMLInputElement::value()
https://bugs.webkit.org/show_bug.cgi?id=221318
Summary Avoid a virtual function call in HTMLInputElement::value()
Simon Fraser (smfr)
Reported 2021-02-02 21:48:08 PST
Avoid a virtual function call in HTMLInputElement::value()
Attachments
Patch (2.25 KB, patch)
2021-02-02 21:49 PST, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2021-02-02 21:49:25 PST
EWS
Comment 2 2021-02-02 23:08:49 PST
Committed r272298: <https://trac.webkit.org/changeset/272298> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419104 [details].
Radar WebKit Bug Importer
Comment 3 2021-02-02 23:09:28 PST
Darin Adler
Comment 4 2021-02-03 18:22:08 PST
Comment on attachment 419104 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419104&action=review > Source/WebCore/html/InputType.h:193 > + bool canHaveTypeSpecificValue() const { return isFileUpload(); } I know this already landed, but I’d instead suggest changing getTypeSpecificValue to do this optimization so callers don’t need to make a separate call. Make it non-virtual and have it call a virtual function. It’s not great that caller has to be careful to call in a certain way. Better if there’s no way to do it wrong.
Note You need to log in before you can comment on or make changes to this bug.