Have you tried setting the class name in the FunctionTemplate ?

interface_template->SetClassName( v8::String )

This names my objects as expected. I also get [object MyObject] instead of 
[object Object] when calling Object's prototype toString.
You also might want to name the prototype by setting the GetToStringTag 
symbol in the prototype object template.


El lunes, 21 de mayo de 2018, 6:40:45 (UTC+2), Anoop R. S. escribió:
>
> Hi All,
> I noticed another behaviour. If the callback *SetCallAsFunctionHandler() *is 
> implemented for the ObjectTemplate, the value of the object is displayed as 
> *f 
> anonymous() *as shown below. 
>
>
> <https://lh3.googleusercontent.com/-CS_h9_oMPmM/WwJMTnHwc-I/AAAAAAAAFrg/aDVzcqVeqmEsmdi53rFQ1b0YV23r1ainQCLcBGAs/s1600/Capture.PNG>
>
> it seems to be overriding the callbacks 
> *NamedPropertyHandlerConfiguration* and *IndexedPropertyHandlerConfiguration 
> *(with respect to how it is displayed only). 
>
> Is there any way to override this behaviour? 
>
> I tried tracking where it is getting populated as *function, *but ended 
> up in *CALL_GENERATED_CODE* called in *Invoke()* in *execution.cc*
>
>
> regards,
> Anoop R. S.
>
> On Tuesday, 8 May 2018 10:05:12 UTC+5:30, Anoop R. S. wrote:
>>
>> Hi All,
>> I am trying out a debugger prototype using the remote debugger protocol. 
>> Going by the standard example in Embedder's Guide:
>> C++ class:
>> -------------
>> class Point {
>>  public:
>>   Point(int x, int y) : x_(x), y_(y) { }
>>   int x_, y_;
>> }
>>
>> Usage in JavaScript:
>> ---------------------------
>> var p = Point(1,2);
>>
>> Has anyone tried debugging a wrapped C++ object that is being returned to 
>> Javascript? Is it possible? 
>>
>> regards,
>> Anoop R. S.
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to