After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 321254 - don't use nsCOMPtr in the plugin
don't use nsCOMPtr in the plugin
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
unspecified
Other Linux
: High critical
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-11-11 20:00 UTC by Christian Persch
Modified: 2005-11-11 22:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (4.57 KB, patch)
2005-11-11 20:01 UTC, Christian Persch
committed Details | Review

Description Christian Persch 2005-11-11 20:00:13 UTC
I know I wrote that code myself :) but it's causing me problems: take a totem
plugin compiled against a non-debug xpcom version, and run it in a browser debug
build -> crash:

  • #1 nsCOMPtr_base::assign_assuming_AddRef
    at nsCOMPtr.h line 531
  • #2 nsCOMPtr_base::begin_assignment
    at nsCOMPtr.cpp line 158
  • #3 totem_plugin_new_instance
    at nsCOMPtr.h line 763


I think it has something to do with the different layout of nsCOMPtr in debug
vs. non-debug builds, but I'm no C++ expert. Anyway, the attached patch fixes
the problem for me.
Comment 1 Christian Persch 2005-11-11 20:01:00 UTC
Created attachment 54651 [details] [review]
fix
Comment 2 Bastien Nocera 2005-11-11 21:50:36 UTC
You break it, you fix it ;)
Please commit to HEAD and gnome-2-12, thanks.
Comment 3 Christian Persch 2005-11-11 22:29:45 UTC
2005-11-11  Christian Persch  <chpe@cvs.gnome.org>

        * src/totem-mozilla-plugin.cpp: Don't use nsCOMPtr in the plugin.
        Fixes crash when running a normal plugin in a browser debug build,
        bug #321254.