Bug 521377 build-bustage followup: make template instantiations available inline, r=bent

--HG--
rename : dom/plugins/PluginScriptableObjectUtils.cpp => dom/plugins/PluginScriptableObjectUtils-inl.h
This commit is contained in:
Benjamin Smedberg 2010-01-15 16:52:13 -05:00
parent 37ff4409a5
commit 758ab615e5
3 changed files with 8 additions and 28 deletions

View File

@ -70,6 +70,7 @@ EXPORTS_mozilla/plugins = \
PluginScriptableObjectChild.h \
PluginScriptableObjectParent.h \
PluginScriptableObjectUtils.h \
PluginScriptableObjectUtils-inl.h \
PluginInstanceChild.h \
PluginInstanceParent.h \
AStream.h \
@ -100,7 +101,6 @@ CPPSRCS = \
PluginProcessParent.cpp \
PluginScriptableObjectChild.cpp \
PluginScriptableObjectParent.cpp \
PluginScriptableObjectUtils.cpp \
BrowserStreamChild.cpp \
BrowserStreamParent.cpp \
PluginStreamChild.cpp \

View File

@ -39,30 +39,28 @@
#include "PluginScriptableObjectUtils.h"
using namespace mozilla::plugins;
namespace {
template<class InstanceType>
class VariantTraits;
template<>
class VariantTraits<PluginInstanceParent>
class VariantTraits<mozilla::plugins::PluginInstanceParent>
{
public:
typedef PluginScriptableObjectParent ScriptableObjectType;
typedef mozilla::plugins::PluginScriptableObjectParent ScriptableObjectType;
};
template<>
class VariantTraits<PluginInstanceChild>
class VariantTraits<mozilla::plugins::PluginInstanceChild>
{
public:
typedef PluginScriptableObjectChild ScriptableObjectType;
typedef mozilla::plugins::PluginScriptableObjectChild ScriptableObjectType;
};
} /* anonymous namespace */
bool
inline bool
mozilla::plugins::ConvertToVariant(const Variant& aRemoteVariant,
NPVariant& aVariant,
PluginInstanceParent* aInstance)
@ -195,23 +193,3 @@ mozilla::plugins::ConvertToRemoteVariant(const NPVariant& aVariant,
return true;
}
namespace {
// This function only exists to get both flavors of the ConvertToRemoteVariant
// function instantiated and should never be called.
void
XXXNeverCalled()
{
NS_NOTREACHED("This should never be called!");
PluginInstanceParent* parent = nsnull;
PluginInstanceChild* child = nsnull;
NPVariant variant;
VOID_TO_NPVARIANT(variant);
Variant remoteVariant;
ConvertToRemoteVariant(variant, remoteVariant, parent, false);
ConvertToRemoteVariant(variant, remoteVariant, child, false);
}
} /* anonymous namespace */

View File

@ -314,4 +314,6 @@ struct ProtectedActorTraits<PluginScriptableObjectChild>
} /* namespace plugins */
} /* namespace mozilla */
#include "PluginScriptableObjectUtils-inl.h"
#endif /* dom_plugins_PluginScriptableObjectUtils_h */