Re: [v8-users] Re: Can you Set the CurrentIsolate

2017-07-28 Thread Ian Bull
: > > On Fri, Jul 28, 2017 at 12:36 PM, Ian Bull <irb...@gmail.com > > wrote: > >> The problem with Enter() is that if you're already Entered, now you're in >> there twice. So if it's a patchwork solution that checks if the MyIsolate >> != Isolate::GetCurrent, and th

Re: [v8-users] Re: Can you Set the CurrentIsolate

2017-07-28 Thread Ian Bull
te.html#aec80bb49b6b7647ff75e8f2cc9484ea3 > > > > On Friday, July 28, 2017 at 11:56:16 AM UTC-7, Ian Bull wrote: >> >> I know Isolate::GetCurrent is deprecated, but it's still being used >> inside V8 itself in places, and there are times when it's getting the wrong &g

[v8-users] Can you Set the CurrentIsolate

2017-07-28 Thread Ian Bull
I know Isolate::GetCurrent is deprecated, but it's still being used inside V8 itself in places, and there are times when it's getting the wrong isolate. [1] for example. [1] String::Value::Value(v8::Local obj) : str_(NULL), length_(0) // in api.cc I created Isolate A, and inside a callback,

Re: [v8-users] What does IsNearDeath do?

2017-06-15 Thread Ian Bull
f for now. Do you know what this API would be useful for, or have you seen real world examples of people using it? Cheers, Ian On Thursday, 15 June 2017 02:08:07 UTC-7, Ben Noordhuis wrote: > > On Wed, Jun 14, 2017 at 10:52 PM, Ian Bull <irb...@gmail.com > > wrote: > > The do

[v8-users] What does IsNearDeath do?

2017-06-14 Thread Ian Bull
The documentation of IsNearDeath says: "Checks if the handle holds the only reference to an object." But I'm not sure this is correct. If I create a new Object, and place it in a persistent container, and the immediately call "isNearDeath", it returns false: Local obj =

[v8-users] Re: Enable Debug Support for Multiple Isolates

2017-05-25 Thread Ian Bull
r each v8::isolate and > redirect the json messages to each isolate correctly. > > regards, > Anoop R. S. > > On Thursday, 25 May 2017 10:45:52 UTC+5:30, Ian Bull wrote: >> >> When I originally asked this question it was about the debug agent. That >> agent no

[v8-users] Re: Size of the V8 static library

2017-05-24 Thread Ian Bull
No, that seems really big. The J2V8 static archive that I create (That includes V8 and my JavaBindings) is about 7MB. However, the .a files may be bigger, as they may have more debug information that you can strip out. Cheers, Ian On Friday, 12 May 2017 03:05:57 UTC-7, Srini Edara wrote: > >

[v8-users] Re: Enable Debug Support for Multiple Isolates

2017-05-24 Thread Ian Bull
When I originally asked this question it was about the debug agent. That agent no longer exists. I now use the JS debugger that's available in V8. You can set a flag (something like "expose-debug-as=__j2v8_debug_handler"). This is what I use in J2V8 and there is a debug handler registered in

Re: [v8-users] Accessing block scoped variables via the V8 API

2017-04-04 Thread Ian Bull
Thanks everyone. That makes sense, since these variables are "block scoped", so having them available outside the scope wouldn't work. Cheers, Ian On Tuesday, 4 April 2017 00:08:27 UTC-7, Ben Noordhuis wrote: > > On Tue, Apr 4, 2017 at 5:02 AM, Ian Bull <irb...@gmail.com >

[v8-users] Accessing block scoped variables via the V8 API

2017-04-03 Thread Ian Bull
In J2V8 (our Java bindings for V8 [1]) we provide access to objects defined in the global scope. [1] https://github.com/eclipsesource/j2v8 In Java you can write: v8.executeScript("var foo = [1,2,3]"); V8Array array = (V8Array) v8.get("foo"); v8 in this case is the the isolate, and when we

[v8-users] Re: Memory management for Functions

2016-03-15 Thread Ian Bull
ernal, MethodDescriptor> > const& data) > { > MethodDescriptor* md = data.GetParameter(); > delete md; > }); > > Function::New(isolate, callback, External::New(isolate, md)) > > > Note that GC could be called some time later (even it could) > > O

[v8-users] Memory management for Functions

2016-03-14 Thread Ian Bull
I'm creating a Function with a C++ callback as follows: MethodDescriptor* md = new MethodDescriptor(); md -> someFields = someValue; Function::New(isolate, callback, External::New(isolate, md)) In this case I associate a MethodDescriptor (md) with the function so that when my callback is

Re: [v8-users] Need Help: Global Object properties not accessible in multithreaded application.

2015-05-21 Thread Ian Bull
Thank-you! A few years later, but I made the exact same assumptions. In particular, I assumed that if I had my own synchronization then lockers were not necessary. On Sunday, 18 August 2013 15:29:34 UTC-7, Clemens Cap wrote: THANX and solved :-) My misunderstanding was: I thought that the

[v8-users] V8 and Java integration (again)

2014-11-17 Thread Ian Bull
Hi everyone, I just wanted to let you know about a project that I'm working on that brings parts of the V8 API to Java through a thin JNI layer. The project is called J2V8 https://github.com/eclipsesource/j2v8 [1,2] and it's available on GitHub. This isn't the first such project, but we're

[v8-users] Object Equality

2014-09-08 Thread Ian Bull
Hi everyone, I was looking at the object equality methods that exist in V8 (on the Object class). There are StrictEquals (which I assume maps to ===), and SameValue (which I assume maps to ==). However, there is a third 'Equals' method. What are the semantics of this method. In particular,

Re: [v8-users] Enable Debug Support for Multiple Isolates

2014-09-03 Thread Ian Bull
Currently I'm targeting 3.26 (I had trouble building 3.27 3.28 on both my Mac and for Android, although I can certainly revisit that). I'll take a look at the new API. Thanks! Ian On Wednesday, 3 September 2014 13:00:50 UTC-7, Ben Noordhuis wrote: On Wed, Sep 3, 2014 at 6:58 PM, Ian Bull