[v8-users] Re: v8 Android link error()

2018-08-15 Thread Zac Hansen
you can always just throw all the libs at the linker twice, too, if you're not sure the order.. On Wednesday, August 15, 2018 at 6:04:49 AM UTC-7, ibon wrote: > > I avoid linker problems by properly sorting the libraries. > The linker is sequential, and will fail if a given symbol is not present

[v8-users] Re: When is SetSecondPassCallback need to be called?

2018-07-23 Thread Zac Hansen
there was a long conversation about this about a year ago, maybe you can find it. it turned out to be pretty convoluted from what I remember. On Monday, July 23, 2018 at 12:16:09 AM UTC-7, fengx...@gmail.com wrote: > > Hi, > I noticed that chromium's sourcecode src/gin/wrappable.cc > use

Re: [v8-users] Re: Performance drop?

2018-07-19 Thread Zac Hansen
If someone gets to the bottom of this, can you post an update on this thread with the results, not just to the bug report? Thank you. --Zac On Thursday, July 19, 2018 at 3:18:58 PM UTC-7, jzw wrote: > > Hi Jakob, > Could you point me to the file in src that's corresponding to >

[v8-users] Re: how to debug torque

2018-06-21 Thread Zac Hansen
That's not a very detailed question. What is insufficient with the usual tools? On Thursday, June 21, 2018 at 8:34:30 PM UTC-7, cyril wrote: > > Recently, I discovered that v8 has added a module named torque. Anyone > know how to debug it ?? > -- -- v8-users mailing list

[v8-users] Re: Finding cycles in an object

2018-06-21 Thread Zac Hansen
You're dereferencing a "super pointer" to get to a "pointer", hence * not &. You can't "go back" because the local/global represents an "reference count" to the object which must be known to the JS runtime. As for p0 and p1, have you tried setting slot to a fixed string value before using

[v8-users] Re: Finding cycles in an object

2018-06-21 Thread Zac Hansen
unary * on a local gives a T*: https://v8.paulfryzel.com/docs/master/classv8_1_1_local.html#a3c96c0bc5db1288bad5769e8e54e26da On Wednesday, June 20, 2018 at 10:58:37 PM UTC-7, Gonzalo Diethelm wrote: > > I run the following JS code in the Chrome console: > > // Version 67.0.3396.87 (Official

[v8-users] Re: OOM and AddNearHeapLimitCallback

2018-06-04 Thread Zac Hansen
Every time this question is asked, the answer always seems to be "run it in a separate process space." There is no way to reliably protect / detect and recover from memory issues in V8. There's usually a "patches welcome as long as it has no affect on performance" at the end. On Monday,

[v8-users] Re: Debugging wrapped C++ object

2018-05-07 Thread Zac Hansen
..the second breakpoint being in a native debugger like gdb/lldb/etc. On Monday, May 7, 2018 at 10:00:48 PM UTC-7, Zac Hansen wrote: > > I believe you can only interact with it on a javascript-basis from the > javascript debugger. I don't know of any way to treat it spe

[v8-users] Re: Debugging wrapped C++ object

2018-05-07 Thread Zac Hansen
I believe you can only interact with it on a javascript-basis from the javascript debugger. I don't know of any way to treat it special from the javascript debugger. I often end up setting two breakpoints - first in JS, then another in the native callback I registered for the javascript

[v8-users] Re: What C++ language standard for V8?

2018-04-18 Thread Zac Hansen
It's been a while since I've built it, but can't you see the command line it uses? It should say the version -std=c++?? On Tuesday, April 17, 2018 at 9:35:27 PM UTC-7, Thomson Tan wrote: > > As V8 is written mostly in C++, what standard does it obey, C++11, or > later? > -- -- v8-users

Re: [v8-users] standalone static library

2018-03-22 Thread Zac Hansen
:) On Thursday, March 22, 2018 at 4:26:47 PM UTC-7, Eduardo Bolis wrote: > > I put libstdc++ in my library list, even try to link it statically but > nothing changes. Is there any way else to do it? > > On Thursday, March 22, 2018 at 7:42:23 PM UTC-3, Zac Hansen wrote: >> >>

Re: [v8-users] standalone static library

2018-03-22 Thread Zac Hansen
I believe the std:: issues are from you linking v8 compiled with libc++ against libstdc++. On Thursday, March 22, 2018 at 3:37:50 PM UTC-7, Eduardo Bolis wrote: > > These are the first error lines (there are hundreds of them): > > g++ -o dist/Debug/GNU-Linux/teste-v8

Re: [v8-users] standalone static library

