[v8-users] Building in VS2013 fails for cctest project

2013-12-24 Thread ioannis
Building in VS2013 fails for cctest project with the following warnings treated as error. 8test-cpu-profiler.cc(57): error C2220: warning treated as error - no 'object' file generated 8test-cpu-profiler.cc(57): warning C4316: 'v8::internal::ProfilerEventsProcessor' : object allocated on the

[v8-users] Re: V8 how to swallow javascript uncaught exception and continue running script

2013-11-08 Thread ioannis
Well you obviously need to catch the error raised on the javascript side and not on the c++ side try { document.write('foo'); } catch (e) { //handle error } finally { //cleanup } var str = 'hello' + 'world'; On Friday, November 8, 2013 9:56:23 AM UTC+2, Michael demiGod wrote: script: 1

[v8-users] Re: Overloading operators on the JS side

2013-10-30 Thread ioannis
I think what you need is: ObjectTemplate::SetIndexedPropertyHandler On Wednesday, October 30, 2013 8:39:54 PM UTC+2, Flying Jester wrote: Let's say I have an object on the C++ side that is wrapped for use in JS. It has several member functions attached to its prototype. Is there a way to

Re: [v8-users] Gargabe Collector initiated in a worker thread is causing me a crash

2013-10-20 Thread ioannis
Okay, after a lot of trial and error, i think i got the hang of it... Had to use both Locker and Unlocker to get it to work. On Thursday, October 10, 2013 5:28:52 PM UTC+3, ioannis wrote: Well, you make it sound soo easy ... I have read the documentation in v8.h and how it was done in d8.cc

[v8-users] Re: Customize [[Class]] internal property?

2013-10-14 Thread ioannis
If you are using the API to build your object then you can try the following: LocalFunctionTemplate func_templ(FunctionTemplate::New());func_templ-SetClassName(String::NewSymbol(ClassName));LocalObjectTemplate obj_templ = func_templ-InstanceTemplate(); On Friday, October 11, 2013 5:04:36

Re: [v8-users] Gargabe Collector initiated in a worker thread is causing me a crash

2013-10-10 Thread ioannis
Well, you make it sound soo easy ... I have read the documentation in v8.h and how it was done in d8.cc but i still cant get ti to work. On Wednesday, October 9, 2013 11:37:50 AM UTC+3, Ben Noordhuis wrote: On Wed, Oct 9, 2013 at 4:15 AM, ioannis ioan...@gmail.com javascript: wrote: Ok

[v8-users] Re: Issues with a Persistent in a Struct?

2013-10-08 Thread ioannis
Persistent is defined by default with NonCopyablePersistentTraits which means that it cannot be used in structs that allow copy/assignment operations. You can explicitly define Persistent with CopyablePersistentTraits in order to allow copy/assignment operations. I use the following type

[v8-users] Gargabe Collector initiated in a worker thread is causing me a crash

2013-10-08 Thread ioannis
Ok, so i'm going nuts here, v8 v. I have a worker thread that is executed based on events raised from my object. The thread uses the *same* isolate and context from the JS object So the thread is initiated like below and is working. Isolate* isolate = object_-isolate_;Isolate::Scope

Re: [v8-users] Setter/Getter for function turns function into a string when the function is called?

2013-10-06 Thread ioannis
As far as i understand *correct me if i'am wrong* you cannot have an object member to act as both a property (using getter/setter) and a calling function. It should be one of the two. So i guess you will need an object member, a property to get/set the update value string and another object

Re: [v8-users] Setter/Getter for function turns function into a string when the function is called?

2013-10-06 Thread ioannis
Ah yes you are right, i didn't read the post to its entirety, i just assumed that you were setting the value to a string for some unknown reason :) ... Sorry, apologies for the confusion. On Sunday, October 6, 2013 11:43:21 PM UTC+3, James Lomax wrote: You can, the problem was just that I was

Re: [v8-users] How does v8 decide when to do garbage collection?

2013-09-29 Thread ioannis
Thanks for the pointers. This would mean that i need to keep a record of all the objects that have been created dynamically and rebuild the relationships on every GC. Isn't this a bit expensive ? I was thinking something simpler by setting/removing the Weak flag on the parent object depending

Re: [v8-users] How does v8 decide when to do garbage collection?

2013-09-27 Thread ioannis
So i'm going to piggyback this post for some additional questions... 1) Is it safe to call v8::V8::IdleNotification() within a WeakCallback() to scavenge additional objects that have been set as weak in WeakCallback() ? I guess not.. i get a crash. 2) Also, lets say within a function scope if

Re: [v8-users] How does v8 decide when to do garbage collection?

2013-09-27 Thread ioannis
Noordhuis wrote: On Fri, Sep 27, 2013 at 7:40 PM, ioannis ioan...@gmail.com javascript: wrote: So i'm going to piggyback this post for some additional questions... 1) Is it safe to call v8::V8::IdleNotification() within a WeakCallback() to scavenge additional objects that have been

[v8-users] Re: Making v8::Persistent safe to use

2013-09-16 Thread ioannis
So with the resent changes to Persistent how can we store a series of PersistentFunction handles to an STL container like map ? -- -- 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

[v8-users] Re: New feature: handle eternalization

2013-09-16 Thread ioannis
Shouldn't the use of Handle and Local be interchangeable ? Has it been decided which of the two will be depreciated in the end ? It seems that we cannot assign a Handle value to the Eternal and we need to use Local instead ... -- -- v8-users mailing list v8-users@googlegroups.com

[v8-users] Re: BooleanObject::New(false) always returns true

2013-07-29 Thread ioannis
So if i understand correctly, in order to obtain the underlying value of a BooleanObject, i need to first cast the Value to BooleanObject and then call BooleanValue() Do we need to perform the same casting from Value to NumberObject and StringObject to correctly obtain the underlying value ?

[v8-users] BooleanObject::New(false) always returns true

2013-07-28 Thread ioannis
I was wandering why the following BooleanValue() statements always return true, shouldn't the first one return false ? Also why both IsTrue() and IsFalse() return false in the statements below ? Is there a bug or am i missing something here ? bool test0 =

[v8-users] Help with setting local js variable to Null()

2013-01-21 Thread ioannis
Ok, so I have the following code. The function Delete is a function property of the Point object, to ensure proper destruction of the c++ object. At point (2) i am checking whether the js variable is a global variable and set the value to Null(). Is there a way to set a local function scope js

Re: [v8-users] Help with setting local js variable to Null()

2013-01-21 Thread ioannis
Thank you for the reply. Basically what I want to achieve is the following. Consider this js example After my ReleaseObject() function is called x = is still a point object At the second print(x) i would like my variable to be null, or report as null without explicitly setting it to null with

[v8-users] Re: Set prototype of Host Object handle question.

2013-01-15 Thread Ioannis Epaminonda
I have tried the above but i don;t think that it works correctly. Have you found another way to set an Object to null ? On Friday, 8 April 2011 19:29:04 UTC+3, mcot wrote: I think I solved my problem: v8::HandleScope hndl_scope; ... ... v8::Handlev8::Object obj =