diff --git a/IcedTeaPlugin.cc b/IcedTeaPlugin.cc index a88cb6c..7acb7dc 100644 --- a/IcedTeaPlugin.cc +++ b/IcedTeaPlugin.cc @@ -3824,6 +3824,8 @@ void IcedTeaPluginFactory::IcedTeaPluginFactory::WriteToJVM(nsCString& message) */ +#include + nsresult IcedTeaPluginFactory::StartAppletviewer () { @@ -3845,9 +3847,15 @@ IcedTeaPluginFactory::StartAppletviewer () result = file->InitWithNativePath (nsCString (appletviewer_executable)); PLUGIN_CHECK_RETURN ("init with path", result); + // run-time query provided through nsIInterfaceInfoManager + nsCOMPtr iim(do_GetService(NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID)); + // get the run-time IID of nsIProcess (don't rely on a the build-time IID) + nsIID *nsIProcessIID; + iim->GetIIDForName("nsIProcess", &nsIProcessIID); + result = manager->CreateInstanceByContractID (NS_PROCESS_CONTRACTID, nsnull, - NS_GET_IID (nsIProcess), + *nsIProcessIID, getter_AddRefs (applet_viewer_process)); PLUGIN_CHECK_RETURN ("create process", result);