Re: [v8-users] How to set the class name of the global object

2016-11-24 Thread Toon Verwaest
Previously we used the class name.

On Fri, Nov 25, 2016, 00:53 Theodore Dubois  wrote:

> Interesting. Out of curiosity, how did this work before Chrome added
> support for Symbol.toStringTag?
>
> ~Theodore
>
> > On Nov 24, 2016, at 2:36 AM, Ben Noordhuis  wrote:
> >
> > On Thu, Nov 24, 2016 at 4:45 AM,   wrote:
> >> I'm trying to get behavior similar to that of the global object in a
> Chrome
> >> JavaScript context through the V8 API. I've created a FunctionTemplate,
> >> called SetClassName on the template, set various properties on its
> >> PrototypeTemplate and InstanceTemplate, and then used the
> InstanceTemplate
> >> to create a context. However, when I run
> >> Object.prototype.toString.call(this), I get [object Object], instead of
> what
> >> I set the class name to. How does Chrome make it so that
> >> Object.prototype.toString.call(this) is [object Window]?
> >>
> >> Thanks,
> >> ~Theodore
> >
> > I don't know if Chrome does it in C++ or JS but it executes the moral
> > equivalent of:
> >
> >Object.defineProperty(this, Symbol.toStringTag, { configurable:
> > true, value: 'Window' });
> >
> > --
> > --
> > v8-users mailing list
> > v8-users@googlegroups.com
> > http://groups.google.com/group/v8-users
> > ---
> > You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> > To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/jCngtwHbGW8/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> 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.
>

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


Re: [v8-users] How to set the class name of the global object

2016-11-24 Thread Theodore Dubois
Interesting. Out of curiosity, how did this work before Chrome added support 
for Symbol.toStringTag?

~Theodore

> On Nov 24, 2016, at 2:36 AM, Ben Noordhuis  wrote:
> 
> On Thu, Nov 24, 2016 at 4:45 AM,   wrote:
>> I'm trying to get behavior similar to that of the global object in a Chrome
>> JavaScript context through the V8 API. I've created a FunctionTemplate,
>> called SetClassName on the template, set various properties on its
>> PrototypeTemplate and InstanceTemplate, and then used the InstanceTemplate
>> to create a context. However, when I run
>> Object.prototype.toString.call(this), I get [object Object], instead of what
>> I set the class name to. How does Chrome make it so that
>> Object.prototype.toString.call(this) is [object Window]?
>> 
>> Thanks,
>> ~Theodore
> 
> I don't know if Chrome does it in C++ or JS but it executes the moral
> equivalent of:
> 
>Object.defineProperty(this, Symbol.toStringTag, { configurable:
> true, value: 'Window' });
> 
> -- 
> -- 
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "v8-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/v8-users/jCngtwHbGW8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: [v8-users] Building v8 with Visual Studio 2015 on Windows 10

2016-11-24 Thread jan . ehrhardt
Take a look at how I built V8 5.4.500.43:
https://github.com/phpv8/v8js/issues/272#issuecomment-262848754

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


[v8-users] v8 gyp for inspector dll configuration fails

2016-11-24 Thread iva
Hi,

I am trying to build v8 with the inspector support. The v8 is linked as 
dll. On Windows 10, environment variable set for vs2015. Generator set to 
msvs. I fail at the gyp step when I try to generate solutions with 
inspector enabled (without the inspector everything is fine):
>python gypfiles\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library 
-Dv8_enable_inspector=1
Updating projects from gyp files...
gyp: Unable to find targets in build file D:\v8\test\debugger\debugger.gyp
Is there an additional option I must use or any idea of what can the 
problem be?

Regards

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


Re: [v8-users] How to set the class name of the global object

2016-11-24 Thread Ben Noordhuis
On Thu, Nov 24, 2016 at 4:45 AM,   wrote:
> I'm trying to get behavior similar to that of the global object in a Chrome
> JavaScript context through the V8 API. I've created a FunctionTemplate,
> called SetClassName on the template, set various properties on its
> PrototypeTemplate and InstanceTemplate, and then used the InstanceTemplate
> to create a context. However, when I run
> Object.prototype.toString.call(this), I get [object Object], instead of what
> I set the class name to. How does Chrome make it so that
> Object.prototype.toString.call(this) is [object Window]?
>
> Thanks,
> ~Theodore

I don't know if Chrome does it in C++ or JS but it executes the moral
equivalent of:

Object.defineProperty(this, Symbol.toStringTag, { configurable:
true, value: 'Window' });

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