First comment about the API names. Looping in Andreas and Sven about the naming.

https://codereview.chromium.org/23182003/diff/1/include/v8.h
File include/v8.h (right):

https://codereview.chromium.org/23182003/diff/1/include/v8.h#newcode3008
include/v8.h:3008: void SetNativeAccessor(Handle<String> name,
As discussed offline, the following naming scheme makes the most sense
to me and Andreas. WDYT?

- SetDataProperty(), for normal data properties taking HValue
- SetNativeProperty(), for data properties using
Accessor[G/S]etterCallback
- SetAccessorProperty(), for JavaScript accessors

To be more precise, this would yield the following signatures:

void SetDataProperty(Handle<String> name,
                     Handle<Data> value,
                     PropertyAttribute attributes = None);

void SetNativeProperty(Handle<String> name,
                       AccessorGetterCallback getter,
                       AccessorSetterCallback setter = 0,
                       Handle<Value> data = Handle<Value>(),
                       AccessControl settings = DEFAULT,
                       PropertyAttribute attribute = None,
                       Handle<AccessorSignature> signature =
                           Handle<AccessorSignature>());

void SetAccessorProperty(Handle<String> name,
                         Handle<FunctionTemplate> getter,
                         Handle<FunctionTemplate> setter =
                             Handle<FunctionTemplate>(),
                         AccessControl settings = DEFAULT,
                         PropertyAttribute attribute = None);

https://codereview.chromium.org/23182003/diff/1/src/apinatives.js
File src/apinatives.js (right):

https://codereview.chromium.org/23182003/diff/1/src/apinatives.js#newcode96
src/apinatives.js:96: cache[serialNumber] = %ToFastProperties(fun);
It seems dangerous to re-set the cached value down here, even under the
assumption that the return value will always be "fun" again. Let's just
leave the return value of %ToFastProperties() unused here.

https://codereview.chromium.org/23182003/

--
--
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/groups/opt_out.

Reply via email to