MCPcopy Create free account
hub / github.com/GNOME/gjs / create

Method create

gi/function.cpp:667–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667GjsCallbackTrampoline* GjsCallbackTrampoline::create(
668 JSContext* cx, JS::HandleObject callable,
669 const GI::CallableInfo& callable_info, GIScopeType scope,
670 bool has_scope_object, bool is_vfunc) {
671 g_assert(JS::IsCallable(callable) &&
672 "tried to create a callback trampoline for a non-callable object");
673
674 auto* trampoline = new GjsCallbackTrampoline(
675 cx, callable, callable_info, scope, has_scope_object, is_vfunc);
676
677 if (!trampoline->initialize()) {
678 g_closure_unref(trampoline);
679 return nullptr;
680 }
681
682 return trampoline;
683}
684
685decltype(GjsCallbackTrampoline::s_forever_closure_list)
686 GjsCallbackTrampoline::s_forever_closure_list;

Callers

nothing calls this directly

Calls 3

gjs_debugFunction · 0.85
initializeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected