@@ -162,11 +162,15 @@ static void Interrupter(v8::Isolate* isolate, void *data) {
162162
163163 fprintf (stderr, " Interrupted: (frames: %d of %d)\n " , std::min (frameCount, kMaxFrames ), frameCount);
164164 for (int i = 0 ; i < stack->GetFrameCount (); ++i ) {
165- v8::Local<StackFrame> frame = stack->GetFrame ( i );
165+ v8::Local<StackFrame> frame = stack->GetFrame (
166+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
167+ isolate,
168+ #endif
169+ i );
166170 int line = frame->GetLineNumber ();
167171 int col = frame->GetColumn ();
168- v8::String::Utf8Value fn (frame->GetFunctionName ());
169- v8::String::Utf8Value script (frame->GetScriptName ());
172+ Nan::Utf8String fn (frame->GetFunctionName ());
173+ Nan::Utf8String script (frame->GetScriptName ());
170174
171175 fprintf (stderr, " at %s (%s:%d:%d)\n " ,
172176 fn.length () == 0 ? " <anonymous>" : *fn, *script, line, col);
@@ -667,7 +671,8 @@ int NodeMonitor::getIntFunction(const char* funcName) {
667671 Nan::HandleScope scope;
668672 Local<Value> res = callFunction (funcName);
669673 if (res->IsNumber ()) {
670- return res->Uint32Value ();
674+ uint32_t value = res->Uint32Value (Nan::GetCurrentContext ()).FromJust ();
675+ return value;
671676 }
672677 return 0 ;
673678}
@@ -677,7 +682,8 @@ bool NodeMonitor::getBooleanFunction(const char* funcName) {
677682 Nan::HandleScope scope;
678683 Local<Value> res = callFunction (funcName);
679684 if (res->IsBoolean ()) {
680- return res->BooleanValue ();
685+ bool value = res->BooleanValue (Nan::GetCurrentContext ()).FromJust ();
686+ return value;
681687 }
682688 return false ;
683689}
@@ -949,7 +955,7 @@ static NAN_METHOD(SetterIPCMonitorPath) {
949955 (!info[0 ]->IsString () && !info[0 ]->IsUndefined () && !info[0 ]->IsNull ())) {
950956 THROW_BAD_ARGS ();
951957 }
952- String::Utf8Value ipcMonitorPath (info[0 ]);
958+ Nan::Utf8String ipcMonitorPath (info[0 ]);
953959 _ipcMonitorPath = *ipcMonitorPath;
954960}
955961
0 commit comments