https://codereview.chromium.org/384963002/diff/260001/src/unscopables.h
File src/unscopables.h (right):

https://codereview.chromium.org/384963002/diff/260001/src/unscopables.h#newcode25
src/unscopables.h:25: } while (false)
On 2014/07/29 15:12:39, Toon Verwaest wrote:
Can you please move these macros next to the other macros so we can
use them as
well? Maybe even put them there in a separate CL?

It feels kind of wrong to assume that all usages of Maybe that returns a
no value was due to an exception. That means the ASSERT needs to go
away.

The other similar macros do not do the declaration in the macro. The
usage would then be more like:

bool has_own;
RETURN_ON_NO_VALUE(has_own,
    JSReceiver::HasOwnProperty(object, unscopables_symbol),
    Maybe<bool>());

But that lost the assert...

My current thinking is that the following would be the cleanest

bool has_own;
if (!JSReceiver::HasOwnProperty(object,
unscopables_symbol).ToValue(&has_own)) {
  ASSERT((isolate)->has_pending_exception());
  return Maybe<bool>();
}

This matches ToHandle we have for MaybeHandle and does not depend on
macros.

WDYT?

https://codereview.chromium.org/384963002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to