~nsCOMPtr_base(), used by Java plugin code, not present in debug builds

RESOLVED FIXED

Status

SeaMonkey
Build Config
RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: Colin Blake, Assigned: Colin Blake)

Tracking

Trunk
DEC
OpenVMS

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
In a debug build, NSCAP_FEATURE_DEBUG_PTR_TYPES gets defined
(http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsCOMPtr.h#96) and this
causes NSCAP_FEATURE_FACTOR_DESTRUCTOR to get undefined
(http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsCOMPtr.h#115) which in
turn causes nsCOMPtr_base::~nsCOMPtr_base() to NOT get defined
(http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsCOMPtr.cpp#60.

There is a reference to nsCOMPtr_base::~nsCOMPtr_base() in the Java plugin code.
For the past two years this has caused an "error" in my debug builds which I've
just ignored. I'd really like to fix this issue, but the question is how? I 
don't understand why the destructor is not present in debug builds. What should
the Java plugin code be calling instead?

Can someone explain this code
(http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsCOMPtr.h#409)

#ifdef NSCAP_FEATURE_FACTOR_DESTRUCTOR
      NS_COM ~nsCOMPtr_base();
#else
      // Allow debug builds to link with optimized versions of nsCOMPtr-using
      // plugins (e.g., JVMs).
      NS_COM ~nsCOMPtr_base() { }
#endif
(Assignee)

Comment 1

15 years ago
Turns out that nsCOMPtr_base::~nsCOMPtr_base was referenced by the Java 1.3
plugin, but is NOT referenced by the 1.4 plugin. In addition, the Java 1.3
plugin was only ever built and released in non-debug form. So it looks like I
don't need to find nsCOMPtr_base::~nsCOMPtr_base in the debug build. But I do
still need a solution for this build issue because nsCOMPtr_base::~nsCOMPtr_base
is listed in
http://lxr.mozilla.org/seamonkey/source/build/unix/vms/libxpcom_symvec.opt#13.
(Assignee)

Comment 2

15 years ago
Taking.
Assignee: mozbugs-build → colin
OS: All → OpenVMS
Hardware: All → DEC
(Assignee)

Comment 3

15 years ago
Created attachment 123179 [details] [diff] [review]
Fix debug build

Use a different version of the linker options file for debug builds, which
doesn't reference the missing symbol.

New file in VMS specific directory, and a change in the VMS specific part of
rules.mk. Low risk, would like to check in to 1.4.

a=seawood????
(Assignee)

Comment 4

15 years ago
Comment on attachment 123179 [details] [diff] [review]
Fix debug build

OK, seawood's away. Can I get an r=dveditz and then go straight to drivers for
the a=?
Attachment #123179 - Flags: review?(dveditz)
Comment on attachment 123179 [details] [diff] [review]
Fix debug build

r=dveditz
For this safe VMS-only fix

Does this mean the bug has morphed? If this patch closes the bug please update
the summary to add VMS and remove Java
Attachment #123179 - Flags: review?(dveditz)
Attachment #123179 - Flags: review+
Attachment #123179 - Flags: approval1.4?
(Assignee)

Comment 6

15 years ago
The bug is that we try to make the symbol nsCOMPtr_base::~nsCOMPtr_base() global
(because the Java 1.3 plugin code needs it), but in a debug build, this symbol
does not exist.

The bug has not morphed, and the summary makes sense to me. But if you find it
misleading, feel free to change it.

Comment 7

15 years ago
Comment on attachment 123179 [details] [diff] [review]
Fix debug build

a=asa (on behalf of drivers) for checkin to 1.4
Attachment #123179 - Flags: approval1.4? → approval1.4+
(Assignee)

Comment 8

15 years ago
Checked in to trunk.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.