2018-03-21 Thread Zac Hansen
Please post the exact error messages you received when you followed the posted docs. On Wednesday, March 21, 2018 at 5:56:27 AM UTC-7, Eduardo Bolis wrote: > > Yes, I did. The examples created in the build process (Hello World, Shell, > etc) works fine. > But when I try to compile them from

[v8-users] Re: ArrayBuffer::Allocator::Free() length differing from Allocate() length?

2018-03-14 Thread Zac Hansen
Have you compiled with ASAN? Presumably if you're deleting more memory than you have, that would fire. Just for debugging this, you could even put in a map of allocated addresses and sizes and just track what requests come in that don't seem to match. It seems like requests that would cause

[v8-users] Re: How does one schedule a weak handle callback with internal fields?

2018-03-03 Thread Zac Hansen
I still don't understand what the point of this call is under any circumstances when you can get the internal fields out of your object when you get it from the object you get from the kParamter call. On Saturday, March 3, 2018 at 9:02:42 PM UTC-8, A.M. wrote: > > Not much help or

Re: [v8-users] How does one schedule a weak handle callback with internal fields?

2018-02-27 Thread Zac Hansen
What's the intended use case of this option? On Tuesday, February 27, 2018 at 4:21:03 PM UTC-8, Ben Noordhuis wrote: > > On Tue, Feb 27, 2018 at 5:49 AM, A.M. > wrote: > > Calling `SetWeak` like this: > > > > global_handle.SetWeak(parameter, ::WeakCallback, > >

[v8-users] Re: How does one schedule a weak handle callback with internal fields?

