Questions tagged [embedded-v8]
253 questions
3
votes
1 answer
V8 JavaScript Engine and Mac App Store
If I embed the V8 JavaScript Engine in my application (a game) is it still possible to distribute it in the Mac & iOS App Stores?

dbotha
- 1,501
- 4
- 20
- 38
3
votes
1 answer
v8 Cannot access properties from script compiled in new context
I've created a simple 'require' mechanism (https://gist.github.com/1031869), in which the included script is compiled and run in a new context. However, when I call a function in the included script and pass it this, the included script doesn't see…

Florin
- 2,891
- 4
- 19
- 26
3
votes
1 answer
Embedder side pointer compression is DISABLED
I have built v8 8.4 for Windows as a monolithic static lib, and am trying to get this sample project running using Visual Studio 2019.
The error I get when the project runs is this:
# Fatal error in ../../src/api/api.cc, line 5619
# Embedder-vs-V8…

rhughes
- 9,257
- 11
- 59
- 87
3
votes
1 answer
where does V8 actually consume the raw javascript code?
Im trying to understand how v8 works but im unable to locate where in the code does it actually get the input raw js script to parse it and compile it into c++.
I've seen the api.cc and tried to set up a breakpoint in the compiler function but with…

Lucia Clifford
- 136
- 1
- 6
3
votes
2 answers
V8 modules exporting functions that call into c++
I am looking to embed v8 and have a module available that exports a function that calls into c++ code. For example, let's assume I have something like the following in main.js:
import {foo} from 'FooBar';
foo();
Is there a way to have foo call…

Scarfone
- 85
- 5
3
votes
1 answer
How to reset global object in embedded V8?
I would like to be able to reset global object of my V8 JS context. Let's say everything works fine, code executes etc. But now I would like to return to my starting state (remove all objects, functions etc.)
I tried this way:
First I leave my…

Łukasz Stalmach
- 143
- 8
3
votes
1 answer
V8 Segfault when using Global with Value
I am getting started with embedding v8 and I am encountering some 'unexpected behavior'. The following code produces a Segmentation fault (core dumped) when the variable value_ is not Reset at the end (see comment in code). However, the same does…

mhk
- 133
- 1
- 6
3
votes
5 answers
Embedding Mono vs Google V8?
We want to add scripting to a project.
We are hesitating which script engine to use.
I have used in the past V8 and it's quite impressive. I have used Mono as well but in toy-projects or prototypes only.
The constraints are :
speed of…

Ghassen Hamrouni
- 3,138
- 2
- 20
- 31
3
votes
1 answer
V8 - Node C++ Addon - Throwing Exception in a ConstructCall causes "FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal." - How to fail a constructor?
Basically I want to check the arguments passed to the constructor and throw an exception when arguments do not meet certain condition.
My C++ Object inherits node::ObjectWrap.
v8::Persistent SomeKlass::constructor;
FunctionTemplate…

Ryanzyy
- 101
- 1
- 8
3
votes
1 answer
How to debug javascript in embedded V8?
I'm trying to learn how to use the Debug object in V8 to debug javascript in an embedded-javascript c++ application.
I've called v8::Debug::SetDebugEventListener and set a callback. I then call v8::Debug::GetDebugContext to get a debug context,…

xaxxon
- 19,189
- 5
- 50
- 80
3
votes
1 answer
Does J2V8 uses android system V8 or compiles and provides own one?
I'd like to use android system V8 to run JS and i'd like to avoid cross-compiling V8 and providing it as .so in my app to reduce apk size. Does J2V8 use system one or compiles and provides own?

4ntoine
- 19,816
- 21
- 96
- 220
3
votes
2 answers
How to build V8 without "external startup data"?
I want a standalone JavaScript library for embedding. I already build V8 and its working correctly, but binary needs two "external data" files. I don want this files.
I was trying to build V8 without "external startup data". I tried to set…

entro
- 123
- 1
- 6
3
votes
1 answer
V8 javascript how to make asynchronous calls
I've been trying to figure out how to make asynchronous calls in V8, without luck. The example javascript code I'm trying to have run is:
function test ()
{
logMessage ('asynchronous call made!');
}
saveFunc(test);
The saveFunc function is…

Someone13
- 443
- 1
- 6
- 18
3
votes
2 answers
Precompile v8 script for use in multiple isolate
I have implemented a 'require'-like function using embedded v8 that loads a JavaScript file and executes it, but because my program has multiple threads, and as such each thread has its own isolate, I am having to load and compile the file…

markt1964
- 2,638
- 2
- 22
- 54
3
votes
2 answers
How do I iterate over properties in an Object
I want to iterate through an Object in a V8 C++ function.
NodeJS:
node.addProperties({"user":"testuser","password":"passwd"};
I want to pass "user" and "password", both names and values to a C++ method which takes parameters like:
AddProperty(char…

Andreas Selenwall
- 5,705
- 11
- 45
- 58