eric at webkit.org
Tue Jul 28 15:25:59 PDT 2009
It just occurred to me that we have a lot of places in WebKit were we
ASSERT(foo) (where foo is some passed in Foo* pointer which should never be
Maybe it would be cleaner/better/whatever if we instead used a template to
do this ASSERTing in a centralized place. The primary advantage would be
that the ASSERTion is clear in the method signature.
void doSomething(Foo* foo)
void doSomething(NeverNull<Foo> foo)
Could get nasty when interacting with other templates though. I don't think
we want a NeverNullOwnPtr, or maybe we do?
Does this seem useful to anyone else? Oh c++ experts, does this even seem
possible, seem like it would perform well, not bloat the code size, etc?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev