mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1191107 - Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource (r=sicking,ehsan) (95f425209) - Bug 1182544 - Use channel->ascynOpen2 in dom/xml/XMLDocument.cpp (r=sicking) (ce5a45c14) - Bug 1193552 - Remove baseURI from LoadInfo (r=sicking,jkitch) (0a82e802e) - Bug 1187165 - Use channel->ascynOpen2 in dom/base/ImportManager (r=sicking) (b1fa3166b) - Bug 1192955 - Use channel->ascynOpen2 for PING in docshell/base/nsDocShell.cpp (r=sicking) (3e2858855) - Bug 1195162 - Use channel->ascynOpen2 dom/xbl/nsXBLService.cpp (r=sicking) (0382ed90d)
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include "nsIScriptContext.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsILoadInfo.h"
|
||||
#include "nsIViewSourceChannel.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -811,15 +811,12 @@ nsHtml5TreeOpExecutor::GetViewSourceBaseURI()
|
||||
// We query the channel for the baseURI because in certain situations it
|
||||
// cannot otherwise be determined. If this process fails, fall back to the
|
||||
// standard method.
|
||||
nsCOMPtr<nsIChannel> channel = mDocument->GetChannel();
|
||||
if (channel) {
|
||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||
nsresult rv = channel->GetLoadInfo(getter_AddRefs(loadInfo));
|
||||
if (NS_SUCCEEDED(rv) && loadInfo) {
|
||||
rv = loadInfo->GetBaseURI(getter_AddRefs(mViewSourceBaseURI));
|
||||
if (NS_SUCCEEDED(rv) && mViewSourceBaseURI) {
|
||||
return mViewSourceBaseURI;
|
||||
}
|
||||
nsCOMPtr<nsIViewSourceChannel> vsc =
|
||||
do_QueryInterface(mDocument->GetChannel());
|
||||
if (vsc) {
|
||||
nsresult rv = vsc->GetBaseURI(getter_AddRefs(mViewSourceBaseURI));
|
||||
if (NS_SUCCEEDED(rv) && mViewSourceBaseURI) {
|
||||
return mViewSourceBaseURI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user