Skip to content

Commit

Permalink
napi: Fix build errors (nodejs#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin authored Feb 11, 2017
1 parent 784e07c commit a641768
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_jsvmapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ namespace v8impl {
}

virtual void* Data() override {
return _cbdata->GetInternalField(kDataIndex).As<v8::External>()->Value();
return v8::Local<v8::External>::Cast(_cbdata->GetInternalField(kDataIndex))->Value();
}

protected:
void InvokeCallback() {
napi_callback_info cbinfo_wrapper = reinterpret_cast<napi_callback_info>(
static_cast<CallbackWrapper*>(this));
napi_callback cb = reinterpret_cast<napi_callback>(
_cbdata->GetInternalField(I).As<v8::External>()->Value());
v8::Local<v8::External>::Cast(_cbdata->GetInternalField(I))->Value());
v8::Isolate* isolate = _cbinfo.GetIsolate();
cb(v8impl::JsEnvFromV8Isolate(isolate), cbinfo_wrapper);

Expand Down
1 change: 1 addition & 0 deletions src/node_jsvmapi_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef SRC_NODE_JSVMAPI_TYPES_H_
#define SRC_NODE_JSVMAPI_TYPES_H_

#include <stddef.h>
#include <stdint.h>

// JSVM API types are all opaque pointers for ABI stability
Expand Down

0 comments on commit a641768

Please sign in to comment.