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

--HG--
rename : dom/plugins/PluginScriptableObjectUtils.cpp => dom/plugins/PluginScriptableObjectUtils-inl.h
extra : transplant_source : %18%D0%7BP%40v%CF%89%9B%D3%27i%B9%E3d%A4%ACgf%3F
This commit is contained in:
Benjamin Smedberg 2010-01-15 16:52:13 -05:00
Родитель 72d3d4469d
Коммит e2682137c3
3 изменённых файлов: 8 добавлений и 28 удалений

Просмотреть файл

@ -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 \

Просмотреть файл

@ -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 */

Просмотреть файл

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