On 2013/10/17 08:03:34, aandrey wrote:
On 2013/10/17 07:40:18, Yury Semikhatsky wrote:
> https://codereview.chromium.org/26709011/diff/1/src/api.cc
> File src/api.cc (right):
>
> https://codereview.chromium.org/26709011/diff/1/src/api.cc#newcode4115
> src/api.cc:4115: Handle<Value> Function::GetDisplayName() const {
> On 2013/10/16 15:25:19, aandrey wrote:
> > On 2013/10/16 14:57:52, Yury Semikhatsky wrote:
> > > If you anyways return either empty handle or String, can we change
return
> type
> > > to Handle<String>?
> >
> > I guess we can, but there are 2 similar methods defined already:
> >
> > Handle<Value> GetName() const;
> > Handle<Value> GetInferredName() const;
> >
> > I think all these should be consistent in return value. Should we
change
all
> of
> > them? I guess it could be painful to change the public API?
> That's because they will return Undefined when there is no
{inferred}name
while
> you return an empty handle in that case. So to be consistent with them
you
> should also return Undefined in case there is no displayName.
I thought the Local<v8::Value>() does represent the JS's "undefined".
If not, what does it stand for?
And how to return an Undefined? just "return Undefined();" instead
of "return
Local<v8::Value>();" ?
Empty handle is a handle that doesn't point to any object which is different
from a handle to "undefined" or "null" value. You can create a handle to
"undefined" e.g. the following way:
ToApiHandle<Primitive>(isolate->factory()->undefined_value());
https://codereview.chromium.org/26709011/
--
--
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.