Fix incorrect parameter used for self object (flutter/engine#22135)
Fix incorrect parameter used for self object Rename the GWeakNotify function parameters. This matches the prototype and makes it harder to accidentally use the object parameter the wrong way.
This commit is contained in:
@@ -100,7 +100,8 @@ static void platform_message_handler_free(gpointer data) {
|
||||
g_free(self);
|
||||
}
|
||||
|
||||
static void engine_weak_notify_cb(gpointer user_data, GObject* object) {
|
||||
static void engine_weak_notify_cb(gpointer user_data,
|
||||
GObject* where_the_object_was) {
|
||||
FlBinaryMessenger* self = FL_BINARY_MESSENGER(user_data);
|
||||
self->engine = nullptr;
|
||||
|
||||
|
||||
@@ -152,7 +152,8 @@ static gboolean flutter_source_dispatch(GSource* source,
|
||||
}
|
||||
|
||||
// Called when the engine is disposed.
|
||||
static void engine_weak_notify_cb(gpointer user_data, GObject* object) {
|
||||
static void engine_weak_notify_cb(gpointer user_data,
|
||||
GObject* where_the_object_was) {
|
||||
FlutterSource* source = reinterpret_cast<FlutterSource*>(user_data);
|
||||
source->engine = nullptr;
|
||||
g_source_destroy(reinterpret_cast<GSource*>(source));
|
||||
|
||||
@@ -140,8 +140,9 @@ static void method_call_cb(FlMethodChannel* channel,
|
||||
}
|
||||
}
|
||||
|
||||
static void view_weak_notify_cb(gpointer user_data, GObject* object) {
|
||||
FlMouseCursorPlugin* self = FL_MOUSE_CURSOR_PLUGIN(object);
|
||||
static void view_weak_notify_cb(gpointer user_data,
|
||||
GObject* where_the_object_was) {
|
||||
FlMouseCursorPlugin* self = FL_MOUSE_CURSOR_PLUGIN(user_data);
|
||||
self->view = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ G_MODULE_EXPORT GType fl_plugin_registrar_get_type();
|
||||
|
||||
G_DEFINE_TYPE(FlPluginRegistrar, fl_plugin_registrar, G_TYPE_OBJECT)
|
||||
|
||||
static void view_weak_notify_cb(gpointer user_data, GObject* object) {
|
||||
static void view_weak_notify_cb(gpointer user_data,
|
||||
GObject* where_the_object_was) {
|
||||
FlPluginRegistrar* self = FL_PLUGIN_REGISTRAR(user_data);
|
||||
self->view = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user