Improve type safety of SetUpContext / TearDownContext in StructTraits |
||||
Issue descriptionRight now, it's just a void*, which results in fun casts. It doesn't seem like any consumers actually need this polymorphism; we should have some way to statically declare what the context type of a StructTraits will be (perhaps in the typemap?)
,
Oct 31 2017
,
Oct 31 2017
Now that we guarantee at most one call to each getter, we have reduced context usage significantly. I searched "file:strcut_traits SetUpContext" and only 1 class is using it. I wonder whether it is worth the effort to make the suggested changes. WDYT?
,
Oct 31 2017
I found myself almost using SetUpContext again recently, but ended up not needing it. I almost changed it to be more strongly typed in that CL because I felt it was an improvement. It may be worth leaving this bug open just in case, as I don't see any downside to addressing the issue if anyone has cycles to do so at some point. Does that sound reasonable?
,
Oct 31 2017
SGTM, thanks!
,
Oct 17
,
Nov 15
Still relevant but not really high priority. FWIW the only remaining usage is for WTFString traits. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Oct 31 2017