| 665 | } |
| 666 | |
| 667 | GjsCallbackTrampoline* 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 | |
| 685 | decltype(GjsCallbackTrampoline::s_forever_closure_list) |
| 686 | GjsCallbackTrampoline::s_forever_closure_list; |
nothing calls this directly
no test coverage detected