On 2011/07/12 09:31:21, Peter Varga wrote:
On 2011/07/12 07:51:30, Mads Ager wrote:
> http://codereview.chromium.org/7321006/diff/1/src/api.cc#newcode2725
> src/api.cc:2725: has_pending_exception = (result == ABSENT);
> Let's not misuse has_pending_exception for this. Just have the
> EXCEPTION_BAILOUT_CHECK here. Then after that return
> static_cast<PropertyAttribute>(NONE) if result is ABSENT.

Sorry, I don't really understand this part of the review.
I notice that I messed up the usage of has_pending_exception but I'm not sure
how the proper usage should look like.
Shouldn't I throw any exception when the property is absent?
Do you mean that this kind of checking:
   if (result == ABSENT) return NONE;
is enough instead of exception handling?

If you want to throw an exception when the property is absent you should do so
explicitly. The EXCEPTION_BAILOUT_CHECK is used to propagate exceptions that
have already been scheduled. No exception is scheduled when attempting to get
the property attributes for a property. You will just be told that it is not
there. If you want to throw an exception in that case you should do so
explicitly. This indicates to me that there are tests missing too. The expected
behavior should have tests for this case. :-)

http://codereview.chromium.org/7321006/

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

Reply via email to