| 267 | } |
| 268 | |
| 269 | void pushFunctions(v8::Local<v8::Object>& object) { |
| 270 | auto isolate = m_engine.get<V8Engine>()->m_isolate; |
| 271 | auto context = m_engine.get<V8Engine>()->context(); |
| 272 | for (auto& entry : functions) { |
| 273 | auto tpl = v8::FunctionTemplate::New(isolate, callFunc, v8::External::New(isolate, &entry.second)); |
| 274 | auto func = tpl->GetFunction(context).ToLocalChecked(); |
| 275 | Check(object->Set(context, |
| 276 | ToLocal(v8::String::NewFromUtf8(isolate, entry.first.c_str())), |
| 277 | func)); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | void pushProperties(v8::Local<v8::Object>& object) { |
| 282 | auto& isolate = m_engine.get<V8Engine>()->m_isolate; |