From ba9d85891c256ba131a4e5deb6f1736d0d0dbc7b Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Wed, 9 Sep 1998 23:52:16 +0000 Subject: [PATCH] Checked in some bug fixes from michaelp to make fullscreen plugins work better/more often git-svn-id: svn://10.0.0.236/trunk@9683 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp | 11 +++++++++-- .../modules/plugin/base/src/nsPluginInstancePeer.cpp | 4 ++++ mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp | 11 +++++++++-- .../modules/plugin/nglsrc/nsPluginInstancePeer.cpp | 4 ++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index bedaee55505..c499a1e3542 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -526,9 +526,16 @@ nsPluginHostImpl::FindProxyForURL(const char* url, char* *result) nsresult nsPluginHostImpl :: Init(void) { - nsresult rv; + nsresult rv; + nsISupports *object; - rv = nsMalloc::Create(nsnull, kIMallocIID, (void **)&mMalloc); + rv = nsMalloc::Create(nsnull, kIMallocIID, (void **)&object); + + if (NS_OK == rv) + { + rv = object->QueryInterface(kIMallocIID, (void **)&mMalloc); + NS_RELEASE(object); + } return rv; } diff --git a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp index 611a50fd737..e230831911d 100644 --- a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp @@ -78,11 +78,13 @@ NS_IMETHODIMP nsPluginInstancePeerImpl :: SetValue(nsPluginInstancePeerVariable NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMIMEType(nsMIMEType *result) { + *result = "model/vrml"; return NS_OK; } NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMode(nsPluginMode *result) { + *result = nsPluginMode_Full; return NS_OK; } @@ -99,6 +101,8 @@ NS_IMETHODIMP nsPluginInstancePeerImpl :: ShowStatus(const char* message) NS_IMETHODIMP nsPluginInstancePeerImpl :: GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) { n = 0; + names = nsnull; + values = nsnull; return NS_OK; } diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index bedaee55505..c499a1e3542 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -526,9 +526,16 @@ nsPluginHostImpl::FindProxyForURL(const char* url, char* *result) nsresult nsPluginHostImpl :: Init(void) { - nsresult rv; + nsresult rv; + nsISupports *object; - rv = nsMalloc::Create(nsnull, kIMallocIID, (void **)&mMalloc); + rv = nsMalloc::Create(nsnull, kIMallocIID, (void **)&object); + + if (NS_OK == rv) + { + rv = object->QueryInterface(kIMallocIID, (void **)&mMalloc); + NS_RELEASE(object); + } return rv; } diff --git a/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp index 611a50fd737..e230831911d 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginInstancePeer.cpp @@ -78,11 +78,13 @@ NS_IMETHODIMP nsPluginInstancePeerImpl :: SetValue(nsPluginInstancePeerVariable NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMIMEType(nsMIMEType *result) { + *result = "model/vrml"; return NS_OK; } NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMode(nsPluginMode *result) { + *result = nsPluginMode_Full; return NS_OK; } @@ -99,6 +101,8 @@ NS_IMETHODIMP nsPluginInstancePeerImpl :: ShowStatus(const char* message) NS_IMETHODIMP nsPluginInstancePeerImpl :: GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) { n = 0; + names = nsnull; + values = nsnull; return NS_OK; }