PTAL.

https://codereview.chromium.org/201643003/diff/60001/include/v8-util.h
File include/v8-util.h (right):

https://codereview.chromium.org/201643003/diff/60001/include/v8-util.h#newcode46
include/v8-util.h:46: namespace persistent_value_map_traits {
On 2014/03/17 12:53:55, dcarney wrote:
no need for a new namespace

Removed.

https://codereview.chromium.org/201643003/diff/60001/include/v8-util.h#newcode49
include/v8-util.h:49: class WeakSTLMapTraits {
On 2014/03/17 12:53:55, dcarney wrote:
would be better as StdPersistentValueMap  which itself has weak
traits, which
default to something which does nothing

I couldn't really figure this one out. What I've done now is:

- Fixed the K() issue, so that the (optional) Traits methods with return
values can always be implemented as 'return NULL'.
- Renamed the Traits class to be more consistent with its actual role:
DefaultSTLMapTraits.

The test-api.cc demonstrates how to use the traits class as-is, and how
to implement a map w/ weak callbacks by deriving a custom traits class
from the default one.

Let's briefly discuss whether that addresses your concerns.

https://codereview.chromium.org/201643003/diff/60001/include/v8-util.h#newcode86
include/v8-util.h:86: static const bool kIsWeak = false;
On 2014/03/17 12:53:55, dcarney wrote:
this should be true for a class called WeakSTLMapTraits

Yes. But actually, this class was misnamed, since it didn't actually
implement a 'weak' maps trait. So I renamed the class instead.

https://codereview.chromium.org/201643003/

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

Reply via email to