| 321 | } |
| 322 | |
| 323 | void makeGlobal(const std::string& name) override { |
| 324 | auto& isolate = m_engine.get<V8Engine>()->m_isolate; |
| 325 | auto context = m_engine.get<V8Engine>()->context(); |
| 326 | Check(context->Global()->Set(context, |
| 327 | ToLocal(v8::String::NewFromUtf8(isolate, name.c_str())), |
| 328 | makeLocal())); |
| 329 | } |
| 330 | }; |
| 331 | |
| 332 | static v8::Local<v8::Value> returnValue(v8::Isolate* isolate, const Value& value) { |