On 2015/08/08 21:56:09, Jakob wrote:
Looks good. I have a couple of nits, and one high-level comment:

IIUC, this doesn't distinguish between getters and data properties. So if you
had this:
   var error = /* some internally thrown error */
   delete error.message;
   error.__proto__ = {message: "My message"};
   error.toString();
then you'd get the empty default message instead of "My message". Is that
intentional? I guess it's in line with what the previous code did, so it's
probably OK (but a bit surprising).

This is intentional. I agree that this may be surprising. Then again this little
detail never bothered anyone and I'd rather not change this behavior.


https://codereview.chromium.org/1281833002/diff/2/src/messages.cc
File src/messages.cc (right):

https://codereview.chromium.org/1281833002/diff/2/src/messages.cc#newcode384
src/messages.cc:384: isolate->factory()->NewStringFromStaticChars("name");
we already have isolate->factory()->name_string() ;-)

https://codereview.chromium.org/1281833002/diff/2/src/messages.h
File src/messages.h (right):

https://codereview.chromium.org/1281833002/diff/2/src/messages.h#newcode474
src/messages.h:474: for (const auto& visited : helper->visited_) {
nit: I'd prefer the explicitness of s/auto/Handle<JSObject>/

https://codereview.chromium.org/1281833002/diff/2/src/messages.h#newcode483
src/messages.h:483: bool HasVisited() { return has_visited_; }
nit: unix_hacker_style() for simple getters

https://codereview.chromium.org/1281833002/diff/2/src/messages.h#newcode490
src/messages.h:490:
nit: one empty line is enough here

https://codereview.chromium.org/1281833002/diff/2/src/messages.h#newcode491
src/messages.h:491: bool ShadowsInternalError(Isolate* isolate,
LookupIterator*
property_lookup,
this could be declared static, right?

https://codereview.chromium.org/1281833002/diff/2/src/messages.h#newcode494
src/messages.h:494: MUST_USE_RESULT MaybeHandle<String>
GetStringifiedProperty(
this could be declared static too, right?



https://codereview.chromium.org/1281833002/

--
--
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