Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsPluginHostImpl.cpp File Reference
#include "nscore.h"
#include "nsPluginHostImpl.h"
#include <stdio.h>
#include "prio.h"
#include "prmem.h"
#include "ns4xPlugin.h"
#include "ns4xPluginStreamListener.h"
#include "nsPluginInstancePeer.h"
#include "nsIPlugin.h"
#include "nsIPluginStreamListener.h"
#include "nsIHTTPHeaderListener.h"
#include "nsIHttpHeaderVisitor.h"
#include "nsIObserverService.h"
#include "nsIHttpProtocolHandler.h"
#include "nsIHttpChannel.h"
#include "nsIHttpChannelInternal.h"
#include "nsIUploadChannel.h"
#include "nsIByteRangeRequest.h"
#include "nsIStreamListener.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIURL.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsIProtocolProxyService.h"
#include "nsIStreamConverterService.h"
#include "nsIFile.h"
#include "nsIIOService.h"
#include "nsIChannel.h"
#include "nsISeekableStream.h"
#include "nsNetUtil.h"
#include "nsIProgressEventSink.h"
#include "nsIDocument.h"
#include "nsIScriptablePlugin.h"
#include "nsICachingChannel.h"
#include "nsHashtable.h"
#include "nsIProxyInfo.h"
#include "nsObsoleteModuleLoading.h"
#include "nsIComponentRegistrar.h"
#include "nsPluginLogging.h"
#include "nsPrintfCString.h"
#include "nsEnumeratorUtils.h"
#include "nsXPCOM.h"
#include "nsXPCOMCID.h"
#include "nsICategoryManager.h"
#include "nsISupportsPrimitives.h"
#include "nsIStringBundle.h"
#include "nsIWindowWatcher.h"
#include "nsPIDOMWindow.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptGlobalObjectOwner.h"
#include "nsIPrincipal.h"
#include "nsIServiceManager.h"
#include "nsNetCID.h"
#include "nsICookieService.h"
#include "nsIDOMPlugin.h"
#include "nsIDOMMimeType.h"
#include "nsMimeTypes.h"
#include "prprf.h"
#include "plevent.h"
#include "nsIEventQueueService.h"
#include "nsIEventQueue.h"
#include "nsIInputStreamTee.h"
#include "nsIInterfaceInfoManager.h"
#include "xptinfo.h"
#include "nsIMIMEService.h"
#include "nsCExternalHandlerService.h"
#include "nsILocalFile.h"
#include "nsIFileChannel.h"
#include "nsPluginSafety.h"
#include "nsICharsetConverterManager.h"
#include "nsIPlatformCharset.h"
#include "nsIDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsPluginDirServiceProvider.h"
#include "nsInt64.h"
#include "nsPluginError.h"
#include "nsUnicharUtils.h"
#include "nsPluginManifestLineReader.h"
#include "imgILoader.h"
#include "nsDefaultPlugin.h"
#include "nsWeakReference.h"
#include "nsIDOMElement.h"
#include "nsIDOMHTMLObjectElement.h"
#include "nsIDOMHTMLEmbedElement.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsIWebNavigation.h"
#include "nsISupportsArray.h"
#include "nsIDocShell.h"
#include "nsPluginNativeWindow.h"
#include "nsIScriptSecurityManager.h"
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
#include "nsContentErrors.h"
#include "nsITimelineService.h"

Go to the source code of this file.

Classes

struct  nsPluginDocReframeEvent
struct  nsPluginUnloadEvent
class  nsPluginStreamInfo
class  nsPluginStreamListenerPeer
class  nsPluginByteRangeStreamListener
class  nsPluginCacheListener
class  nsPRUintKey
class  DOMMimeTypeImpl
class  DOMPluginImpl
struct  pluginFileinDirectory

Defines

#define kPluginTmpDirName   NS_LITERAL_CSTRING("plugtmp")
#define kPluginRegistryFilename   NS_LITERAL_CSTRING("pluginreg.dat")
#define BRAND_PROPERTIES_URL   "chrome://branding/locale/brand.properties"
#define PLUGIN_PROPERTIES_URL   "chrome://global/locale/downloadProgress.properties"
#define PLUGIN_REGIONAL_URL   "chrome://global-region/locale/region.properties"
#define _MAXKEYVALUE_   8196
#define _NS_PREF_COMMON_PLUGIN_REG_KEY_   "browser.plugins.registry_plugins_folder_key_location"
#define _NS_COMMON_PLUGIN_KEY_NAME_   "Plugins Folders"
#define NS_PREF_MAX_NUM_CACHED_PLUGINS   "browser.plugins.max_num_cached_plugins"
#define DEFAULT_NUMBER_OF_STOPPED_PLUGINS   10
#define MAGIC_REQUEST_CONTEXT   0x01020304
#define NS_RETURN_UASTRING_SIZE   128
#define PLUGIN_REG_MIMETYPES_ARRAY_SIZE   12

