Skip to content

Commit

Permalink
fmtstream_v8 - fast streamers treated so they stream values only from…
Browse files Browse the repository at this point in the history
… bool, number, uint v8 values and throw error otherwise (array, object ....)
  • Loading branch information
cyrilgramblicka committed Jul 3, 2024
1 parent 62bd6fe commit 8e4949b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metastream/fmtstream_v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ template<> class to_v8<T> { public: \
}; \
template<> class from_v8<T> { public: \
static bool write( v8::Handle<v8::Value> src, T& res ) {\
if(src->IsArray() || src->IsObject() || src->IsUndefined() || src->IsNull() || src->IsFunction())\
{\
return false;\
}\
auto mv = src->V8T##Value(v8::Isolate::GetCurrent()->GetCurrentContext()); \
if (mv.IsJust()) res = (T)mv.FromJust(); \
return mv.IsJust(); } \
Expand Down

0 comments on commit 8e4949b

Please sign in to comment.