Thanks a lot! I tried 3.25.14 now and it works, too.

On Monday, March 17, 2014 1:55:14 PM UTC+1, [email protected] wrote:
>
> Hi Albert,
> This is a bug in V8 (my bad), and has been fixed in V8 3.25.12.
> Thanks,
> --Michael Stanton
> --V8
>
> On Monday, March 17, 2014 1:37:16 PM UTC+1, Albert Zeyer wrote:
>>
>>
>>
>> On Monday, March 17, 2014 1:33:50 PM UTC+1, Albert Zeyer wrote:
>>>
>>> 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
>>>
>>>
>>
>> I forgot to add: Of course, you need to attach with a JS debugger, e.g. 
>> with node-inspector. It will break as expected at the first JS expression. 
>> When you click 'continue' in the debugger, you get the fatal error.
>>
>>  
>>
>

-- 
-- 
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.

Reply via email to