Functions

static NS_DEFINE_IID (kIPluginInstanceIID, NS_IPLUGININSTANCE_IID)
static NS_DEFINE_IID (kIPluginInstancePeerIID, NS_IPLUGININSTANCEPEER_IID)
static NS_DEFINE_IID (kIPluginStreamInfoIID, NS_IPLUGINSTREAMINFO_IID)
static NS_DEFINE_CID (kPluginCID, NS_PLUGIN_CID)
static NS_DEFINE_IID (kIPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID)
static NS_DEFINE_CID (kProtocolProxyServiceCID, NS_PROTOCOLPROXYSERVICE_CID)
static NS_DEFINE_CID (kCookieServiceCID, NS_COOKIESERVICE_CID)
static NS_DEFINE_IID (kISupportsIID, NS_ISUPPORTS_IID)
static NS_DEFINE_CID (kIOServiceCID, NS_IOSERVICE_CID)
static NS_DEFINE_CID (kHttpHandlerCID, NS_HTTPPROTOCOLHANDLER_CID)
static NS_DEFINE_CID (kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID)
static NS_DEFINE_IID (kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID)
static NS_DEFINE_CID (kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID)
static NS_DEFINE_CID (kCPluginManagerCID, NS_PLUGINMANAGER_CID)
nsresult PostPluginUnloadEvent (PRLibrary *aLibrary)
static PRBool ReadSectionHeader (nsPluginManifestLineReader &reader, const char *token)
static void *PR_CALLBACK HandlePluginDocReframePLEvent (PLEvent *aEvent)
static void PR_CALLBACK DestroyPluginDocReframePLEvent (PLEvent *aEvent)
char * new_str (const char *str)
static void PR_CALLBACK HandlePluginUnloadPLEvent (nsPluginUnloadEvent *aEvent)
static void PR_CALLBACK DestroyPluginUnloadPLEvent (nsPluginUnloadEvent *aEvent)
 NS_IMPL_ISUPPORTS2 (nsPluginStreamInfo, nsIPluginStreamInfo, nsI4xPluginStreamInfo) NS_IMETHODIMP nsPluginStreamInfo
 NS_IMPL_ISUPPORTS4 (nsPluginStreamListenerPeer, nsIStreamListener, nsIRequestObserver, nsIHttpHeaderVisitor, nsISupportsWeakReference) nsresult nsPluginStreamListenerPeer
 NS_IMPL_ISUPPORTS7 (nsPluginHostImpl, nsIPluginManager, nsIPluginManager2, nsIPluginHost, nsIFileUtilities, nsICookieStorage, nsIObserver, nsPIPluginHost) NS_METHOD nsPluginHostImpl
static int CompareExtensions (const char *aExtensionList, const char *aExtension)
static nsresult CreateUnicodeDecoder (nsIUnicodeDecoder **aUnicodeDecoder)
static nsresult DoCharsetConversion (nsIUnicodeDecoder *aUnicodeDecoder, const char *aANSIString, nsAString &aUnicodeString)
PRBool IsCompatibleExecutable (const char *path)
static PRBool isUnwantedPlugin (nsPluginTag *tag)
static PRBool isUnwantedJavaPlugin (nsPluginTag *tag)
static int PR_CALLBACK ComparePluginFileInDirectory (const void *v1, const void *v2, void *)
typedef NS_4XPLUGIN_CALLBACK (char *, NP_GETMIMEDESCRIPTION)(void)
static nsresult FixUpPluginInfo (nsPluginInfo &aInfo, nsPluginFile &aPluginFile)

Variables

