Closed
Bug 278390
Opened 20 years ago
Closed 20 years ago
1.8a6 compile error on HPUX
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bertramf, Assigned: bertramf)
Details
Attachments
(1 file)
953 bytes,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
dom/src/base/nsDOMWindowUtils.cpp does not compile on HPUX (aCC): After changing line 104 from nsCOMPtr<nsIDocument> doc(do_QueryInterface(mWindow->mDocument)); to nsCOMPtr<nsIDocument> doc(do_QueryInterface(mWindow->GetExtantDocument())); it all builds successfully. I don't understand C++ well enough to decide if it's an HP Compiler bug to not allow access to protected members. But if the other platforms compile well ...
Assignee | ||
Comment 1•20 years ago
|
||
... forgot to include the actual build error. Here it is. nsDOMWindowUtils.cpp Building deps for nsDOMWindowUtils.cpp /opt/aCC/bin/aCC -o nsDOMWindowUtils.o -c -D_IMPL_NS_LAYOUT -DOSTYPE=\"HP-UXB.11\" -DOSARCH=\"HP-UX\" -I./../events -I../../../dist/include/xpcom -I../../../dist/include/string -I../../../dist/include/webbrwsr -I../../../dist/include/commandhandler -I../../../dist/include/js -I../../../dist/include/widget -I../../../dist/include/gfx -I../../../dist/include/layout -I../../../dist/include/content -I../../../dist/include/caps -I../../../dist/include/docshell -I../../../dist/include/xpconnect -I../../../dist/include/pref -I../../../dist/include/oji -I../../../dist/include/necko -I../../../dist/include/mimetype -I../../../dist/include/java -I../../../dist/include/locale -I../../../dist/include/uriloader -I../../../dist/include/xuldoc -I../../../dist/include/webshell -I../../../dist/include/view -I../../../dist/include/uconv -I../../../dist/include/shistory -I../../../dist/include/plugin -I../../../dist/include/windowwatcher -I../../../dist/include/chardet -I../../../dist/include/find -I../../../dist/include/appshell -I../../../dist/include/intl -I../../../dist/include/unicharutil -I../../../dist/include/rdf -I../../../dist/include/xultmpl -I../../../dist/include/jar -I../../../dist/include/dom -I../../../dist/include -I/home/bertram/mozilla1.8a6/dist/include/nspr +Z -Wc,-ansi_for_scope,on -DNDEBUG -DTRIMMED -O -DMOZILLA_VERSION=\"1.8a6\" -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DMOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP=1 -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_BYTEORDER_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_LIBM=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_DEFAULT_TOOLKIT=\"gtk\" -DMOZ_WIDGET_GTK=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_X11=1 -DMOZ_BUILD_APP=suite -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DMOZ_ENABLE_COREXFONTS=1 -DMOZ_EXTRA_X11CONVERTERS=1 -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DMOZ_XTF=1 -DMOZ_MATHML=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_XUL=1 -DMOZ_PROFILESHARING=1 -DMOZ_PROFILELOCKING=1 -DMOZ_DLL_SUFFIX=\".sl\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_LOCALE_VERSION=\"1.8a6\" -DMOZILLA_REGION_VERSION=\"1.8a6\" -DMOZILLA_SKIN_VERSION=\"1.5\" -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT nsDOMWindowUtils.cpp Warning 749: "../../../dist/include/xpcom/xptinfo.h", line 258 # The cast from 'const XPTConstValue *' to 'nsXPTCMiniVariant *' is performed as a 'reinterpret_cast'. This operation is non-portable and potentially unsafe. {return (nsXPTCMiniVariant*) &value;} ^^^^^^^^^^^^^^^^^^^^ Warning 740: "../../../dist/include/xpcom/xptinfo.h", line 258 # Unsafe cast between pointers/references to incomplete classes: casting 'const XPTConstValue *' to 'nsXPTCMiniVariant *'. {return (nsXPTCMiniVariant*) &value;} ^ Warning 182: "../../../dist/include/xpcom/nsCOMPtr.h", line 187 # "nsDerivedSafe<nsPresContext>::~nsDerivedSafe()" cannot access private member "nsPresContext::~nsPresContext()". class nsDerivedSafe : public T ^^^^^^^^^^^^^^^^^^^ Error 182: "nsDOMWindowUtils.cpp", line 104 # "unsigned int nsDOMWindowUtils::GetDocumentMetadata(const nsAString &,nsAString &)" cannot access protected member "nsCOMPtr<nsIDOMDocument> nsPIDOMWindow::mDocument". nsCOMPtr<nsIDocument> doc(do_QueryInterface(mWindow->mDocument)); ^^^^^^^^^ gmake[5]: *** [nsDOMWindowUtils.o] Error 2
Updated•20 years ago
|
Assignee: nobody → general
Component: Build Config → DOM
Product: Mozilla Application Suite → Core
QA Contact: build-config → ian
Comment 2•20 years ago
|
||
Is this just a compiler bug? nsGlobalWindow.h clearly says "friend class nsDOMWindowUtils;", so we should be able to access protected members here... I guess using GetExtantDocument should be ok, though. jst?
Updated•20 years ago
|
Flags: blocking1.8b?
Comment 3•20 years ago
|
||
Yeah, sounds reasonable to me.
Comment 4•20 years ago
|
||
Attachment #172489 -
Flags: superreview?(jst)
Attachment #172489 -
Flags: review?(jst)
Comment 5•20 years ago
|
||
Comment on attachment 172489 [details] [diff] [review] Patch per comment 0 r+sr=jst
Attachment #172489 -
Flags: superreview?(jst)
Attachment #172489 -
Flags: superreview+
Attachment #172489 -
Flags: review?(jst)
Attachment #172489 -
Flags: review+
Updated•20 years ago
|
Assignee: general → bertramf
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•20 years ago
|
||
Fix checked in. Bertram Franz, thanks for the patch idea!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking1.8b?
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•