2018-02-27 Thread Zac Hansen
Ahh, you're right, I'm using kParameter. I just spent 15 minutes digging around in the code (presumably the same stuff you've looked at) and I can't make heads or tails of it. On Tuesday, February 27, 2018 at 5:13:06 AM UTC-8, A.M. wrote: > > > > Have you tried it? > > Yes > > > I've

[v8-users] Re: How does one schedule a weak handle callback with internal fields?

2018-02-26 Thread Zac Hansen
Have you tried it? This is fundamentally required behavior in anything that embeds any type of externally allocated memory inside a JavaScript object, so I'd be surprised if it were broken. I've been using this for years and never had any issues with it not returning me the data I expect.

[v8-users] Re: Inheriting a C++ class in JavaScript

2018-02-06 Thread Zac Hansen
Not sure what IsConstructCall check is, but when I do this, I just set the prototype of the newly created JS object to the prototype of the JS object with the C++ object in its internal field. Not sure how useful this code is for someone else to look at (it's pretty ugly), but here's where

[v8-users] Re: Strange link errors involving ArrayBuffer::Allocator (occur with v8 6.1, but did not occur with v8 5.5)

2018-01-18 Thread Zac Hansen
, July 27, 2017 at 7:49:34 PM UTC-7, Zac Hansen wrote: > > > I link against it all the time with rtti and exceptions and don't have any > problems as long as I don't let any exceptions get into the actual V8 code. > > > Obviously you can't do anything with it that requir

[v8-users] Re: An update for embedders of V8

2018-01-06 Thread Zac Hansen
There's no (meaningful) runtime performance difference between disabling it at compile vs runtime, correct? On Friday, January 5, 2018 at 9:33:12 AM UTC-8, Thomas Nattestad wrote: > > Hello users and embedders of V8, > > On January 3rd, researchers from Google's Project Zero >

Re: [v8-users] Undefined reference to v8::platform::NewDefaultPlatform

2018-01-02 Thread Zac Hansen
> On Tuesday, January 2, 2018 at 7:59:48 AM UTC+2, Zac Hansen wrote: >> >> It's not a "relocation" issue, I'm pretty sure -- it's a stdlib issue. >> It looks like the first symbol was from libc++ (the __1 gives it away) and >> the second was most likely from l

Re: [v8-users] Undefined reference to v8::platform::NewDefaultPlatform

2018-01-01 Thread Zac Hansen
It's not a "relocation" issue, I'm pretty sure -- it's a stdlib issue. It looks like the first symbol was from libc++ (the __1 gives it away) and the second was most likely from libstdc++. <== just a guess but pretty consistent with stuff I've seen before. On Monday, January 1, 2018 at

Re: [v8-users] Undefined reference to v8::platform::NewDefaultPlatform

2017-12-31 Thread Zac Hansen
If you look at the symbols in your libs is it in there anywhere? On Saturday, December 30, 2017 at 10:01:28 AM UTC-8, Bogdan Padalko wrote: > > Thanks for quick reply! Unfortunately, it's the same. I ended up with > hello world example after to trying out to use NewDefaultPlatform with > php-v8

[v8-users] Re: clearing all handles from makeContext()

2017-12-14 Thread Zac Hansen
Wouldn't it be better to ask on a node mailing list? On Wednesday, December 13, 2017 at 10:54:15 PM UTC-8, madana gopal wrote: > > Hi Team, > > We are creating a V8 context frequently calling node::makeContext() from > c++ code. But it seen, below objects created from native context (in >

[v8-users] Re: Changes to the V8 API changes doc

2017-12-05 Thread Zac Hansen
Yeah I long gave up on getting any actual sort of documentation for the project, so why bother keeping any. On Tuesday, December 5, 2017 at 1:10:25 AM UTC-8, Michael Hablich wrote: > > Hi folks, > > *you can stop reading now if you don't know what the 'V8 API changes >

[v8-users] Re: how to install php-v8 version 0.2.1 on centos 7

2017-12-04 Thread Zac Hansen
That doesn't sound like it has anything to do with v8. Why not ask in a php forum of some sort? or ubuntu? On Monday, December 4, 2017 at 3:00:48 PM UTC-8, Felipe Salazar wrote: > > Hi everyone > > Currently, I am migration an application from Ubuntu 16.04 to Centos 7. > The application

Re: [v8-users] getting javascript variable and function names from V8 Context

2017-12-01 Thread Zac Hansen
It's important to remember that a lot of things in your code don't actually show up attached to a context... things like variables declared with 'let', and classes defined with 'class' On Friday, December 1, 2017 at 6:04:10 PM UTC-8, Yudhi Seymour wrote: > > You can use the context’s Global()

[v8-users] Re: store v8::Local in std containers like vector, unordered_map

2017-11-29 Thread Zac Hansen
Oops, I didn't look closely enough at your example. What ben said. But if you want to store them longer, then you'll want the global.. On Tuesday, November 28, 2017 at 11:18:35 PM UTC-8, Zac Hansen wrote: > > You'll want to put it in a global, not a local. Globals outlive their >

[v8-users] Re: store v8::Local in std containers like vector, unordered_map

2017-11-28 Thread Zac Hansen
You'll want to put it in a global, not a local. Globals outlive their lexical scope. Just as a note, they're move-only. On Tuesday, November 28, 2017 at 12:20:00 AM UTC-8, dark...@gmail.com wrote: > > I have code like: > > > v8::Isolate::Scope isolate_scope(isolate); > v8::HandleScope

[v8-users] Re: Crash cause?

2017-10-28 Thread Zac Hansen
Unless someone magically knows this crash, you're unlikely to get any help without posting a full test case which reproduces the error. You didn't even say what version of V8 you're using. On Thursday, October 26, 2017 at 10:30:53 AM UTC-7, Kavin Mani wrote: > > Hi, > > I am fairly new to V8

[v8-users] Re: Compiling multiple js files into one context

2017-10-16 Thread Zac Hansen
it's always best to post the full code to reproduce your issue. On Sunday, October 15, 2017 at 11:29:37 PM UTC-7, Gautham B A wrote: > > Hi all, > > I was wondering if it's possible to compile multiple javascript source > files into a single context. For example, > // File a.js > function f1(){

[v8-users] Re: v8 android build problem

2017-10-07 Thread Zac Hansen
got libv8_base.a but no libv8_base.a ?? On Saturday, October 7, 2017 at 4:23:08 PM UTC-7, lvfulo...@gmail.com wrote: > > after run ninja -C out.gn/arm.release,I > got libv8_base.a libv8_init.a libv8_initializers.a libv8_libsampler.a > libv8_nosnapshot.a > but no libv8_base.a and

[v8-users] Re: Interceptor gets called only once on an instance

2017-09-24 Thread Zac Hansen
I'd suggest implementing the other parts of the interceptor and see if they're getting called.. and if so, make sure to implement them properly for your object. This is just the approach I would take without really understanding why you're seeing this behavior.. On Friday, September 22, 2017

[v8-users] Re: Is "extend" keyword a performance antipattern???

2017-09-23 Thread Zac Hansen
Microbenchmarks are infamously difficult to get right as often you're not testing what you think you're testing. Are you sure the optimizer isn't just throwing away code in some cases, since you're not actually doing any work with the `done` property? There's no reason that your code even

[v8-users] Re: Extending V8 via native modules/addons

2017-09-20 Thread Zac Hansen
There's no way to compile native code that can connect to any version of v8 - first of all v8 spans platforms where the code wouldn't even make sense. Second of all, there are ABI concerns across versions. Lastly, there's no way to simply connect arbitrary data to v8 that's linked in to

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

2017-09-08 Thread Zac Hansen
I don't have an answer for your specific question, but I highly recommend dynamically linking to V8. if nothing else it speeds up link times by quite a bit, from what I remember from a while ago when I switched over. On Friday, September 8, 2017 at 8:52:17 AM UTC-7, Kenton Varda wrote: > > Hi

Re: [v8-users] Re: V8 snapshots

2017-09-07 Thread Zac Hansen
can you make a special code path just for making the snapshot that releases the persistent/globals then makes the snapshots and then exits? Then you start up the "normal" code pay with the new snapshots that can create the persistent a/globals all it wants. On Thu, Sep 7, 2017 at 1:33 PM

Re: [v8-users] Re: V8 snapshots

2017-09-06 Thread Zac Hansen
pe, I can successfully create > the snapshot for the test code, but when I tried something more > complicated, I ran into this now: > > Check failed: 0 == isolate->global_handles()->global_handles_count() (0 > vs. 4). > > > On Wednesday, September 6, 2017 at 12:27:35 PM

Re: [v8-users] Re: V8 snapshots

2017-09-06 Thread Zac Hansen
gt; > return 1; > } > > The interesting thing is if I call v8::V8::CreateSnapshotDataBlob it works > as it does all the above work for me, so something in trying to use the > SnapshotCreator is causing me some issue as I will need to handle custom > embedder fields, etc... > > On Tu

[v8-users] Current V8 requires MacOS 10.12? Cannot build on 10.11

2017-09-05 Thread Zac Hansen
trying to build: 1aead19c276a9679723ecd7c0cfd2f7c1c94a53d I run tools/dev/v8gen.py -vv x64.release and get: Traceback (most recent call last): File "/Users/xaxxon/v8/build/mac/find_sdk.py", line 89, in print main() File "/Users/xaxxon/v8/build/mac/find_sdk.py", line 62, in

Re: [v8-users] Re: V8 snapshots

2017-09-05 Thread Zac Hansen
at 9:42 AM Francisco Moraes <francisco.mor...@gmail.com> wrote: > I will give it a try sometime this week. I tried to remove our > initialization JS file but that caused a failure further down the > serialization as well, so still investigating. > > > On Saturday, Septembe

[v8-users] Re: How do I load a .js file into my v8 C++ program?

2017-08-07 Thread Zac Hansen
you read it into a string and then run it like the program you already ran. On Monday, August 7, 2017 at 9:20:52 AM UTC-7, Kavin Mani wrote: > > I find that the given example program compiles and executes a simple > Javascript program supplied as a string. However, I want to compile a .js >

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

2017-07-28 Thread Zac Hansen
This is just a guess, but does v8::Isolate::Enter do it? https://v8.paulfryzel.com/docs/master/classv8_1_1_isolate.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

[v8-users] Re: Strange link errors involving ArrayBuffer::Allocator (occur with v8 6.1, but did not occur with v8 5.5)

2017-07-27 Thread Zac Hansen
I link against it all the time with rtti and exceptions and don't have any problems as long as I don't let any exceptions get into the actual V8 code. Obviously you can't do anything with it that requires typeinfo on the v8 types, but it doesn't stop you from linking ALL code that uses RTTI

[v8-users] Re: Intent to Implement: JavaScript module import()

2017-07-05 Thread Zac Hansen
Is this related, in any way, to https://v8.paulfryzel.com/docs/master/classv8_1_1_module.html ? Will this documentation be updated as a part of this implementation, if appropriate? On Wednesday, July 5, 2017 at 5:04:07 PM UTC-7, Sathya Gunasekaran wrote: > > Contact emails > > V8

[v8-users] Re: [Android] Cannot locate symbol when loading custom native so linked with v8

2017-06-26 Thread Zac Hansen
are you sure you're building and running on the same stdlib? From what I'm seeing that's a pre-initialized empty string, so it seems pretty fundamental.. https://reverseengineering.stackexchange.com/a/10724 --Zac On Monday, June 26, 2017 at 11:36:52 AM UTC-7, Henry Ping wrote: > > I also

[v8-users] Re: Significant JSON::Stringify, Uint8Array, or ArrayBuffer changes between v5.4 to v6.0.186

2017-06-23 Thread Zac Hansen
can you provide some examples of outputs that have changed? On Friday, June 23, 2017 at 3:35:09 PM UTC-7, muscovy wrote: > > I have a custom buffer-like object whose contents are handed by an > ArrayBuffer: > > Local buf = obj.As()->Buffer(); > *data =

Re: [v8-users] Re: v8 protocol not progressing after id:8

2017-06-17 Thread Zac Hansen
at node has > done in their master or 8.x branch > > -Harsha > > On Sat, Jun 17, 2017 at 3:11 AM, Zac Hansen <xax...@gmail.com> wrote: > >> did you ever figure this out? I'm working with very similar parts of v8 >> right now and am quite interested i

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-16 Thread Zac Hansen
did you ever figure this out? I'm working with very similar parts of v8 right now and am quite interested in what you may have learned. Thanks. --Zac On Wednesday, June 7, 2017 at 8:31:13 PM UTC-7, Zac Hansen wrote: > > Your understanding of this is either wrong or correct and way bey

[v8-users] Re: How do I generate xcode v8 projects?/help

2017-06-15 Thread Zac Hansen
so I hope to build a xcode > project to facilitate the preparation of debugging, but in accordance with > the official website of the steps can not be achieved. > > On Friday, June 16, 2017 at 3:42:23 AM UTC+8, Zac Hansen wrote: >> >> Why do you need to generate an xcode projec

Re: [v8-users] Re: How do I generate xcode v8 projects?/help

2017-06-15 Thread Zac Hansen
e official website of the steps can not be achieved. > > > On Friday, June 16, 2017 at 3:42:23 AM UTC+8, Zac Hansen wrote: >> >> Why do you need to generate an xcode project? >> >> Once the files are built, there's not really much else to do with them. >> You can

[v8-users] Re: How do I generate xcode v8 projects?/help

2017-06-15 Thread Zac Hansen
Did you see this link: https://github.com/v8/v8/wiki/Building-with-GN On Thursday, June 15, 2017 at 3:39:44 AM UTC-7, Shu Dong wrote: > > I follow the Building V8 documentation,From the root of your V8 checkout, > run either of: > gypfiles/gyp_v8 -Dtarget_arch=ia32 > gypfiles/gyp_v8

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

2017-06-15 Thread Zac Hansen
Everything I'm seeing says it should be set in your registered weak callback.. if it's ever false there, then I'd look into it further, but other than that the behavior seems to be not very guaranteed. I am not a v8 developer, I just googled around a bit. --Zac On Thursday, June 15, 2017 at

[v8-users] Re: How do I generate xcode v8 projects?/help

2017-06-15 Thread Zac Hansen
Why do you need to generate an xcode project? Once the files are built, there's not really much else to do with them. You can add the resulting library files and header file locations to your project that uses them easily enough without having an actual v8 xcode project. On Thursday, June

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
alled. > > I am using libuv for asyncIO and I think you are using boost for the same. > > I truly appreciate your help. > > On Thursday, June 8, 2017 at 3:23:32 AM UTC+5:30, Zac Hansen wrote: >> >> Sorry if I'm bothering you or not helping, but... >> >> Where

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
d. > If I comment this out, inspector will pause when hit on halt but does not > respond to any other front end messages. > > > > On Wednesday, June 7, 2017 at 1:21:11 PM UTC+5:30, Zac Hansen wrote: >> >> I'm not sure what the PumpMessageLoop call does, but have you

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
ctor will pause when hit on halt but does not > respond to any other front end messages. > > > > On Wednesday, June 7, 2017 at 1:21:11 PM UTC+5:30, Zac Hansen wrote: >> >> I'm not sure what the PumpMessageLoop call does, but have you tried it >> without? &g

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
I'm not sure what the PumpMessageLoop call does, but have you tried it without? That sounds like it might start execution of code even though it is supposed to be paused. On Tuesday, June 6, 2017 at 11:11:20 PM UTC-7, Zac Hansen wrote: > > Hrmm, not sure what happened, I search now

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
Hrmm, not sure what happened, I search now and I see this: https://github.com/hsharsha/v8inspector/blob/a8219beb1b69ae6cbec1c79274291a14910cc248/inspector_agent.cc#L308 On Tuesday, June 6, 2017 at 11:08:52 PM UTC-7, Zac Hansen wrote: > > I searched your code for runMessageLoopOnPause and

[v8-users] Re: v8 protocol not progressing after id:8

2017-06-07 Thread Zac Hansen
th browser. > > Thanks, > -Harsha > > On Wednesday, June 7, 2017 at 11:09:57 AM UTC+5:30, Zac Hansen wrote: >> >> Are you having trouble setting those or when those are hit? >> >> When they are hit, your code will go into the same callback as when yo

[v8-users] ScriptCompiler::CompileFunctionInContext creates negative offsets in the ScriptOrigin data structure that breaks debugging

2017-05-30 Thread Zac Hansen
Then, when chrome sees a negative offset in the data it gets in the chrome debugging prototocol data, it seems to just ignore the script.. so I have to crate my ScriptOrigin object with a bogus offset in order to get the number to be positive (but not too positive) because it also seems to

Re: [v8-users] Re: What is the difference between Arguments::Holder() and Arguments::This()?

2017-05-29 Thread Zac Hansen
This post is not (or at least no longer) correct. Holder only works if you have inherited in FunctionTemplate::Inherit, not if you use "javascript inheritance" as described: x.__proto__ = document; x.createElement(...) <=== illegal invocation On Monday, March 9, 2009 at 12:46:31 AM UTC-7,

Re: [v8-users] Adding Signature to my FunctionTemplate but "derived types" calling functions get Illegal Invocation errors

2017-05-29 Thread Zac Hansen
y or indirectly from the signature's FunctionTemplate <http://v8.paulfryzel.com/docs/master/classv8_1_1_function_template.html>. On Mon, May 29, 2017 at 12:01 AM, Zac Hansen <xax...@gmail.com> wrote: > In this thread: https://groups.google.com/forum/#!topic/v8-users/ > Axf4h

Re: [v8-users] Adding Signature to my FunctionTemplate but "derived types" calling functions get Illegal Invocation errors

2017-05-29 Thread Zac Hansen
would still point at the receiver, and > not the prototype with the matching signature :/ > > On Sun, May 28, 2017 at 7:27 PM Zac Hansen <xax...@gmail.com> wrote: > >> I create a "constructor" FunctionTemplate, create a signature from that >> FunctionTemplate, t

[v8-users] Adding Signature to my FunctionTemplate but "derived types" calling functions get Illegal Invocation errors

2017-05-28 Thread Zac Hansen
I create a "constructor" FunctionTemplate, create a signature from that FunctionTemplate, then on that FunctionTemplate's PrototypeObject ObjectTemplate, I create a bunch of FunctionTemplate's using the signature I generated before. I can call the function with objects created directly from

Re: [v8-users] Re: Ciao! FunctionTemplate

2017-05-24 Thread Zac Hansen
glad you got it working :) On Tue, May 23, 2017 at 11:11 PM, Patrik Laszlo wrote: > I got it!!! I needed an External and a args.Data() for the function > template and it all works!!! Perfect! YOU ARE THE GOD!! THANKS SO MUCH! > > > On Wednesday, May 24, 2017 at 1:52:51 AM