static const char * kPluginRegistryVersion = "0.08"
static const char kDirectoryServiceContractID [] = "@mozilla.org/file/directory_service;1"
static const char kPluginsRootKey [] = "software/plugins"
static const char kPluginsNameKey [] = "name"
static const char kPluginsDescKey [] = "description"
static const char kPluginsFilenameKey [] = "filename"
static const char kPluginsFullpathKey [] = "fullpath"
static const char kPluginsModTimeKey [] = "lastModTimeStamp"
static const char kPluginsCanUnload [] = "canUnload"
static const char kPluginsVersionKey [] = "version"
static const char kPluginsMimeTypeKey [] = "mimetype"
static const char kPluginsMimeDescKey [] = "description"
static const char kPluginsMimeExtKey [] = "extension"
static nsActivePluginListgActivePluginList

Define Documentation

#define _MAXKEYVALUE_   8196

Definition at line 256 of file nsPluginHostImpl.cpp.

#define _NS_COMMON_PLUGIN_KEY_NAME_   "Plugins Folders"

Definition at line 258 of file nsPluginHostImpl.cpp.

#define _NS_PREF_COMMON_PLUGIN_REG_KEY_   "browser.plugins.registry_plugins_folder_key_location"

Definition at line 257 of file nsPluginHostImpl.cpp.

#define BRAND_PROPERTIES_URL   "chrome://branding/locale/brand.properties"

Definition at line 251 of file nsPluginHostImpl.cpp.

Definition at line 262 of file nsPluginHostImpl.cpp.

Definition at line 243 of file nsPluginHostImpl.cpp.

Definition at line 198 of file nsPluginHostImpl.cpp.

#define MAGIC_REQUEST_CONTEXT   0x01020304

Definition at line 264 of file nsPluginHostImpl.cpp.

#define NS_PREF_MAX_NUM_CACHED_PLUGINS   "browser.plugins.max_num_cached_plugins"

Definition at line 261 of file nsPluginHostImpl.cpp.

Definition at line 2826 of file nsPluginHostImpl.cpp.

#define PLUGIN_PROPERTIES_URL   "chrome://global/locale/downloadProgress.properties"

Definition at line 252 of file nsPluginHostImpl.cpp.

Definition at line 5470 of file nsPluginHostImpl.cpp.

#define PLUGIN_REGIONAL_URL   "chrome://global-region/locale/region.properties"

Definition at line 253 of file nsPluginHostImpl.cpp.


Function Documentation

static int CompareExtensions ( const char *  aExtensionList,
const char *  aExtension 
) [static]

Definition at line 4147 of file nsPluginHostImpl.cpp.

