Bug 951743 - Make JS_FRIEND_API always export symbols with default visibility, r=glandium

This commit is contained in:
Steve Fink 2014-01-14 13:20:24 -08:00
parent 55ffada3e3
commit e6f5e24081
3 changed files with 13 additions and 8 deletions

View File

@ -3435,7 +3435,7 @@ namespace JS {
* is protected anyway); instead, create instances only of the derived classes:
* CompileOptions and OwningCompileOptions.
*/
class JS_PUBLIC_API(ReadOnlyCompileOptions)
class JS_FRIEND_API(ReadOnlyCompileOptions)
{
protected:
JSPrincipals *principals_;
@ -3522,7 +3522,7 @@ class JS_PUBLIC_API(ReadOnlyCompileOptions)
* comes to refer to the object that owns this, then the whole cycle, and
* anything else it entrains, will never be freed.
*/
class JS_PUBLIC_API(OwningCompileOptions) : public ReadOnlyCompileOptions
class JS_FRIEND_API(OwningCompileOptions) : public ReadOnlyCompileOptions
{
JSRuntime *runtime;
PersistentRootedObject elementRoot;
@ -3583,7 +3583,7 @@ class JS_PUBLIC_API(OwningCompileOptions) : public ReadOnlyCompileOptions
* create an instance of this type, it's up to you to guarantee that
* everything you store in it will outlive it.
*/
class MOZ_STACK_CLASS JS_PUBLIC_API(CompileOptions) : public ReadOnlyCompileOptions
class MOZ_STACK_CLASS JS_FRIEND_API(CompileOptions) : public ReadOnlyCompileOptions
{
RootedObject elementRoot;
RootedString elementPropertyRoot;

View File

@ -34,9 +34,9 @@ class Rooted;
class JS_PUBLIC_API(AutoGCRooter);
class JS_PUBLIC_API(CompileOptions);
class JS_PUBLIC_API(ReadOnlyCompileOptions);
class JS_PUBLIC_API(OwningCompileOptions);
class JS_FRIEND_API(CompileOptions);
class JS_FRIEND_API(ReadOnlyCompileOptions);
class JS_FRIEND_API(OwningCompileOptions);
class JS_PUBLIC_API(CompartmentOptions);
struct Zone;

View File

@ -77,8 +77,13 @@
# define JS_PUBLIC_DATA(t) MOZ_IMPORT_DATA t
#endif
#define JS_FRIEND_API(t) JS_PUBLIC_API(t)
#define JS_FRIEND_DATA(t) JS_PUBLIC_DATA(t)
#if defined(STATIC_JS_API) || defined(EXPORT_JS_API) || defined(STATIC_EXPORTABLE_JS_API)
# define JS_FRIEND_API(t) MOZ_EXPORT t
# define JS_FRIEND_DATA(t) MOZ_EXPORT t
#else
# define JS_FRIEND_API(t) MOZ_IMPORT_API t
# define JS_FRIEND_DATA(t) MOZ_IMPORT_DATA t
#endif
#if defined(_MSC_VER) && defined(_M_IX86)
#define JS_FASTCALL __fastcall