https://codereview.chromium.org/384963002/diff/280001/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/384963002/diff/280001/include/v8.h#newcode892
include/v8.h:892: bool ToValue(T* t) {
Can we not introduce this? Maybe intentionally is a simple struct, using
this method actually makes code more verbose and less readable.
https://codereview.chromium.org/384963002/diff/280001/src/unscopables.h
File src/unscopables.h (right):
https://codereview.chromium.org/384963002/diff/280001/src/unscopables.h#newcode5
src/unscopables.h:5: #ifndef V8_UNSCOPABLES_H_
I don't think it's worth putting this into an extra file anymore. I'd
even prefer just inlining the function into Context::Lookup directly.
https://codereview.chromium.org/384963002/diff/280001/src/unscopables.h#newcode23
src/unscopables.h:23: if
(!JSReceiver::GetPropertyAttributes(it).ToValue(&attrs)) {
I think it's clearer and simpler to avoid ToValue and write this e.g. as
Maybe<PropertyAttributes> attrs =
JSReceiver::GetPropertyAttributes(it);
DCHECK(isolate->has_pending_exception() || attrs.has_value());
if (!attrs.has_value() || attrs.value == ABSENT) return attrs;
You then can simply return attrs below.
https://codereview.chromium.org/384963002/
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.