{
  if((aExtensionList == nsnull) || (aExtension == nsnull))
    return -1;

  const char *pExt = aExtensionList;
  const char *pComma = strchr(pExt, ',');

  if(pComma == nsnull)
    return PL_strcasecmp(pExt, aExtension);

  int extlen = strlen(aExtension);
  while(pComma != nsnull)
  {
    int length = pComma - pExt;
    if(length == extlen && 0 == PL_strncasecmp(aExtension, pExt, length))
      return 0;

    pComma++;
    pExt = pComma;
    pComma = strchr(pExt, ',');
  }

  // the last one
  return PL_strcasecmp(pExt, aExtension);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int PR_CALLBACK ComparePluginFileInDirectory ( const void v1,
const void v2,
void  
) [static]

Definition at line 4838 of file nsPluginHostImpl.cpp.

{
  const pluginFileinDirectory* pfd1 = NS_STATIC_CAST(const pluginFileinDirectory*, v1);
  const pluginFileinDirectory* pfd2 = NS_STATIC_CAST(const pluginFileinDirectory*, v2);

  PRInt32 result = 0;
  if (LL_EQ(pfd1->mModTime, pfd2->mModTime))
    result = Compare(pfd1->mFilename, pfd2->mFilename, nsCaseInsensitiveStringComparator());
  else if (LL_CMP(pfd1->mModTime, >, pfd2->mModTime))
    result = -1;
  else
    result = 1;

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static nsresult CreateUnicodeDecoder ( nsIUnicodeDecoder **  aUnicodeDecoder) [static]

Definition at line 4224 of file nsPluginHostImpl.cpp.

{
  nsresult rv;
  // get the charset
  nsCAutoString platformCharset;
  nsCOMPtr <nsIPlatformCharset> platformCharsetService = do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
  NS_ENSURE_SUCCESS(rv, rv);
  rv = platformCharsetService->GetCharset(kPlatformCharsetSel_FileName, platformCharset);
  NS_ENSURE_SUCCESS(rv, rv);

  // get the decoder
  nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
  NS_ENSURE_SUCCESS(rv, rv);
  rv = ccm->GetUnicodeDecoderRaw(platformCharset.get(),
                                 aUnicodeDecoder);

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void PR_CALLBACK DestroyPluginDocReframePLEvent ( PLEvent aEvent) [static]

Definition at line 358 of file nsPluginHostImpl.cpp.

{
  delete aEvent;
}

Here is the caller graph for this function:

Definition at line 1019 of file nsPluginHostImpl.cpp.

{
  delete aEvent;
}

Here is the caller graph for this function:

static nsresult DoCharsetConversion ( nsIUnicodeDecoder aUnicodeDecoder,
const char *  aANSIString,
nsAString &  aUnicodeString 
) [static]

Definition at line 4243 of file nsPluginHostImpl.cpp.

{
  NS_ENSURE_TRUE(aUnicodeDecoder, NS_ERROR_FAILURE);
  NS_ENSURE_TRUE(aANSIString, NS_ERROR_FAILURE);
  nsresult rv;

  PRInt32 numberOfBytes = strlen(aANSIString);
  PRInt32 outUnicodeLen;
  nsAutoString buffer;
  rv = aUnicodeDecoder->GetMaxLength(aANSIString, numberOfBytes, &outUnicodeLen);
  NS_ENSURE_SUCCESS(rv, rv);
  if (!EnsureStringLength(buffer, outUnicodeLen))
    return NS_ERROR_OUT_OF_MEMORY;
  rv = aUnicodeDecoder->Convert(aANSIString, &numberOfBytes, buffer.BeginWriting(), &outUnicodeLen);
  NS_ENSURE_SUCCESS(rv, rv);
  buffer.SetLength(outUnicodeLen);
  aUnicodeString = buffer;

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static nsresult FixUpPluginInfo ( nsPluginInfo aInfo,
nsPluginFile aPluginFile 
) [static]

Definition at line 4856 of file nsPluginHostImpl.cpp.

{
#ifndef XP_WIN
  return NS_OK;
#endif

  for (PRUint32 i = 0; i < aInfo.fVariantCount; i++) {
    if (PL_strcmp(aInfo.fMimeTypeArray[i], "*"))
      continue;

    // we got "*" type
    // check if this is an alien plugin (not our default plugin)
    // by trying to find a special entry point
    PRLibrary *library = nsnull;
    if (NS_FAILED(aPluginFile.LoadPlugin(library)) || !library)
      return NS_ERROR_FAILURE;

    NP_GETMIMEDESCRIPTION pf = (NP_GETMIMEDESCRIPTION)PR_FindSymbol(library, "NP_GetMIMEDescription");

    if (pf) {
      // if we found it, this is the default plugin, return
      char * mimedescription = pf();
      if (!PL_strncmp(mimedescription, NS_PLUGIN_DEFAULT_MIME_DESCRIPTION, 1))
        return NS_OK;
    }

    // if we are here that means we have an alien plugin
    // which wants to take over "*" type

    // change its "*" mime type to "[*]"
    PL_strfree(aInfo.fMimeTypeArray[i]);
    aInfo.fMimeTypeArray[i] = PL_strdup("[*]");

    // continue the loop?
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void* PR_CALLBACK HandlePluginDocReframePLEvent ( PLEvent aEvent) [static]

Definition at line 352 of file nsPluginHostImpl.cpp.

{
  nsPluginDocReframeEvent* event = NS_REINTERPRET_CAST(nsPluginDocReframeEvent*, aEvent);
  event->HandlePluginDocReframeEvent();
  return nsnull;
}

Here is the caller graph for this function:

Definition at line 1015 of file nsPluginHostImpl.cpp.

{
  aEvent->HandleEvent();
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool IsCompatibleExecutable ( const char *  path) [inline]

Definition at line 4589 of file nsPluginHostImpl.cpp.

{ return PR_TRUE; }

Here is the caller graph for this function:

static PRBool isUnwantedJavaPlugin ( nsPluginTag tag) [static]

Definition at line 4781 of file nsPluginHostImpl.cpp.

                                                      {
#ifndef OJI
  for (PRInt32 i = 0; i < tag->mVariants; ++i) {
    if ((0 == PL_strncasecmp(tag->mMimeTypeArray[i], "application/x-java-vm", 21)) ||
        (0 == PL_strncasecmp(tag->mMimeTypeArray[i], "application/x-java-applet", 25)) ||
        (0 == PL_strncasecmp(tag->mMimeTypeArray[i], "application/x-java-bean", 23)))
      return PR_TRUE;
  }
#endif /* OJI */
  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool isUnwantedPlugin ( nsPluginTag tag) [static]

Definition at line 4755 of file nsPluginHostImpl.cpp.

{
  if(tag->mFileName == nsnull)
    return PR_TRUE;

  for (PRInt32 i = 0; i < tag->mVariants; ++i) {
    if(nsnull == PL_strcasecmp(tag->mMimeTypeArray[i], "application/pdf"))
      return PR_FALSE;

    if(nsnull == PL_strcasecmp(tag->mMimeTypeArray[i], "application/x-shockwave-flash"))
      return PR_FALSE;

    if(nsnull == PL_strcasecmp(tag->mMimeTypeArray[i],"application/x-director"))
      return PR_FALSE;
  }

  // On Windows, we also want to include the Quicktime plugin from the 4.x directory
  // But because it spans several DLL's, the best check for now is by filename
  if (nsnull != PL_strcasestr(tag->mFileName,"npqtplugin"))
    return PR_FALSE;

  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* new_str ( const char *  str) [inline]

Definition at line 762 of file nsPluginHostImpl.cpp.

{
  if(str == nsnull)
    return nsnull;

  char* result = new char[strlen(str) + 1];
  if (result != nsnull)
    return strcpy(result, str);
  return result;
}

Here is the caller graph for this function:

typedef NS_4XPLUGIN_CALLBACK ( char *  ,
NP_GETMIMEDESCRIPTION   
)
static NS_DEFINE_CID ( kPluginCID  ,
NS_PLUGIN_CID   
) [static]
static NS_DEFINE_CID ( kProtocolProxyServiceCID  ,
NS_PROTOCOLPROXYSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kCookieServiceCID  ,
NS_COOKIESERVICE_CID   
) [static]
static NS_DEFINE_CID ( kIOServiceCID  ,
NS_IOSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kHttpHandlerCID  ,
NS_HTTPPROTOCOLHANDLER_CID   
) [static]
static NS_DEFINE_CID ( kStreamConverterServiceCID  ,
NS_STREAMCONVERTERSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kCPluginManagerCID  ,
NS_PLUGINMANAGER_CID   
) [static]
static NS_DEFINE_IID ( kIPluginInstanceIID  ,
NS_IPLUGININSTANCE_IID   
) [static]
static NS_DEFINE_IID ( kIPluginInstancePeerIID  ,
NS_IPLUGININSTANCEPEER_IID   
) [static]
static NS_DEFINE_IID ( kIPluginStreamInfoIID  ,
NS_IPLUGINSTREAMINFO_IID   
) [static]
static NS_DEFINE_IID ( kIPluginTagInfo2IID  ,
NS_IPLUGINTAGINFO2_IID   
) [static]
static NS_DEFINE_IID ( kISupportsIID  ,
NS_ISUPPORTS_IID   
) [static]
static NS_DEFINE_IID ( kStringBundleServiceCID  ,
NS_STRINGBUNDLESERVICE_CID   
) [static]

Definition at line 1320 of file nsPluginHostImpl.cpp.

{
  *result = mContentType;
  return NS_OK;
}

Definition at line 1692 of file nsPluginHostImpl.cpp.

{
#ifdef PLUGIN_LOGGING
  nsCAutoString urlSpec;
  if(aURL != nsnull) (void)aURL->GetAsciiSpec(urlSpec);

  PR_LOG(nsPluginLogging::gPluginLog, PLUGIN_LOG_NORMAL,
        ("nsPluginStreamListenerPeer::Initialize instance=%p, url=%s\n", aInstance, urlSpec.get()));

  PR_LogFlush();
#endif

  mURL = aURL;
  NS_ADDREF(mURL);

  mInstance = aInstance;
  NS_ADDREF(mInstance);

  mPStreamListener = aListener;
  NS_ADDREF(mPStreamListener);

  mPluginStreamInfo = new nsPluginStreamInfo();
  if (!mPluginStreamInfo)
    return NS_ERROR_OUT_OF_MEMORY;

  mPluginStreamInfo->SetPluginInstance(aInstance);
  mPluginStreamInfo->SetPluginStreamListenerPeer(this);

  mPendingRequests = requestCount;

  mDataForwardToRequest = new nsHashtable(16, PR_FALSE);
  if (!mDataForwardToRequest)
      return NS_ERROR_FAILURE;

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 2640 of file nsPluginHostImpl.cpp.

{
  NS_PRECONDITION(aOuter == nsnull, "no aggregation");
  if (aOuter)
    return NS_ERROR_NO_AGGREGATION;

  nsPluginHostImpl* host = new nsPluginHostImpl();
  if (! host)
    return NS_ERROR_OUT_OF_MEMORY;

  nsresult rv;
  NS_ADDREF(host);
  rv = host->QueryInterface(aIID, aResult);
  NS_RELEASE(host);
  return rv;
}

Here is the call graph for this function:

Definition at line 1025 of file nsPluginHostImpl.cpp.

{
  nsCOMPtr<nsIEventQueueService> eventService(do_GetService(kEventQueueServiceCID));
  if (eventService) {
    nsCOMPtr<nsIEventQueue> eventQueue;
    eventService->GetThreadEventQueue(PR_GetCurrentThread(), getter_AddRefs(eventQueue));
    if (eventQueue) {
      nsPluginUnloadEvent * ev = new nsPluginUnloadEvent(aLibrary);
      if (ev) {

        PL_InitEvent(ev, nsnull, (PLHandleEventProc) ::HandlePluginUnloadPLEvent, (PLDestroyEventProc) ::DestroyPluginUnloadPLEvent);
        if (NS_SUCCEEDED(eventQueue->PostEvent(ev)))
          return NS_OK;
        else NS_WARNING("failed to post event onto queue");

      } else NS_WARNING("not able to create plugin unload event");
    } else NS_WARNING("couldn't get event queue");
  } else NS_WARNING("couldn't get event queue service");

  // failure case
  NS_TRY_SAFE_CALL_VOID(PR_UnloadLibrary(aLibrary), nsnull, nsnull);

  return NS_ERROR_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool ReadSectionHeader ( nsPluginManifestLineReader reader,
const char *  token 
) [static]

Definition at line 279 of file nsPluginHostImpl.cpp.

{
  do {
    if (*reader.LinePtr() == '[') {
      char* p = reader.LinePtr() + (reader.LineLength() - 1);
      if (*p != ']')
        break;
      *p = 0;

      char* values[1];
      if (1 != reader.ParseLine(values, 1))
        break;
      // ignore the leading '['
      if (PL_strcmp(values[0]+1, token)) {
        break; // it's wrong token
      }
      return PR_TRUE;
    }
  } while (reader.NextLine());
  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 268 of file nsPluginHostImpl.cpp.

const char kDirectoryServiceContractID[] = "@mozilla.org/file/directory_service;1" [static]

Definition at line 223 of file nsPluginHostImpl.cpp.

const char* kPluginRegistryVersion = "0.08" [static]

Definition at line 209 of file nsPluginHostImpl.cpp.

const char kPluginsCanUnload[] = "canUnload" [static]

Definition at line 237 of file nsPluginHostImpl.cpp.

const char kPluginsDescKey[] = "description" [static]

Definition at line 233 of file nsPluginHostImpl.cpp.

const char kPluginsFilenameKey[] = "filename" [static]

Definition at line 234 of file nsPluginHostImpl.cpp.

const char kPluginsFullpathKey[] = "fullpath" [static]

Definition at line 235 of file nsPluginHostImpl.cpp.

const char kPluginsMimeDescKey[] = "description" [static]

Definition at line 240 of file nsPluginHostImpl.cpp.

const char kPluginsMimeExtKey[] = "extension" [static]

Definition at line 241 of file nsPluginHostImpl.cpp.

const char kPluginsMimeTypeKey[] = "mimetype" [static]

Definition at line 239 of file nsPluginHostImpl.cpp.

const char kPluginsModTimeKey[] = "lastModTimeStamp" [static]

Definition at line 236 of file nsPluginHostImpl.cpp.

const char kPluginsNameKey[] = "name" [static]

Definition at line 232 of file nsPluginHostImpl.cpp.

const char kPluginsRootKey[] = "software/plugins" [static]

Definition at line 231 of file nsPluginHostImpl.cpp.

const char kPluginsVersionKey[] = "version" [static]

Definition at line 238 of file nsPluginHostImpl.cpp.