Closed Bug 205013 Opened 21 years ago Closed 21 years ago

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

Categories

(SeaMonkey :: Build Config, defect)

DEC
OpenVMS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: colin, Assigned: colin)

Details

Attachments

(1 file)

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
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.
Taking.
Assignee: mozbugs-build → colin
OS: All → OpenVMS
Hardware: All → DEC
Attached patch Fix debug buildSplinter Review
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????
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?
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 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+
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: