[v8-users] Re: How figure out v8 execute Javascript (real-world pages) in detail, i.e. when interpret? when compile?

2017-09-15 Thread michael lee
Hi Camillo, Thanks for your reply! Now it works. As you said, add the "v8" into the categories in the measurement file in perf/measurement/. Best Regards, Michael On Monday, September 4, 2017 at 5:55:07 PM UTC+2, Camillo Bruni wrote: > > Hi Micheal, > > You have to enable additional tracing ca

[v8-users] Re: Static library depends on self-built libc++, no longer compatible with libstdc++?

2017-09-15 Thread kenton via v8-users
I dynamically link in debug builds for the speed benefit, but for production deployments it is vastly easier to manage a statically-linked binary. Moreover, if v8 is dynamically linking to a different C++ standard library / runtime than my main app, that is likely to cause some subtle problems

[v8-users] Storing a weak reference to a function, or otherwise avoiding a memory leak

2017-09-15 Thread Zach Bjornson
Hello, I'm trying to implement this type of interface: var myObj = new MyObj(); myObj.onevent = function () { // might be a reference to myObj here } myObj.doSomethingAsync(); // causes `onevent` to fire; can be called more than once `onevent` (a C++ setter) currently stores the callback func

[v8-users] Storing a weak reference to a function, or otherwise avoiding a memory leak

2017-09-15 Thread Zach Bjornson
No, storing a weak reference on the object itself won't work. Maybe a map of Persistent, not associated with the MyObj instances, but keyed on the MyObj instance? SetOnevent stores to that map; firing an event involves a lookup; MyObj's destructor deletes from the map? Thanks, Zach -- -- v8-