[v8-users] Calling method on Persistent

2018-08-30 Thread Mike Moening
I've upgraded from a slightly older version of V8.

I can no longer do this with a Persistent

*obj->SetInternalField(0, External::New(pIsolate, ));*

*error C2039: 'SetInternalField': is not a member of 
'v8::Persistent>'*
*1>with*
*1>[*
*1>T=v8::Object*
*1>]*

Seems the -> operator is no longer available on persistent?

How can I accomplish this with newest V8?

Thanks!
Mike

-- 
-- 
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] Intent to Ship: globalThis

2018-08-30 Thread Sathya Gunasekaran
LGTM

On Thu, Aug 30, 2018 at 8:23 AM Adam Klein  wrote:

> This LGTM, based on the stage at TC39.
>
> It'd be nice if we knew more about other browser plans, given the history
> here. Do you know if Firefox has plans to try again with this name anytime
> soon?
>
> On Thu, Aug 30, 2018 at 1:24 AM 'Mathias Bynens' via v8-users <
> v8-users@googlegroups.com> wrote:
>
>> Contact emails
>>
>> math...@chromium.org
>>
>> Spec
>>
>> https://tc39.github.io/proposal-global/
>>
>> Summary
>>
>> A Stage 3 proposal introduces globalThis, enabling a universal mechanism
>> to access the global object even in strict functions or modules, regardless
>> of the platform.
>>
>> Motivation
>>
>> It is difficult to write portable ECMAScript code which accesses the
>> global object. On the web, it is accessible as window or self or this or
>> frames; on Node.js, it is global or this; among those, only this is
>> available in a shell like V8's d8. In a standalone function call in
>> sloppy mode, this works too, but it's undefined in modules or in strict
>> mode within a function. In such contexts, the global object can still be
>> accessed using Function('return this')(), but that form is incompatible
>> with some CSP settings, such as within Chrome Apps.
>>
>> Interoperability and compatibility risk
>>
>> An earlier version of this proposal had a different name: global. Sadly,
>> this name was found to be not Web-compatible when Firefox shipped it
>> . After collaborating
>> with other browsers vendors and looking at data on real-world use of
>> JavaScript identifiers on the web, we believe the new name to be
>> Web-compatible.
>>
>> Is this feature fully tested?
>>
>> Yes. In addition to V8's own tests (v8/test/mjsunit/harmony/global*.js),
>> Test262 includes tests for this feature
>> 
>> .
>>
>> Tracking bug
>>
>> https://bugs.chromium.org/p/v8/issues/detail?id=5537
>>
>> Link to entry on the Chrome Platform Status dashboard
>>
>> https://www.chromestatus.com/feature/6571514765770752
>>
>> Requesting approval to ship?
>>
>> Yes. Note that since this is a V8/JS feature, this post is just an FYI to
>> blink-dev — no signoff from Blink API owners is required.
>>
>> --
>> --
>> 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.
>

-- 
-- 
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] Intent to Ship: globalThis

2018-08-30 Thread Adam Klein
This LGTM, based on the stage at TC39.

It'd be nice if we knew more about other browser plans, given the history
here. Do you know if Firefox has plans to try again with this name anytime
soon?

On Thu, Aug 30, 2018 at 1:24 AM 'Mathias Bynens' via v8-users <
v8-users@googlegroups.com> wrote:

> Contact emails
>
> math...@chromium.org
>
> Spec
>
> https://tc39.github.io/proposal-global/
>
> Summary
>
> A Stage 3 proposal introduces globalThis, enabling a universal mechanism
> to access the global object even in strict functions or modules, regardless
> of the platform.
>
> Motivation
>
> It is difficult to write portable ECMAScript code which accesses the
> global object. On the web, it is accessible as window or self or this or
> frames; on Node.js, it is global or this; among those, only this is
> available in a shell like V8's d8. In a standalone function call in
> sloppy mode, this works too, but it's undefined in modules or in strict
> mode within a function. In such contexts, the global object can still be
> accessed using Function('return this')(), but that form is incompatible
> with some CSP settings, such as within Chrome Apps.
>
> Interoperability and compatibility risk
>
> An earlier version of this proposal had a different name: global. Sadly,
> this name was found to be not Web-compatible when Firefox shipped it
> . After collaborating
> with other browsers vendors and looking at data on real-world use of
> JavaScript identifiers on the web, we believe the new name to be
> Web-compatible.
>
> Is this feature fully tested?
>
> Yes. In addition to V8's own tests (v8/test/mjsunit/harmony/global*.js),
> Test262 includes tests for this feature
> 
> .
>
> Tracking bug
>
> https://bugs.chromium.org/p/v8/issues/detail?id=5537
>
> Link to entry on the Chrome Platform Status dashboard
>
> https://www.chromestatus.com/feature/6571514765770752
>
> Requesting approval to ship?
>
> Yes. Note that since this is a V8/JS feature, this post is just an FYI to
> blink-dev — no signoff from Blink API owners is required.
>
> --
> --
> 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.


[v8-users] Intent to Ship: globalThis

2018-08-30 Thread 'Mathias Bynens' via v8-users
Contact emails

math...@chromium.org

Spec

https://tc39.github.io/proposal-global/

Summary

A Stage 3 proposal introduces globalThis, enabling a universal mechanism to
access the global object even in strict functions or modules, regardless of
the platform.

Motivation

It is difficult to write portable ECMAScript code which accesses the global
object. On the web, it is accessible as window or self or this or frames;
on Node.js, it is global or this; among those, only this is available in a
shell like V8's d8. In a standalone function call in sloppy mode, this
works too, but it's undefined in modules or in strict mode within a
function. In such contexts, the global object can still be accessed
using Function('return
this')(), but that form is incompatible with some CSP settings, such as
within Chrome Apps.

Interoperability and compatibility risk

An earlier version of this proposal had a different name: global. Sadly,
this name was found to be not Web-compatible when Firefox shipped it
. After collaborating
with other browsers vendors and looking at data on real-world use of
JavaScript identifiers on the web, we believe the new name to be
Web-compatible.

Is this feature fully tested?

Yes. In addition to V8's own tests (v8/test/mjsunit/harmony/global*.js),
Test262 includes tests for this feature

.

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=5537

Link to entry on the Chrome Platform Status dashboard

https://www.chromestatus.com/feature/6571514765770752

Requesting approval to ship?

Yes. Note that since this is a V8/JS feature, this post is just an FYI to
blink-dev — no signoff from Blink API owners is required.

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