| 544 | } |
| 545 | |
| 546 | void resolve(JS::Value result) { |
| 547 | JS::RootedValueArray<1> args(cx); |
| 548 | args[0].set(result); |
| 549 | JS::RootedValue ignored_rval(cx); |
| 550 | bool ok GJS_USED_ASSERT = JS_CallFunction( |
| 551 | cx, /* this_obj = */ nullptr, resolver(), args, &ignored_rval); |
| 552 | g_assert(ok && "Failed resolving promise"); |
| 553 | } |
| 554 | }; |
| 555 | |
| 556 | static void load_async_callback(GObject* file, GAsyncResult* res, void* data) { |
no test coverage detected