I'm seeing these problems on SUNWspro 4.2, but most likely other commercial C++ compilers are breaking the same way. A patch is attached; the first bit for nsDragService.h adds "static" to the method which is passed to GTK as a callback. The second bit for nsGtkEventHandler.cpp essentially backs out pavlov's latest changes, as NS_STATIC_CAST was causing problems when NS_RELEASE tried to assign the resulting casted pointer a zero value. The casted pointer is not an lvalue, as even g++ will admit if you pass it "-pedantic".
reassigning to me. this patch works. my compiler was getting confused about which addref and release to use so i added the static casts, but it no longer seems to be confused... so i'm confused.. heh but other than that, the patch looks good. emailing chofmann to see if i can check it in.
checked in patch
firstname.lastname@example.org please verify, thanks
Fix is in, SUNWspro is happy.