[webkit-dev] ExceptionCode cleanup.
mkwst at chromium.org
Mon Feb 11 00:58:08 PST 2013
Over the course of a few patches, I've refactored exception handling in
1. Call sites which ASSERT that no exception occurred have been replaced
with the ASSERT_NO_EXCEPTION macro.
2. A new IGNORE_EXCEPTION macro is now available, intended to make it clear
that a method's potential exception is being explicitly and intentionally
It should now be the case that any instantiation of an ExceptionCode in
WebCore is followed by some usage of the variable other than simply passing
it into a method.
WebCore's current usage is a bit haphazard, however: we assert that no
exception occurs at 168 call sites, and we ignore exceptions at 274 call
sites. There's no real rhyme or reason to it... I believe that many of the
sites currently ignoring exceptions should probably be asserting (or
replaced with new, ExceptionCode-less APIs), but I didn't feel comfortable
making that change. If you have some free time, it might be worthwhile to
grep through code you're familiar with to see if making that change would
: Most notably https://wkrev.com/142375 and http://wkrev.com/142271
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev