Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Austin Einter
Hi Jakob Thanks for response. *Version*: 7.7.0 (candidate) (Got the version with printf("Version: %s", v8::V8::GetVersion());) Line number, valgrind output does not show. Probably I need to rebuild v8 in debug mode. I enabled --track-origin option in valgrind while executing. With this I get belo

Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Austin Einter
One more observation, if I do not keep any argument in my javascript then I do not see conditional jump. I changed my first javascript to as given below, with this the conditional jump is not shown in valgrind report. js1.js function js_add_elements() { return 10; } On Thu, Jun 27, 2019 at

Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Jakob Kummerow
Could be a bug in valgrind, or a bug in V8. Getting a line number would be helpful, along with the exact version of V8. At a quick glance, I don't see any uninitialized variables in DeclarationScope::CheckConflictingVarDeclarations. On Thu, Jun 27, 2019 at 2:27 PM Austin Einter wrote: > I change

Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Austin Einter
I changed the line to v8::Local context(instance->context->Get(instance->isolate)); It is compiling also working fine. However when I execute this executable with valgrind, I get lot of "*Conditional jump or move depends on uninitialised value(s)*" One such conditional jump is given below. ==51

Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Austin Einter
Thanks Ben. I followed your suggestion. I added *v8::Global *context; *member in instance structure. I put the code as below. *if(instance->context == nullptr){v8::Local context = v8::Context::New(instance->isolate);instance->context = new v8::Global(instance->isolate

Re: [v8-users] Keep v8 context alive for future reference

2019-06-27 Thread Ben Noordhuis
On Thu, Jun 27, 2019 at 5:05 AM Austin Einter wrote: > > Dear All > I am quite new to v8. I am a c developer, with limited c++ knowledge. Sorry > if I ask very basic questions. > > I have a C application, that interacts with web servers. Gets javascript. > Need to execute javascript. > Imagine a