Questions tagged [embedded-v8]
253 questions
1
vote
1 answer
The semantics of v8::ResourceConstraints?
The v8::ResourceConstraints class is defined as follows:
class V8EXPORT ResourceConstraints {
public:
ResourceConstraints();
int max_young_space_size() const { return max_young_space_size_; }
void set_max_young_space_size(int value) {…

BitCortex
- 3,328
- 1
- 15
- 19
1
vote
2 answers
How to free up the memory claimed by V8?
An application I'm working on embeds V8 for scripting. To conserve memory, I want to shut down the scripting component when it is not needed, but for some reason the memory is never returned to the OS.
Here's what I tried:
1. Call Dispose() on the…

futlib
- 8,258
- 13
- 40
- 55
1
vote
1 answer
Why is V8 crashing when wrapped in class
I am trying to wrap V8 in a class structure where there exists one object that exposes JavaScript callbacks to the C++ code, which should do some data handling.
The idea was to keep context and handle_scope available to all participating class, i.e.…

DennisL
- 466
- 3
- 6
1
vote
1 answer
How to call a v8::Function with custom modified v8::Arguments?
I want to call JSON.stringify method from the C++ side with modified arguments, but any solution that came to my mind results in a weird segfault with all frames being at "??".
I want to do the following:
api::Console is a custom console…

Christoph Martens
- 277
- 1
- 2
- 10
1
vote
1 answer
Does glBindTexture() require a GLuint pointer?
I'm trying to implement OpenGL bindings for Texture usage in OpenGL/V8/JavaScript.
My question is pretty simple:
Does OpenGL's glBindTexture() method require a pointer to a GLuint or does it only require a valid GLuint?
The khronos docs here says it…

Christoph Martens
- 277
- 1
- 2
- 10
0
votes
0 answers
How to use Debugger.getStackTrace to retrieve runtime function call stack traces when debugging JS on V8 engine
I've embed newest v8 engine into my c++ project to execute and debug JavaScript, when I was debugging JavaScript, to get runtime function call stack traces, according to the google's v8 debugging doc:…
0
votes
0 answers
How to get the objectId for the Debugger.setBreakpointOnFunctionCall command in a C++ project using V8 engine?
I am using v8 engine inspctor to debug javascript in my own c++ project , I sent the debug command Debugger.setBreakpointOnFunctionCall to v8 engine to set a breakpoint before call a function ( function Action() ) , the command is a JSON string ,…

汪小飞
- 1
0
votes
0 answers
Embedding V8 into an existing mainloop
I'm trying to embed V8 into an existing code that already has a mainloop.
As I understand it, script->Run() is executed before the script finishes executing its "main body" (global scope).
The main problem is that in this case my mainloop will hang…

kin4stat
- 192
- 1
- 11
0
votes
2 answers
Is V8's ScriptCompiler::CachedData bytecode or machine code?
Or rather more generally, are the javascript files compiled by V8 saved to disk as V8 bytecode or as host-specific machine code?
I'm trying to understand how node-webkit's nwjc works. The function I'm referring to is…

MrSomeone
- 71
- 1
- 11
0
votes
0 answers
V8 How to evaluate v8::Module for different v8::Context?
I'm trying to create multiple v8::Contexts with their own globals initialized by evaluating exactly the same JavaScript module code.
I was hoping to compile the code once, and then run it for every v8::Context. However, it looks like v8::Module can…

Yuri
- 81
- 5
0
votes
1 answer
How can i pass callback as argument to function and execute it from c++ side?
When i embedded chakracore i could get argument which contains passed callback and execute this function with my own passed arguments to callback. How can i do it in v8 engine?
js example
readFile("C:/test.txt", (data, err) => {console.log(data,…

EGORLETOV
- 9
- 1
0
votes
0 answers
fatal error: include/libplatform/libplatform.h: No such file or directory
i was compile v8 with gn https://v8.dev/docs/build-gn
i use d8.exe(it is work)
but i cant complile /samples/hello-world.cc
fatal error: include/libplatform/libplatform.h: No such file or directory
i dont have knowledge about c++, compiler.
But i was…

ddttvv
- 1
0
votes
1 answer
Issues with building Google V8 versions 10.x/11.x with Visual Studio 2019 (9.x is ok)
I'm currently having issues to build V8 version 11.x on Windows,
specifically every version beyond 10.0 does not build on Visual Studio 2019 (16.11.22) due to different build errors.
V8 version 9.99 builds for me successfully using the steps…

Naios
- 1,513
- 1
- 12
- 26
0
votes
1 answer
How to get job and telescope command on chrome's V8 x64.release version? (No symbol "_v8_internal_Print_Object" in current context)
I'm trying to get chrome's V8 (d8) x64.release version to use the V8 support tools in GDB, specifically for the job and telescope commands (predominantly the former).
My x64.debug version has this implemented and works, but even after building the…

Sarah M.
- 167
- 1
- 1
- 12
0
votes
1 answer
V8 crashes when iterating
I've been trying to embed V8 javascript engine to my project. For the most part this has been successful, but there is one problem that doesn't seem to go away and I don't know what causes it.
When I write even a simple for loop to iterate array of…

rrhce
- 1
- 1