Back out bug 653083 because of crashtest crashes (bug698862.html) in PluginInstanceParent::GetNPP for a crashed plugin
This commit is contained in:
@@ -73,7 +73,6 @@ using mozilla::ipc::SyncChannel;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::plugins;
|
||||
using namespace mozilla::plugins::parent;
|
||||
|
||||
static const char kTimeoutPref[] = "dom.ipc.plugins.timeoutSecs";
|
||||
static const char kLaunchTimeoutPref[] = "dom.ipc.plugins.processLaunchTimeoutSecs";
|
||||
@@ -342,14 +341,8 @@ PluginModuleParent::NotifyPluginCrashed()
|
||||
|
||||
PPluginIdentifierParent*
|
||||
PluginModuleParent::AllocPPluginIdentifier(const nsCString& aString,
|
||||
const int32_t& aInt,
|
||||
const bool& aTemporary)
|
||||
const int32_t& aInt)
|
||||
{
|
||||
if (aTemporary) {
|
||||
NS_ERROR("Plugins don't create temporary identifiers.");
|
||||
return NULL; // should abort the plugin
|
||||
}
|
||||
|
||||
NPIdentifier npident = aString.IsVoid() ?
|
||||
mozilla::plugins::parent::_getintidentifier(aInt) :
|
||||
mozilla::plugins::parent::_getstringidentifier(aString.get());
|
||||
@@ -359,7 +352,7 @@ PluginModuleParent::AllocPPluginIdentifier(const nsCString& aString,
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
PluginIdentifierParent* ident = new PluginIdentifierParent(npident, false);
|
||||
PluginIdentifierParent* ident = new PluginIdentifierParent(npident);
|
||||
mIdentifiers.Put(npident, ident);
|
||||
return ident;
|
||||
}
|
||||
@@ -606,39 +599,29 @@ PluginModuleParent::AnswerNPN_UserAgent(nsCString* userAgent)
|
||||
return true;
|
||||
}
|
||||
|
||||
PluginIdentifierParent*
|
||||
PluginModuleParent::GetIdentifierForNPIdentifier(NPP npp, NPIdentifier aIdentifier)
|
||||
PPluginIdentifierParent*
|
||||
PluginModuleParent::GetIdentifierForNPIdentifier(NPIdentifier aIdentifier)
|
||||
{
|
||||
PluginIdentifierParent* ident;
|
||||
if (mIdentifiers.Get(aIdentifier, &ident)) {
|
||||
if (ident->IsTemporary()) {
|
||||
ident->AddTemporaryRef();
|
||||
if (!mIdentifiers.Get(aIdentifier, &ident)) {
|
||||
nsCString string;
|
||||
int32_t intval = -1;
|
||||
if (mozilla::plugins::parent::_identifierisstring(aIdentifier)) {
|
||||
NPUTF8* chars =
|
||||
mozilla::plugins::parent::_utf8fromidentifier(aIdentifier);
|
||||
if (!chars) {
|
||||
return nsnull;
|
||||
}
|
||||
string.Adopt(chars);
|
||||
}
|
||||
return ident;
|
||||
}
|
||||
|
||||
nsCString string;
|
||||
int32_t intval = -1;
|
||||
bool temporary = false;
|
||||
if (mozilla::plugins::parent::_identifierisstring(aIdentifier)) {
|
||||
NPUTF8* chars =
|
||||
mozilla::plugins::parent::_utf8fromidentifier(aIdentifier);
|
||||
if (!chars) {
|
||||
else {
|
||||
intval = mozilla::plugins::parent::_intfromidentifier(aIdentifier);
|
||||
string.SetIsVoid(PR_TRUE);
|
||||
}
|
||||
ident = new PluginIdentifierParent(aIdentifier);
|
||||
if (!SendPPluginIdentifierConstructor(ident, string, intval))
|
||||
return nsnull;
|
||||
}
|
||||
string.Adopt(chars);
|
||||
temporary = !NPStringIdentifierIsPermanent(npp, aIdentifier);
|
||||
}
|
||||
else {
|
||||
intval = mozilla::plugins::parent::_intfromidentifier(aIdentifier);
|
||||
string.SetIsVoid(PR_TRUE);
|
||||
}
|
||||
|
||||
ident = new PluginIdentifierParent(aIdentifier, temporary);
|
||||
if (!SendPPluginIdentifierConstructor(ident, string, intval, temporary))
|
||||
return nsnull;
|
||||
|
||||
if (!temporary) {
|
||||
mIdentifiers.Put(aIdentifier, ident);
|
||||
}
|
||||
return ident;
|
||||
|
||||
Reference in New Issue
Block a user