On Jul 23, 2012, at 8:09 AM, Yury Semikhatsky <yu...@chromium.org> wrote:

> 
> 
> First option we consider is to define a class with the same set of fields as 
> the instrumented one, then have a compile time assert that size of the 
> reference class equals to the size of the instrumented one. See 
> https://bugs.webkit.org/attachment.cgi?id=153479&action=review for more 
> details.
> 
> Pros: compile time error whenever size of an instrumented class changes with 
> the appropriate modifications to the instrumentation function.
> Cons: it will require each committer to adjust the reference class and the 
> instrumentation on any modification that affects size of the instrumented 
> class. Changes that don't affect size of the class will go unnoticed.

What is the advantage of this approach compared to just using the sizeof 
operator on the relevant classes?

Regards,
Maciej

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to