Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/vu8/Class.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class ClassSingleton
v8::Persistent<v8::FunctionTemplate> func_;

friend class detail::LazySingleton<self>;
friend class Class<T, Factory>;
friend class Singleton<T>;
friend struct Class<T, Factory>;
friend struct Singleton<T>;
};

// Interface for registering C++ classes with v8
Expand Down Expand Up @@ -248,7 +248,7 @@ struct Class {
}
Class() {}

friend class Singleton<T>;
friend struct Singleton<T>;
};

// Wrap a C++ singleton
Expand Down
6 changes: 5 additions & 1 deletion src/vu8/detail/FromV8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ struct FromV8<ValueHandle> : FromV8Base<ValueHandle> {
template <class T>
struct FromV8Ptr : FromV8Base<T> {
static inline T exec(ValueHandle value) {
if (! value->IsObject())
if (! value->IsObject()) {
if (value->IsNull()) {
return NULL;
}
throw std::runtime_error("expected object");
}

v8::Local<v8::Object> obj = value->ToObject();

Expand Down