Updated v8 in 0.11.14 breaks compilation
marcominetti opened this issue · 14 comments
Related to SendCommand synopsis changed (dropped) in new v8 (https://code.google.com/p/v8/source/detail?r=20747): manually getting debugger isolate from context and passing it to SendCommand should fix compilation (and be backward compatible?). Unfortunately, I don't practive with v8 internals yet.
@marcominetti , thanks for information. I think I'll fix it on weekend. Something like this can be helpful
v8::Debug::Call(v8::Isolate::GetCurrent(), fn);
or
v8::Debug::Call(v8::Debug::GetDebugContext()->GetIsolate(), fn);
if you need a fast fix you can joke with this two lines. In next version of v8-debug
I don't use Call
function to receive debug enviroment. I'll fix this function but also I'll add this one:
static NAN_METHOD(RunScript) {
NanScope();
v8::Local<v8::String> script_source(args[0]->ToString());
if (script_source.IsEmpty())
NanReturnUndefined();
v8::Context::Scope context_scope(v8::Debug::GetDebugContext());
v8::Local<v8::Script> script = v8::Script::Compile(script_source);
if (script.IsEmpty())
NanReturnUndefined();
NanReturnValue(script->Run());
};
module.exports.runInDebugContext = function(script) {
if (typeof script == 'function') script = script.toString() + '()';
return binding.runScript(script);
};
Ok... :D
Maybe also v8-profiler you fixed in master node-inspector could be affected... but probably updating version deps in node-inspector to latest one should allow compiling (not tested if working)...
@marcominetti , I see that you merged HEAP Profiler API in Node Inspector, what you can say about it (is it stable or you found some bugs?)
Seems to be stable... missing the remove/delete heapshot. Sometimes, navigating through then tree causes runtime exceptions (i don't remember if simply cleared error with a try/catch somewhere in devtools)...
did u find time to push above changes and fix to v8-debug?
v8-debug updated (minor version changed) - reinstall node-inspector deps
tested, seems ok now... is there any way to make your recent changes (debug/profiler) to stable 0.10.x branches?
is there any way to make your recent changes (debug/profiler)
What you mean?
Do you have any problems with profiler on 0.10.x?
When snapshotting heap or profiling memory allocation, the snapshot is taking but blink stuck on "Building dominator tree"... Do you experience the same? (It only happens on node 0.10...)
I had to hold 0.1.3 version to be able to compile v8-debug on 0.10...
Now 0.1.5 is compatible with 0.10
When snapshotting heap or profiling memory allocation, the snapshot is taking but blink stuck on "Building dominator tree"... Do you experience the same? (It only happens on node 0.10...)
I don't have this problem on 0.10.x. Have you some small code snipped to reproduce this problem?
sorry for being out of office... I'll push the example code soon so that you can test if it's a problem related with profiler or not! get back to you soon