[v8-users] Re: Ciao! FunctionTemplate

2017-05-23 Thread Zac Hansen
Or if you want to parameterize the function with data that is the same all calls, then the third parameter to FunctionTemplate can take a v8::External which is essentially a void*. On Tuesday, May 23, 2017 at 7:28:00 PM UTC-7, Zac Hansen wrote: > > when you call the javascript functi

[v8-users] Re: Ciao! FunctionTemplate

2017-05-23 Thread Zac Hansen
when you call the javascript function you get back from the template, you have to pass it the parameters you want called on it. Or am I misunderstanding your question? On Tuesday, May 23, 2017 at 4:52:51 PM UTC-7, Patrik Laszlo wrote: > > Hi! > > How are you? > This works, async function: > >

[v8-users] Re: ThreadSanitizer finds data race in concurrent creation of Isolates

2017-05-19 Thread Zac Hansen
Perhaps just file it as a bug. https://bugs.chromium.org/p/v8/issues/ On Wednesday, May 17, 2017 at 5:58:44 AM UTC-7, Andre Cunha wrote: > > Hello, > > I'm working on a library where multiple threads can run JS code > independently at the same time. In the library, each thread creates and >

[v8-users] Re: Calling a JS class constructor from C++

2017-05-19 Thread Zac Hansen
When you create a class with that syntax, it's not a global variable. it's like a "let" declaration - it's only available within the scope it's declared. i.e. you can't create it from C++. You can do a var SomeName = class if you want, though, to give it a name. but it doesn't have a

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

