fix more bustage related to nsresult-to-bool switch. committing initial (untested!) NPEvent forwarding caught in the crossfire

This commit is contained in:
Chris Jones
2009-09-18 20:19:11 -05:00
parent 10ebd37051
commit 99ef7cd149
11 changed files with 336 additions and 20 deletions

View File

@@ -136,8 +136,7 @@ PluginModuleParent::NP_Initialize(const NPNetscapeFuncs* npnIface,
_MOZ_LOG(__FUNCTION__);
NPError prv;
nsresult rv = CallNP_Initialize(&prv);
if (NS_OK != rv)
if (!CallNP_Initialize(&prv))
return NPERR_GENERIC_ERROR;
else if (NPERR_NO_ERROR != prv)
return prv;
@@ -152,9 +151,8 @@ PluginModuleParent::NP_Initialize(const NPNetscapeFuncs* npnIface)
_MOZ_LOG(__FUNCTION__);
NPError prv;
nsresult rv = CallNP_Initialize(&prv);
if (NS_FAILED(rv))
return rv;
if (!CallNP_Initialize(&prv))
return NP_ERR_GENERIC_ERROR;
return prv;
}
@@ -223,7 +221,7 @@ PluginModuleParent::NPP_Destroy(NPP instance,
static_cast<PluginInstanceParent*>(instance->pdata);
NPError prv;
if (Shim::HACK_target->CallPPluginInstanceDestructor(parentInstance, &prv)) {
if (!Shim::HACK_target->CallPPluginInstanceDestructor(parentInstance, &prv)) {
prv = NPERR_GENERIC_ERROR;
}
instance->pdata = nsnull;