Avoid a virtual function call in HTMLInputElement::value()
Created attachment 419104 [details] Patch
Committed r272298: <https://trac.webkit.org/changeset/272298> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419104 [details].
<rdar://problem/73917640>
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.