Bug 1136379. Clean up the nsPluginHost API a bit. r=bzbarsky
This commit is contained in:
@@ -277,7 +277,7 @@ nsNPAPIPluginInstance::StopTime()
|
||||
return mStopTime;
|
||||
}
|
||||
|
||||
nsresult nsNPAPIPluginInstance::Initialize(nsNPAPIPlugin *aPlugin, nsPluginInstanceOwner* aOwner, const char* aMIMEType)
|
||||
nsresult nsNPAPIPluginInstance::Initialize(nsNPAPIPlugin *aPlugin, nsPluginInstanceOwner* aOwner, const nsACString& aMIMEType)
|
||||
{
|
||||
PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("nsNPAPIPluginInstance::Initialize this=%p\n",this));
|
||||
|
||||
@@ -287,11 +287,8 @@ nsresult nsNPAPIPluginInstance::Initialize(nsNPAPIPlugin *aPlugin, nsPluginInsta
|
||||
mPlugin = aPlugin;
|
||||
mOwner = aOwner;
|
||||
|
||||
if (aMIMEType) {
|
||||
mMIMEType = (char*)PR_Malloc(strlen(aMIMEType) + 1);
|
||||
if (mMIMEType) {
|
||||
PL_strcpy(mMIMEType, aMIMEType);
|
||||
}
|
||||
if (!aMIMEType.IsEmpty()) {
|
||||
mMIMEType = ToNewCString(aMIMEType);
|
||||
}
|
||||
|
||||
return Start();
|
||||
|
||||
Reference in New Issue
Block a user