Sverrir,

I think we all are at a loss what you are trying to solve here (at least I am).

The code as it is today is as follows:
ASSERT(location_ != NULL);
ASSERT(reinterpret_cast<Address>(*location_) != kHandleZapValue);

What I keep hearing is that you are trying to protect against crashing
the second line if location_ is NULL. Can you please explain how you
are getting to the second line? The ASSERT on the first line will
abort and program execution is stopped.

Thanks,
-Ivan


On Fri, May 15, 2009 at 08:31, Sverrir Á. Berg <[email protected]> wrote:
> I did not see any other replies but I understand your holding.  I personally
> don't think crashing in the assert itself provides any value since
> difference in behaviour between debug and release is bad (IMHO).  How about:
> ASSERT(location_ != NULL); // as before
> ASSERT(location_ && reinterpret_cast<Address>(*location_) !=
> kHandleZapValue);
> Best of both worlds?
> Sverrir
>
>
> On Fri, May 15, 2009 at 2:13 AM, <[email protected]> wrote:
>>
>> As Søren and Kevin replied, dereferencing a null handle is going to
>> crash anyway, so I'd like to keep this a two separate ASSERTS so it is
>> easy to see which one of the conjuncts gets hit.
>>
>>
>> http://codereview.chromium.org/113409
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to