Bug 71101
Summary: | Stylebot should not complain about a RefPtr argument passed by pointer (RefPtr<...>*) | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexander Pavlov (apavlov) <apavlov> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | loislo, sam, vsevik |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alexander Pavlov (apavlov)
A legitimate use of RefPtr's in arguments passed as pointers (since this does not involve reference counter changes or something of the kind) is reported as a stylebot error.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Vsevolod Vlasov
Apparently this use is not actually legitimate.
https://bugs.webkit.org/show_bug.cgi?id=69366
Alexander Pavlov (apavlov)
(In reply to comment #1)
> Apparently this use is not actually legitimate.
>
> https://bugs.webkit.org/show_bug.cgi?id=69366
Yes, that makes sense, since the pointer-vs-reference decision was changed recently. In my case, a change added a parameter to a method signature, and this method already had a RefPtr<..>* output parameter. Fixing this particular stylebot failure implied touching A LOT of this method call sites (I was adding a parameter with a default value) and fixing the method body instead of just modifying a dozen of lines for my original change. I agree, however, that this is a challenge to balance the stylebot output against the obsolete-styled code.
Sam Weinig
Where is this style used? It seems quite odd so I would like to understand what its utility is.
Alexander Pavlov (apavlov)
(In reply to comment #3)
> Where is this style used? It seems quite odd so I would like to understand what its utility is.
It is used in the InspectorBackendDispatcher generator which invokes methods on Inspector*Agent instances (as such, their method signatures use this style, too). It has been there for quite a while, since the times when the "output argument should be a reference, not a pointer" was proper style.
That said, I'm told that we are going to correct this shortly (this week), so that this will no longer be an issue, and I believe this bug can be closed as wontfix.