Backed out changeset 36c32cb1cbd3 (bug 1060179)

This commit is contained in:
Carsten "Tomcat" Book 2014-10-09 12:48:20 +02:00
parent e494cd1efa
commit 65c420ddac
6 changed files with 11 additions and 46 deletions

View File

@ -232,25 +232,16 @@ GMPChild::Init(const std::string& aPluginPath,
SendPCrashReporterConstructor(CrashReporter::CurrentThreadId());
#endif
#if defined(XP_MACOSX) && defined(MOZ_GMP_SANDBOX)
mPluginPath = aPluginPath;
return true;
}
#endif
bool
GMPChild::RecvSetNodeId(const nsCString& aNodeId)
{
// TODO: hash mNodeId with machine specific data.
mNodeId = std::string(aNodeId.BeginReading(), aNodeId.EndReading());
return true;
}
bool
GMPChild::RecvStartPlugin()
{
#if defined(MOZ_SANDBOX) && defined(XP_WIN)
mozilla::SandboxTarget::Instance()->StartSandbox();
#endif
return LoadPluginLibrary(mPluginPath);
return LoadPluginLibrary(aPluginPath);
}
bool
@ -408,7 +399,7 @@ GMPChild::DeallocPGMPVideoDecoderChild(PGMPVideoDecoderChild* aActor)
PGMPDecryptorChild*
GMPChild::AllocPGMPDecryptorChild()
{
GMPDecryptorChild* actor = new GMPDecryptorChild(this, mNodeId);
GMPDecryptorChild* actor = new GMPDecryptorChild(this);
actor->AddRef();
return actor;
}

View File

@ -47,10 +47,6 @@ public:
void ShutdownComplete() MOZ_OVERRIDE;
private:
virtual bool RecvSetNodeId(const nsCString& aNodeId) MOZ_OVERRIDE;
virtual bool RecvStartPlugin() MOZ_OVERRIDE;
virtual PCrashReporterChild* AllocPCrashReporterChild(const NativeThreadId& aThread) MOZ_OVERRIDE;
virtual bool DeallocPCrashReporterChild(PCrashReporterChild*) MOZ_OVERRIDE;
@ -89,11 +85,10 @@ private:
PRLibrary* mLib;
GMPGetAPIFunc mGetAPIFunc;
MessageLoop* mGMPMessageLoop;
std::string mPluginPath;
#if defined(XP_MACOSX) && defined(MOZ_GMP_SANDBOX)
std::string mPluginPath;
nsCString mPluginBinaryPath;
#endif
std::string mNodeId;
};
} // namespace gmp

View File

@ -26,10 +26,9 @@
namespace mozilla {
namespace gmp {
GMPDecryptorChild::GMPDecryptorChild(GMPChild* aPlugin, const std::string& aNodeId)
GMPDecryptorChild::GMPDecryptorChild(GMPChild* aPlugin)
: mSession(nullptr)
, mPlugin(aPlugin)
, mNodeId(aNodeId)
{
MOZ_ASSERT(mPlugin);
}
@ -177,8 +176,9 @@ void
GMPDecryptorChild::GetNodeId(const char** aOutNodeId,
uint32_t* aOutNodeIdLength)
{
*aOutNodeId = mNodeId.c_str();
*aOutNodeIdLength = mNodeId.size();
static const char* id = "placeholder_node_id";
*aOutNodeId = id;
*aOutNodeIdLength = strlen(id);
}
void

View File

@ -10,7 +10,6 @@
#include "gmp-decryption.h"
#include "mozilla/gmp/GMPTypes.h"
#include "GMPEncryptedBufferDataImpl.h"
#include <string>
namespace mozilla {
namespace gmp {
@ -24,7 +23,7 @@ class GMPDecryptorChild : public GMPDecryptorCallback
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPDecryptorChild);
explicit GMPDecryptorChild(GMPChild* aPlugin, const std::string& aNodeId);
explicit GMPDecryptorChild(GMPChild* aPlugin);
void Init(GMPDecryptor* aSession);
@ -123,8 +122,6 @@ private:
// Only call into this on the (GMP process) main thread.
GMPDecryptor* mSession;
GMPChild* mPlugin;
const std::string mNodeId;
};
} // namespace gmp

View File

@ -150,22 +150,6 @@ GMPParent::LoadProcess()
return NS_ERROR_FAILURE;
}
LOGD(("%s::%s: Created new process %p", __CLASS__, __FUNCTION__, (void *)mProcess));
bool ok = SendSetNodeId(mNodeId);
if (!ok) {
mProcess->Delete();
mProcess = nullptr;
return NS_ERROR_FAILURE;
}
LOGD(("%s::%s: Failed to send node id %p", __CLASS__, __FUNCTION__, (void *)mProcess));
ok = SendStartPlugin();
if (!ok) {
mProcess->Delete();
mProcess = nullptr;
return NS_ERROR_FAILURE;
}
LOGD(("%s::%s: Failed to send start %p", __CLASS__, __FUNCTION__, (void *)mProcess));
}
mState = GMPStateLoaded;

View File

@ -40,8 +40,6 @@ child:
async PGMPVideoDecoder();
async PGMPVideoEncoder();
async SetNodeId(nsCString nodeId);
async StartPlugin();
async BeginAsyncShutdown();
async CrashPluginNow();
};