Comment on attachment 445660
Patch 0.5, Monitor added, observers removed
>+ else
>+ if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
>+ PKG_CHECK_MODULES(MOZ_GNOMEVFS, gio-2.0 >= $GIO_VERSION [
>+ MOZ_GIO_LIBS=`echo $MOZ_GIO_LIBS | sed 's/-llinc\>//'`
>+ ])
>+ fi
This would need a comma after GIO_VERSION, I assume, and the first argument
would need to be MOZ_GIO, but this doesn't work anyway because MOZ_EXTENSIONS
is not yet set.
That means that the same test for MOZ_GNOMEVFS doesn't work either and so
I guess no one has used that.
Therefore feel free to just leave configure.in as is and --enable-gio will be needed to build the gio extension.
GTK is no longer used. I expect gio/gio.h would be sufficient.
>+ mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
>+ /* Waiting for finish of mount operation thread */
>+ mon.Wait();
>+ g_warning("monitor done");
+ g_object_unref(mount_op);
The state of the mount operation should be checked before waiting in case the
operation already Notify/signals before this wait starts. Also
pthread_cond_wait() can wakeup spuriously, so the state should be checked on
return from Wait(). If G_MOUNT_OPERATION_IN_PROGRESS were a
GMountOperationResult this would normally look something like
while (mMountRes == G_MOUNT_OPERATION_IN_PROGRESS)
mon.Wait();
>+ * nsGIOInputStream. This function is called in main thread as async request
>+ * from dbus.
How about "main thread as an async request typically from dbus"?
IIUC, while gvfs is implemented using dbus, GIO need not necessarily use dbus, for other modules for example.
If G_ASK_PASSWORD_NEED_DOMAIN is requested, should the reply be
G_MOUNT_OPERATION_UNHANDLED?
Please remove the debugging g_warnings.
Ideally g_warnings would only be for cases where the code is misused
(and normally we use NS_ASSERTION for that).
Comment on attachment 445660
Patch 0.5, Monitor added, observers removed
>+ else MODULES( MOZ_GNOMEVFS, gio-2.0 >= $GIO_VERSION [
>+ if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
>+ PKG_CHECK_
>+ MOZ_GIO_LIBS=`echo $MOZ_GIO_LIBS | sed 's/-llinc\>//'`
>+ ])
>+ fi
This would need a comma after GIO_VERSION, I assume, and the first argument
would need to be MOZ_GIO, but this doesn't work anyway because MOZ_EXTENSIONS
is not yet set.
That means that the same test for MOZ_GNOMEVFS doesn't work either and so
I guess no one has used that.
Therefore feel free to just leave configure.in as is and --enable-gio will be needed to build the gio extension.
>+LOCAL_INCLUDES = $(MOZ_GTK2_CFLAGS) \
>+ $(MOZ_GIO_CFLAGS)
>+
>+EXTRA_DSO_LDOPTS = \ GLUE_LDOPTS) \
>+ $(XPCOM_
>+ $(NSPR_LIBS) \
>+ $(MOZ_GTK2_LIBS) \
>+ $(MOZ_GIO_LIBS) \
>+ $(NULL)
>+#include <gtk/gtk.h>
GTK is no longer used. I expect gio/gio.h would be sufficient.
>+ mozilla: :MonitorAutoEnt er mon(mMonitorMou ntInProgress) ; unref(mount_ op);
>+ /* Waiting for finish of mount operation thread */
>+ mon.Wait();
>+ g_warning("monitor done");
+ g_object_
The state of the mount operation should be checked before waiting in case the OPERATION_ IN_PROGRESS were a Result this would normally look something like
operation already Notify/signals before this wait starts. Also
pthread_cond_wait() can wakeup spuriously, so the state should be checked on
return from Wait(). If G_MOUNT_
GMountOperation
while (mMountRes == G_MOUNT_ OPERATION_ IN_PROGRESS)
mon.Wait();
>+ * nsGIOInputStream. This function is called in main thread as async request
>+ * from dbus.
How about "main thread as an async request typically from dbus"?
IIUC, while gvfs is implemented using dbus, GIO need not necessarily use dbus, for other modules for example.
If G_ASK_PASSWORD_ NEED_DOMAIN is requested, should the reply be OPERATION_ UNHANDLED?
G_MOUNT_
Please remove the debugging g_warnings.
Ideally g_warnings would only be for cases where the code is misused
(and normally we use NS_ASSERTION for that).