Closed Bug 332115 Opened 19 years ago Closed 19 years ago

A bunch of symbol-visibility fixups that stuart needs to review in cairo and libpr0n

Categories

(Core Graveyard :: GFX, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

Attachments

(1 file, 3 obsolete files)

This is a catchall patch for a bunch of symbols which are currently exported from a variety of libpr0n and cairo libs that shuoldn't be exported when we're building libxul.
Attachment #216642 - Flags: superreview?(darin)
Attachment #216642 - Flags: review?
Attachment #216642 - Flags: review? → review?(pavlov)
Comment on attachment 216642 [details] [diff] [review] Fix cairo/libpr0n symbol visibility, rev. 1 >Index: gfx/cairo/cairo/src/cairo-platform.h >+#if defined(MOZ_ENABLE_LIBXUL) >+ >+#define cairo_public extern >+#define CCALLBACK >+#define CCALLBACK_DECL >+#define CSTATIC_CALLBACK(__x) static __x >+ >+#else >+ > #if defined(_MSC_VER) Seems to me that this could be #elif >Index: modules/libpr0n/decoders/icon/nsIconURI.cpp >+#include "stdlib.h" #include <stdlib.h> >+static void >+FillAtoms(AtomStruct* atoms, PRUint32 length) >+{ >+ nsCOMPtr<nsIAtomService> as(do_GetService(NS_ATOMSERVICE_CONTRACTID)); >+ if (!as) >+ return; >+ >+ while (length) { >+ --length; >+ as->GetPermanentAtom(NS_ConvertUTF8toUTF16(atoms[length].string).get(), >+ &atoms[length].atom); >+ } >+} Since atoms are internally stored as UTF-8, it seems like nsIAtomService should be updated to provide a fast-path for UTF-8 atom strings. >+ char* d = PR_smprintf("%d", mSize); >+ spec.Append(d); >+ PR_smprintf_free(d); For something like an integer conversion, PR_snprintf seems like it would be a fine/better choice. >+void extractAttributeValue(const char * searchString, const char * attributeName, nsCString& result) > { > //NS_ENSURE_ARG_POINTER(extractAttributeValue); > >- char * attributeValue = nsnull; >+ result.Truncate(); >+ > if (searchString && attributeName) > { Some indentation wierdness in this file. looks like it is using tabs. >+ result.Assign(nsDependentCString(startOfAttribute)); Why wrap startOfAttribute with nsDependentCString? That seems extraneous to me. >+ mDummyFilePath.Assign(nsDependentCString(path)); ditto >+ aFileExtension = NS_LITERAL_CSTRING("."); aFileExtension.Append('.');
Attachment #216642 - Flags: superreview?(darin) → superreview-
Depends on: 332135
Comment on attachment 216642 [details] [diff] [review] Fix cairo/libpr0n symbol visibility, rev. 1 what darin said
Attachment #216642 - Flags: review?(pavlov) → review-
Attachment #216642 - Attachment is obsolete: true
Attachment #218709 - Flags: review?(darin)
Comment on attachment 218709 [details] [diff] [review] Fix cairo/libpr0n symbol visibility, rev. 2 Assign(".") should be Assign('.') r=darin
Attachment #218709 - Flags: review?(darin) → review+
Attachment #218709 - Attachment is obsolete: true
Attachment #218717 - Flags: superreview?
Attachment #218717 - Flags: superreview? → superreview?(pavlov)
IMPL_THEBES never seems to get defined by the patch; is it supposed to be auto-defined by some build system bits? Trying to build with this I get a bunch of: c:/proj/mozilla-cvs/firefox-cairo/gfx/thebes/src/../../../../mozilla/gfx/thebes/src/gfxWindowsPlatform.cpp(43) : warning C4273: 'mFontList' : inconsistent dll linkage c:\proj\mozilla-cvs\firefox-cairo\dist\include\thebes\gfxWindowsPlatform.h(74) : see previous definition of 'private: static nsStringArray * gfxWindowsPlatform::mFontList' c:/proj/mozilla-cvs/firefox-cairo/gfx/thebes/src/../../../../mozilla/gfx/thebes/src/gfxWindowsPlatform.cpp(59) : warning C4273: 'gfxWindowsPlatform::Init' : inconsistent dll linkage c:\proj\mozilla-cvs\firefox-cairo\dist\include\thebes\gfxWindowsPlatform.h(68) : see previous definition of 'Init' type errors. Adding a DEFINES += -DIMPL_THEBES to gfx/thebes/src/Makefile.in seemes to have fixed it; is this the correct fix?
Also (VC8): c:/proj/mozilla-cvs/firefox-cairo/modules/libpr0n/decoders/icon/../../../../../mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp(230) : error C2440: 'initializing' : cannot convert from 'const char *' to 'char *' Conversion loses qualifiers c:/proj/mozilla-cvs/firefox-cairo/modules/libpr0n/decoders/icon/../../../../../mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp(231) : error C2440: 'initializing' : cannot convert from 'const char *' to 'char *' Conversion loses qualifiers Declaring both variables to be |const char *| instead of |char *| fixes that.
Yeah, I added DEFINES += -DIMPL_THEBES to the makefile, and I'll fix the const issues if they are still a problem in my tree.
Attachment #218717 - Attachment is obsolete: true
Attachment #219934 - Flags: review?(vladimir)
Attachment #218717 - Flags: superreview?(pavlov)
Comment on attachment 219934 [details] [diff] [review] Fix cairo/libpr0n symbol visibility, rev. 2.2 This builds and works fine for me on windows, but I can't vouch for the nsIconURI/nsIconChannel changes -- they look fine to me, but I'm not an expert in that area.
Attachment #219934 - Flags: review?(vladimir) → review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: