Hi,
My code:
#include <v8.h>
#include <v8-debug.h>
#include <iostream>
#include <string>
#include <assert.h>
using namespace std;
using namespace v8;
static Local<Value> execJsScript(const std::string& jsCode) {
Local<String> source = String::NewFromUtf8(Isolate::GetCurrent(),
jsCode.c_str());
Local<v8::Script> script = Script::Compile(source);
assert(!script.IsEmpty());
return script->Run();
}
void test_js_DebugBreak() {
cout << "V8 version: " << v8::V8::GetVersion() << endl;
auto isolate = Isolate::New();
Isolate::Scope isolateScope(isolate);
HandleScope handleScope(isolate);
Handle<Context> context = Context::New(isolate);
Context::Scope contextScope(context);
auto globalObj = context->Global();
v8::Debug::EnableAgent("test", 5858, true);
v8::Debug::DebugBreak(isolate);
// I get this error here:
// # Fatal error in ..\..\src\compiler.cc, line 274
// # CHECK(feedback_vector_->length() == length) failed
execJsScript(
"function foo(f) { f(); };"
"function enqueueMicrotask(callback) {"
" foo(wrapped);"
" function wrapped() {"
" callback();"
" }"
"};"
"enqueueMicrotask(function() {"
" throw new Error('fooerr');"
"});"
);
}
Am I doing something wrong? Or is this a bug in V8? This is V8 3.25.8.
Thanks,
Albert
--
--
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.