Backing out bug 182124 because I think it caused Ts to go up...
git-svn-id: svn://10.0.0.236/trunk@135109 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1516,6 +1516,18 @@ CSSLoaderImpl::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// We have to clone the URI because we're using it as the hash key and necko
|
||||
// will munge it. For example, "chrome://communicator/skin/" will become
|
||||
// "chrome://communicator/skin/communicator.css" if you open a channel with
|
||||
// it.. :(
|
||||
nsCOMPtr<nsIURI> uriClone;
|
||||
rv = aLoadData->mURI->Clone(getter_AddRefs(uriClone));
|
||||
if (!uriClone) {
|
||||
LOG_ERROR((" Failed to clone URI"));
|
||||
SheetComplete(aLoadData, PR_FALSE);
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (aLoadData->mSyncLoad) {
|
||||
LOG((" Synchronous load"));
|
||||
NS_ASSERTION(aSheetState == eSheetNeedsParser,
|
||||
@@ -1523,7 +1535,7 @@ CSSLoaderImpl::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
||||
|
||||
// Just load it
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
rv = NS_OpenURI(getter_AddRefs(stream), aLoadData->mURI);
|
||||
rv = NS_OpenURI(getter_AddRefs(stream), uriClone);
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG_ERROR((" Failed to open URI synchronously"));
|
||||
SheetComplete(aLoadData, PR_FALSE);
|
||||
@@ -1605,13 +1617,13 @@ CSSLoaderImpl::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
||||
}
|
||||
|
||||
#ifdef MOZ_TIMELINE
|
||||
NS_TIMELINE_MARK_URI("Loading style sheet: %s", aLoadData->mURI);
|
||||
NS_TIMELINE_MARK_URI("Loading style sheet: %s", uriClone);
|
||||
NS_TIMELINE_INDENT();
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = NS_NewChannel(getter_AddRefs(channel),
|
||||
aLoadData->mURI, nsnull, loadGroup,
|
||||
uriClone, nsnull, loadGroup,
|
||||
nsnull, nsIChannel::LOAD_NORMAL);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
|
||||
Reference in New Issue
Block a user