Backing out fix for #106253 - Plugins aren't adding themselves to load groups

a=adt, a=drivers, r=peterl, sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119990 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
chak%netscape.com
2002-04-26 20:19:44 +00:00
parent bca9d10196
commit 44eccf3e99

View File

@@ -3427,7 +3427,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbededPlugin(const char *aMimeType,
aOwner->GetInstance(instance);
if((!aMimeType || !isJava) && bCanHandleInternally)
rv = NewEmbededPluginStream(aURL, aOwner, instance);
rv = NewEmbededPluginStream(aURL, nsnull, instance);
// notify Java DOM component
nsresult res;
@@ -3520,7 +3520,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbededPlugin(const char *aMimeType,
}
if(havedata && !isJava && bCanHandleInternally)
rv = NewEmbededPluginStream(aURL, aOwner, instance);
rv = NewEmbededPluginStream(aURL, nsnull, instance);
// notify Java DOM component
nsresult res;
@@ -5598,8 +5598,6 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL,
if (aURL.Length() <= 0)
return NS_OK;
nsCOMPtr<nsILoadGroup> loadGroup;
// get the full URL of the document that the plugin is embedded
// in to create an absolute url in case aURL is relative
nsCOMPtr<nsIDocument> doc;
@@ -5616,7 +5614,6 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL,
{
nsCOMPtr<nsIURI> docURL;
doc->GetDocumentURL(getter_AddRefs(docURL));
doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
// Create an absolute URL
rv = NS_MakeAbsoluteURI(absUrl, aURL, docURL);
@@ -5660,7 +5657,8 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL,
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannel(getter_AddRefs(channel), url, nsnull, loadGroup, callbacks);
// XXX: Null LoadGroup?
rv = NS_NewChannel(getter_AddRefs(channel), url, nsnull, nsnull, callbacks);
if (NS_FAILED(rv))
return rv;
@@ -5858,17 +5856,9 @@ nsresult nsPluginHostImpl::NewEmbededPluginStream(nsIURI* aURL,
else
rv = NS_ERROR_ILLEGAL_VALUE;
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsILoadGroup> loadGroup;
if (aOwner) {
rv = aOwner->GetDocument(getter_AddRefs(doc));
if (NS_SUCCEEDED(rv) && doc) {
doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
}
}
rv = NS_OpenURI(listener, nsnull, aURL, nsnull, loadGroup);
if (NS_OK == rv) {
// XXX: Null LoadGroup?
rv = NS_OpenURI(listener, nsnull, aURL, nsnull);
}
//NS_RELEASE(aURL);