diff --git a/src/node_jsvmapi.cc b/src/node_jsvmapi.cc index de9ed3ded8ddaa..2d09d2a94afda0 100644 --- a/src/node_jsvmapi.cc +++ b/src/node_jsvmapi.cc @@ -217,7 +217,7 @@ namespace v8impl { } virtual void* Data() override { - return _cbdata->GetInternalField(kDataIndex).As()->Value(); + return v8::Local::Cast(_cbdata->GetInternalField(kDataIndex))->Value(); } protected: @@ -225,7 +225,7 @@ namespace v8impl { napi_callback_info cbinfo_wrapper = reinterpret_cast( static_cast(this)); napi_callback cb = reinterpret_cast( - _cbdata->GetInternalField(I).As()->Value()); + v8::Local::Cast(_cbdata->GetInternalField(I))->Value()); v8::Isolate* isolate = _cbinfo.GetIsolate(); cb(v8impl::JsEnvFromV8Isolate(isolate), cbinfo_wrapper); diff --git a/src/node_jsvmapi_types.h b/src/node_jsvmapi_types.h index 0ba998c30167ce..ffb0f3b01ed3b2 100644 --- a/src/node_jsvmapi_types.h +++ b/src/node_jsvmapi_types.h @@ -1,6 +1,7 @@ #ifndef SRC_NODE_JSVMAPI_TYPES_H_ #define SRC_NODE_JSVMAPI_TYPES_H_ +#include #include // JSVM API types are all opaque pointers for ABI stability