2017-05-19 Thread Zac Hansen
why do you care about the size of the archive file? On Friday, May 12, 2017 at 3:05:57 AM UTC-7, Srini Edara wrote: > > We are working on the V8 version 5.3.332 & we choose to compile it as > static library. We compiled the library with the following configuration. > >

[v8-users] Re: Release build on mac failing in: run.py ./mksnapshot

2017-04-30 Thread Zac Hansen
Never mind. I had my debug build in my DYLD_LIBRARY_PATH. On Sunday, April 30, 2017 at 3:56:16 AM UTC-7, Zac Hansen wrote: > > While doing a x64.release build on my 10.11.6 mac, I get the following > error: > (I've tried on a couple recent commits and gotten the same error, but thi

[v8-users] Re: Could you provide actual up-to-date example of "Accessing Dynamic Variables", please?

2017-04-24 Thread Zac Hansen
it looks at least pretty close. can you post some code and say what specific problems you're having? On Thursday, April 20, 2017 at 12:57:18 AM UTC-7, AleK Shmakov wrote: > > "Embedder's Guide" > unfotunatelly is not valid. > -- --

Re: [v8-users] Re: Interceptors running under "with"

2017-04-04 Thread Zac Hansen
esday, April 4, 2017 at 9:05:11 AM UTC+3, Zac Hansen wrote: >> >> I don't know for sure, but if you don't tell the interceptor that a isn't >> a property on CONS, then it thinks it is and then it finds cons_object.a >> but then you don't have a value for it, so it re

Re: [v8-users] ICU problem

2017-04-04 Thread Zac Hansen
you can tell the linker to not care about order.. but presumably it's faster if you put them in the right order to begin with. On Thursday, March 30, 2017 at 5:47:12 AM UTC-7, Nicolò Cavalleri wrote: > > Actually the problem was that I forgot to use circular dependencies, as > it's almost the

Re: [v8-users] debugging protocol

2017-04-04 Thread Zac Hansen
do you have it working if you connect with chrome then refresh chrome that it works? When I reconnect to the same embedded v8 app, I get a slightly different set of messages that don't properly set up the debugger the second time. Thanks. On Thursday, March 23, 2017 at 9:32:15 AM UTC-7,

Re: [v8-users] Re: Interceptors running under "with"

2017-04-04 Thread Zac Hansen
am *not* inside "using", the handler for "a" should return > v8::Undefined (or some other preset value). > If I *am* inside "using", the handler should not return anything at all, > and let V8 determine the value. > Is that possible? > > &g

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

2017-04-03 Thread Zac Hansen
by the way, the same restriction exists for es6-style class definitions. On Monday, April 3, 2017 at 10:48:56 PM UTC-7, Zac Hansen wrote: > > I'm nearly certain you cannot -- and I don't even believe they're > guaranteed to actually ever exist. It would put pretty serious li

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

2017-04-03 Thread Zac Hansen
I'm nearly certain you cannot -- and I don't even believe they're guaranteed to actually ever exist. It would put pretty serious limitations on the optimizer if everything in a block had to exist as written. On Monday, April 3, 2017 at 8:02:28 PM UTC-7, Ian Bull wrote: > > In J2V8 (our Java

[v8-users] Re: Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
snapshots. On Monday, April 3, 2017 at 12:48:52 AM UTC-7, Zac Hansen wrote: > > I just updated my v8 build and noticed a dramatic slowdown in startup > times. > > I'd always used no snapshots for convenience because the startup penalty > was insignificant (maybe around 3s?) but

[v8-users] Re: Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
il 3, 2017 at 12:48:52 AM UTC-7, Zac Hansen wrote: > > I just updated my v8 build and noticed a dramatic slowdown in startup > times. > > I'd always used no snapshots for convenience because the startup penalty > was insignificant (maybe around 3s?) but ever since I updat

[v8-users] Re: Interceptors running under "with"

2017-04-03 Thread Zac Hansen
Are you using the objecttemplate's setnamedpropertyhandler call? if so, are you implementing all the callbacks to say that your CONS object doesn't have a property a? On Monday, April 3, 2017 at 7:25:25 AM UTC-7, Danny Dorfman wrote: > > Hello there, > > Is there a way for my interceptor to

[v8-users] Re: (embedded) Is it possible to set a soft memory limit per Isolate?

2017-04-03 Thread Zac Hansen
This has been asked for numerous times and the responses that I've seen are: "run it in a separate process" and "we take patches as long as it doesn't slow down anything". On Saturday, April 1, 2017 at 10:36:07 PM UTC-7, Mark Tarrabain wrote: > > Is it possible to get the v8 engine when using

[v8-users] Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
I just updated my v8 build and noticed a dramatic slowdown in startup times. I'd always used no snapshots for convenience because the startup penalty was insignificant (maybe around 3s?) but ever since I updated it's up around 20s now. Is this a known behavior or am I doing something else

[v8-users] How to deal with reconnecting to v8-inspector?

2017-04-03 Thread Zac Hansen
I've hooked in v8-inspector to websockets using websocketspp and have it working pretty well initially, but I can't figure out how to make it work if I hit refresh in chrome to have the debugger re-attach. Most of the messages are sent through, but the one that seems to be missing that seems

[v8-users] Re: Cannot get an EC6 class as a value with V8 and create an instance from it?

2017-01-12 Thread Zac Hansen
I followed up on the stack overflow question: http://stackoverflow.com/questions/41211533/how-to-return-a-new-v8-javascript-class-instance-from-within-c I believe the answer is that there is a "LexicalEnvironment" (as defined in the spec) on the context object which stores things like

[v8-users] Re: [novice] SIGSEGV upon entering new top of the stack context

2016-12-01 Thread Zac Hansen
I don't know the exact answer ottomh, but make sure you're running against a debug build - the error messages are a little better. Also, maybe try putting a handlescope before th eline that's crashing? --Zac On Thursday, December 1, 2016 at 8:09:01 AM UTC-8, Thomas Barusseau wrote: > > Hello,

Re: [v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-31 Thread Zac Hansen
nly real > JS accessors are called through the prototype chain. This again follows the > spec. > > On Mon, Oct 31, 2016 at 2:10 AM Zac Hansen <xax...@gmail.com > > wrote: > >> Stack traces for the working and non-working v

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-30 Thread Zac Hansen
Stack traces for the working and non-working versions: https://gist.github.com/xaxxon/5eabcc079a3103abd0f7b3239b2cf3b2 my v8 source is at commit: a05f85a3db33860f7f9651d904fd4193ee757848 On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following java

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-30 Thread Zac Hansen
I'm also noticing a difference between the working/non-working code: Runtime_KeyedStoreIC_Miss and Runtime_StoreIC_Miss But I don' tknow what a Keyed store is vs a non-keyed store. On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following java

Re: [v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-30 Thread Zac Hansen
Well, I'm not doing any Private::New, so it must be something else causing the the configuration to be different :( On Sunday, October 30, 2016 at 3:43:58 PM UTC-7, Caitlin Potter wrote: > > > > > Sent from my iPhone > On Oct 30, 2016, at 6:18 PM, Zac Hansen <xax...

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-29 Thread Zac Hansen
I've added an enumerator callback. it is not called. On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following javascript: > > var p = new Point(); p.foo = 5; > > where Point creates an object from an ObjectTemplate that has >

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-29 Thread Zac Hansen
I've since added a query callback and tried returning None and ReadOnly. No change. On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following javascript: > > var p = new Point(); p.foo = 5; > > where Point creates an object from an Objec

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-29 Thread Zac Hansen
er_; if (!current->map()->has_hidden_prototype()) return false; <=== THIS IS WHERE IT RETURNS when called from Object::SetPropertyInternal On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following javascript: > > var p = new Point(); p.foo = 5;

[v8-users] Re: named property handler - getter being called for both gets and sets

2016-10-29 Thread Zac Hansen
I added a delete callback and when I call delete p.foo, I get no callbacks. On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: > > I run the following javascript: > > var p = new Point(); p.foo = 5; > > where Point creates an object from an ObjectTempla

[v8-users] named property handler - getter being called for both gets and sets

2016-10-29 Thread Zac Hansen
I run the following javascript: var p = new Point(); p.foo = 5; where Point creates an object from an ObjectTemplate that has had SetHandler called on it. However, this calls my getter callback. Everything I've tried from javascript calls my getter callback.

Re: [v8-users] Re: building v8 fails on bytecode-peephole-table.cc because libv8_libbase.dylib not found

2016-10-18 Thread Zac Hansen
n Tue, Oct 18, 2016 at 12:49 PM, Jochen Eisinger <joc...@chromium.org> wrote: > I tried to fix this here but concluded it's "not supported": https:// > codereview.chromium.org/22382003/ > > On Tue, Oct 18, 2016 at 9:33 AM Zac Hansen <xax...@gmail.com> wrote: >

[v8-users] Re: Enable Debug of V8 scripts and use a remote debugger.

2016-10-18 Thread Zac Hansen
Looking at the bug, less than 2 hours ago I see: [inspector] Turn on inspector by default Not sure if that means what I think it means, but maybe it's ready to go? On Tuesday, October 18, 2016 at 1:39:48 AM UTC-7, Zac Hansen wrote: > > bad news: there is currently no way to do this. &g

Re: [v8-users] Re: building v8 fails on bytecode-peephole-table.cc because libv8_libbase.dylib not found

2016-10-18 Thread Zac Hansen
nent build with gyp on mac ever worked for > you, it never did for me :-/ > > On Tue, Oct 18, 2016 at 5:32 AM Zac Hansen <xax...@gmail.com> wrote: > >> manually copying the file into /usr/local/lib works. Someone said it >> might have to do with the "install_name&q

  1   2   >