component-loader: make wp_core_load_component_finish() return a boolean

There is no reason to return the component object... all components
are supposed to be long-lived objects that are referenced by the
registry and there is API to find them. The caller is only interested
in the success or failure of the operation.
This commit is contained in:
George Kiagiadakis
2023-05-28 21:07:15 +03:00
parent 7fdbf7ff50
commit 55fc845098
13 changed files with 36 additions and 48 deletions

View File

@@ -62,11 +62,9 @@ static void
on_plugin_loaded (WpCore * core, GAsyncResult * res,
WpRequireApiTransition *self)
{
g_autoptr (GObject) o = NULL;
GError *error = NULL;
o = wp_core_load_component_finish (core, res, &error);
if (!o) {
if (!wp_core_load_component_finish (core, res, &error)) {
wp_transition_return_error (WP_TRANSITION (self), error);
return;
}