[Webkit-unassigned] [Bug 174394] Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 25 14:03:28 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174394

--- Comment #60 from Ryosuke Niwa <rniwa at webkit.org> ---
(In reply to Wenson Hsieh from comment #58)
> Comment on attachment 321600 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=321600&action=review
> 
> >>> Source/WebCore/editing/ios/AutofillElements.h:36
> >>> +    AutofillElements(RefPtr<HTMLInputElement>, RefPtr<HTMLInputElement>);
> >> 
> >> Use RefPtr<HTMLInputElement>&& instead to avoid ref churn.
> > 
> > What is 'ref churn'?
> 
> This is when objects that keep track of reference counts (e.g. RefPtr, Ref,
> RetainPtr) are unnecessarily destroyed and recreated. In this case, we can
> turn this into RefPtr<HTMLInputElement>&&s and WTFMove() at the call site to
> avoid this extra dance.

Well, more precisely about calling ref() and deref() multiple times. This is an expensive operation because they're dependent operations in CPU, and must be executed consecutively. In a CPU which doesn't do an out-of-order execution, it can block the code execution or, worse, cause a pipeline hazard.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170925/152554a7/attachment.html>


More information about the webkit-unassigned mailing list