I'm trying implement V8 debugger in my Qt application but I get exception.
I have 2 threads: main (that handle GUI and debugger commands) and engine
thread (that run javascript code).
1. In main thread i'm initializing V8 by calling
V8::InitializeICU();
mPlatform = platform::CreateDefaultPlatform();
V8::InitializePlatform(mPlatform);
V8::Initialize();
2. I'm creating an isolate in engine thread:
ArrayBufferAllocator* allocator = new ArrayBufferAllocator();
Isolate::CreateParams create_params; create_params.array_buffer_allocator =
allocator; isolate = Isolate::New(create_params);
3. In main thread I'm using SetMessageHandler
isolate->Enter(); v8::Debug::SetMessageHandler(HandleMessage);
// HandlMessage function:
void HandleMessage(const v8::Debug::Message& message) {
v8::String::Utf8Value response(message.GetJSON()); // TODO do something
with |response| }
4. At line with SetMessageHandler I get read access violation
Here <https://i.imgur.com/rUKKlqN.png>is call stack
Thanks in advance!
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.