MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / makeGlobal

Method makeGlobal

src/script/v8/engine.cpp:323–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
332static v8::Local<v8::Value> returnValue(v8::Isolate* isolate, const Value& value) {

Callers

nothing calls this directly

Calls 3

CheckFunction · 0.85
ToLocalFunction · 0.85
contextMethod · 0.45

Tested by

no test coverage detected