Questions tagged [embedded-v8]

253 questions
0
votes
1 answer

How do you create a v8::ObjectTemplate with an array property?

I am trying to create an ObjectTemplate that contains a property that is an array of ObjectTemplates. My goal is to use this ObjectTemplate to construct a v8::Context that will have a property that is an array of…
0
votes
1 answer

A crash on V8' Context::New

I implement a wrapper around the Google V8 engine. I wrote a class: class Es { public: Es(); ~Es(); int Init(const char* exec_path); int CreateContext(uint& id); int RemoveContext(const uint id); protected: Global
denn
  • 337
  • 2
  • 13
0
votes
1 answer

v8 NewInstance memory leak

I have a problem with v8. I am creating object with NewInstance from Object Template. This function is being called every frame, and I have such code (see below), where GC does not collect objects from returned array and therefore I have memory…
0
votes
0 answers

SetInternalFieldCount on constructor->InstanceTemplate() did not work for the instantiated object

This post is about exposing C++ objects to the v8 javascript engine. To attach a C++ object to a javascript object, I make use of the GetInternalField() and External APIs. Before you can set or get any internal field, you have to call…
cgsdfc
  • 538
  • 4
  • 19
0
votes
0 answers

Creating a v8 object for passing into a function template

I am currently trying to create a function that exposes a type to js. I am doing this by passing the name and a set of member functions and variables (variables have not been implemented yet) into a function which takes them, transforms them and…
0
votes
1 answer

Compile V8 on linux platform failed

compile the latest v8 failed on linux platform. linux, v8 using ninjia ninja: Entering directory `out.gn/x64.release' [14/571] LINK ./mksnapshot o/x/args.gn+ …
0
votes
1 answer

V8 Garbage Collection Differs For ObjectTemplates and Objects Created With Them

V8's garbage collection seems to easily clean up as it goes a Local value where T anything stored in the Local, however if you create an ObjectTemplate and then create an instance of that Object, v8 will wait to clean up the memory. Consider the…
Scarfone
  • 85
  • 5
0
votes
1 answer

WebAssembly.instantiate didn't call then nor catch in v8 embedded

I tried to ship WebAssembly feature in v8 7.2 for my Android Project. I have successfully imported v8 as a static library. But I came across an issue that WebAssembly didn't call either then nor catch callback. Here is my code…
Jian Guo
  • 708
  • 1
  • 9
  • 19
0
votes
1 answer

How to make Chrome Dev Tools show the JavaScript source

I slightly modified the hello-world.cc sample, importing some code from d8. Then, using websocketpp and asio, I added a WebSocket Server to the program. Also, I used V8 inspector from an embedder standpoint to add a simple implementation for the…
manuell
  • 7,528
  • 5
  • 31
  • 58
0
votes
1 answer

Can I use V8's inspector protocol to debug js code that is loaded from a snapshot?

I embed v8 in my server application. Now I want to connect to the server's V8 to send inspect protocol to debug js code. The server side use V8's snapshot tech to get less creating time. However, when I send the inspect protocol, I failed with this…
0
votes
1 answer

How does one convert Local to a string?

So after being away awhile some things changed. I used to be able to do this: void ObjectTemplateProxy::GetProperty(Local hName, const PropertyCallbackInfo& info) { auto hStr = hName->ToString(); But now I need an isolate, and…
James Wilkins
  • 6,836
  • 3
  • 48
  • 73
0
votes
1 answer

lld-link: error: : undefined symbol: mainCRTStartup when building V8

I've spent a whole day on this now and I can't seem to get the .lib files to build with VS 2017. I followed the V8 docs here: https://v8.dev/docs/build Following the instructions does work, but I end up with a V8 command line program in the out…
James Wilkins
  • 6,836
  • 3
  • 48
  • 73
0
votes
1 answer

General server-side use of V8: Isolates

Google's open sourced V8 engine is mature, performant JIT compiler. Implemented primarily in C++, acting as JS centric execution runtime. It has an isolation implementation (V8: Isolates), providing isolation granularity within a single process.…
C. Derx
  • 326
  • 2
  • 13
0
votes
1 answer

Intercept any outgoing network request in V8 ( at core level )

I need to modify the embedded V8 engine in electronjs/nodejs in order to intercept/block any network access request, whether it be through request, http module or even src tag in a html or ajax request, i need to pull this off at the core of V8 so…
Timberland
  • 40
  • 8
0
votes
1 answer

v8 FunctionTemplate::GetFunction() crashes with Access Violation

I have a really simple method that initializes v8, I am unable to track the reason (other v8 stuff works just fine): void JavascriptEngine::init() { m_platform = v8::platform::NewDefaultPlatform(); …