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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user