diff --git a/native_mate/constructor.h b/native_mate/constructor.h index d54cb518dc..5ac28829ca 100644 --- a/native_mate/constructor.h +++ b/native_mate/constructor.h @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/compiler_specific.h" +#include "native_mate/wrappable.h" #include "native_mate/function_template.h" namespace mate { diff --git a/native_mate/scoped_persistent.h b/native_mate/scoped_persistent.h index c1705676c2..37c2e0a281 100644 --- a/native_mate/scoped_persistent.h +++ b/native_mate/scoped_persistent.h @@ -18,8 +18,8 @@ class ScopedPersistent { ScopedPersistent() { } - explicit ScopedPersistent(v8::Handle handle) { - reset(handle); + explicit ScopedPersistent(v8::Handle handle) { + reset(v8::Handle::Cast(handle)); } ~ScopedPersistent() { @@ -93,7 +93,7 @@ class RefCountedPersistent : public ScopedPersistent, public: RefCountedPersistent() {} - explicit RefCountedPersistent(v8::Handle handle) + explicit RefCountedPersistent(v8::Handle handle) : ScopedPersistent(handle) { }