a=brendan, ekrock

r=av, sean@beatnik.com
bug=50547

This change allows the plugin to have a greater degree of control over
the plugin lifecycle.  This change makes it possible for the plugin to
tell mozilla:

1. Whether or not they want to allow the browser to cache their
instance.  Default is yes, do allow the browser to cache their instance.

2. If they answer no to 1, that is, no the plugin does not want the
browser to cache their instance, do you want the shutdown calls to be:

a.

          inst->SetWindow(nsnull);
          inst->Stop();
          inst->Destroy();


b.

          inst->Stop();
          inst->Destroy();
          inst->SetWindow(nsnull);

a. is the default.

Please visit the bug to see the patches:

http://bugzilla.mozilla.org/show_bug.cgi?id=50547

Detail:

This fix was requested by Stanley Ho of the Sun Java Plugin Team.  A
conference call between Eric Krock, Andrei Volkov, Sun, Adobe and other
plugin vendors was used to agree on the above solution.

M modules/plugin/public/nsplugindefs.h
M modules/plugin/nglsrc/nsPluginHostImpl.cpp
M modules/plugin/nglsrc/nsPluginViewer.cpp
M layout/html/base/src/nsObjectFrame.cpp
This commit is contained in:
edburns@acm.org
2000-09-14 08:22:31 +00:00
parent 4f409ad011
commit ae81174800
8 changed files with 106 additions and 14 deletions

View File

@@ -2200,6 +2200,15 @@ nsresult nsPluginHostImpl::FindStoppedPluginForURL(nsIURI* aURL,
void nsPluginHostImpl::AddInstanceToActiveList(nsIPluginInstance* aInstance,
nsIURI* aURL)
{
// first, determine if the plugin wants to be cached
PRBool doCache = PR_TRUE;
aInstance->GetValue(nsPluginInstanceVariable_DoCacheBool,
(void *) &doCache);
if (!doCache) {
return;
}
char* url;
if(!aURL)