зеркало из https://github.com/mozilla/pjs.git
Fixed some serious ref count bugs using nsIURL when instantiating plugins.
This commit is contained in:
Родитель
2e7ad337ac
Коммит
421cc7d6a1
|
@ -789,6 +789,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
if(!fullURL && baseURL) {
|
if(!fullURL && baseURL) {
|
||||||
SetFullURL(baseURL);
|
SetFullURL(baseURL);
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
}
|
}
|
||||||
nsIView *parentWithView;
|
nsIView *parentWithView;
|
||||||
nsPoint origin;
|
nsPoint origin;
|
||||||
|
@ -886,7 +887,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
nsIPluginHost *pluginHost = nsnull;
|
nsIPluginHost *pluginHost = nsnull;
|
||||||
nsIContentViewerContainer *cv = nsnull;
|
nsIContentViewerContainer *cv = nsnull;
|
||||||
nsIURL* baseURL = nsnull;
|
nsIURL* baseURL = nsnull;
|
||||||
nsIURL* fullURL = nsnull;
|
nsIURL* fullURL = nsnull;
|
||||||
|
|
||||||
nsAutoString classid;
|
nsAutoString classid;
|
||||||
PRInt32 nameSpaceID;
|
PRInt32 nameSpaceID;
|
||||||
|
@ -938,7 +939,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
NS_ADDREF(fullURL);
|
NS_IF_ADDREF(fullURL);
|
||||||
}
|
}
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
|
|
||||||
|
@ -1000,9 +1001,10 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_IF_RELEASE(baseURL);
|
NS_IF_RELEASE(baseURL);
|
||||||
baseURL = codeBaseURL;
|
baseURL = codeBaseURL;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
|
|
||||||
|
@ -1140,9 +1142,10 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
// Create an absolute URL
|
// Create an absolute URL
|
||||||
rv = NS_NewURL(&fullURL, src, baseURL, nsnull, group);
|
rv = NS_NewURL(&fullURL, src, baseURL, nsnull, group);
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
}
|
} else {// we didn't find a src or data param, so just set the url to the base
|
||||||
else // we didn't find a src or data param, so just set the url to the base
|
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
|
}
|
||||||
|
|
||||||
// if we didn't find the type, but we do have a src, we can determine the mimetype
|
// if we didn't find the type, but we do have a src, we can determine the mimetype
|
||||||
// based on the file extension
|
// based on the file extension
|
||||||
|
|
|
@ -789,6 +789,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
if(!fullURL && baseURL) {
|
if(!fullURL && baseURL) {
|
||||||
SetFullURL(baseURL);
|
SetFullURL(baseURL);
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
}
|
}
|
||||||
nsIView *parentWithView;
|
nsIView *parentWithView;
|
||||||
nsPoint origin;
|
nsPoint origin;
|
||||||
|
@ -886,7 +887,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
nsIPluginHost *pluginHost = nsnull;
|
nsIPluginHost *pluginHost = nsnull;
|
||||||
nsIContentViewerContainer *cv = nsnull;
|
nsIContentViewerContainer *cv = nsnull;
|
||||||
nsIURL* baseURL = nsnull;
|
nsIURL* baseURL = nsnull;
|
||||||
nsIURL* fullURL = nsnull;
|
nsIURL* fullURL = nsnull;
|
||||||
|
|
||||||
nsAutoString classid;
|
nsAutoString classid;
|
||||||
PRInt32 nameSpaceID;
|
PRInt32 nameSpaceID;
|
||||||
|
@ -938,7 +939,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
NS_ADDREF(fullURL);
|
NS_IF_ADDREF(fullURL);
|
||||||
}
|
}
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
|
|
||||||
|
@ -1000,9 +1001,10 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_IF_RELEASE(baseURL);
|
NS_IF_RELEASE(baseURL);
|
||||||
baseURL = codeBaseURL;
|
baseURL = codeBaseURL;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
|
|
||||||
|
@ -1140,9 +1142,10 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
// Create an absolute URL
|
// Create an absolute URL
|
||||||
rv = NS_NewURL(&fullURL, src, baseURL, nsnull, group);
|
rv = NS_NewURL(&fullURL, src, baseURL, nsnull, group);
|
||||||
NS_IF_RELEASE(group);
|
NS_IF_RELEASE(group);
|
||||||
}
|
} else {// we didn't find a src or data param, so just set the url to the base
|
||||||
else // we didn't find a src or data param, so just set the url to the base
|
|
||||||
fullURL = baseURL;
|
fullURL = baseURL;
|
||||||
|
NS_IF_ADDREF(fullURL);
|
||||||
|
}
|
||||||
|
|
||||||
// if we didn't find the type, but we do have a src, we can determine the mimetype
|
// if we didn't find the type, but we do have a src, we can determine the mimetype
|
||||||
// based on the file extension
|
// based on the file extension
|
||||||
|
|
Загрузка…
Ссылка в новой задаче