mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- pointer style (db52d9c32) - Bug 1158407 - Stop using this one weird allocation fallback for MCreateThisWithTemplate. (r=terrence) (5b489cd5d) - Bug 1170124 - Remove unnecessary type monitoring in jit::InvokeFunction. r=bhackett (1603ee063) - Bug 1141865 - Part 2: Plumb new.target on the stack and make it accessible to JSNatives. (r=jorendorff, r=jandem, r=shu) (25cfa92ec) - Bug 1129795 - Convert rest of docshell/ to Gecko style. r=mccr8 (20acc2d82) - Bug 1162309 - Part 1: Remove instances of #ifdef PR_LOGGING in uriloader. r=froydnj (8768f60c0) - Bug 1162309 - Part 2: Remove instances of #ifdef PR_LOGGING in docshell. r=froydnj (e9de046f3) - Bug 1096908 - forward network security messages to the content process; r=hurley (69b38e624) - Bug 1156493 - e10s: move .cacheKey to nsICacheInfoChannel so child channels can get/set it, r=jduell (507efbe2b) - Bug 1017758 - Use infallible getters for appId/isInBrowserElement/unknownAppId; r=bz (8021f0ae8)
This commit is contained in:
@@ -246,12 +246,10 @@ static uint32_t gValidateOrigin = 0xffffffff;
|
||||
// Can be overridden with docshell.event_starvation_delay_hint pref.
|
||||
#define NS_EVENT_STARVATION_DELAY_HINT 2000
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#ifdef DEBUG
|
||||
static PRLogModuleInfo* gDocShellLog;
|
||||
#endif
|
||||
static PRLogModuleInfo* gDocShellLeakLog;
|
||||
#endif
|
||||
|
||||
const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties";
|
||||
const char kAppstringsBundleURL[] = "chrome://global/locale/appstrings.properties";
|
||||
@@ -712,7 +710,8 @@ SendPing(void* aClosure, nsIContent* aContent, nsIURI* aURI,
|
||||
nsPingListener* pingListener =
|
||||
new nsPingListener(info->requireSameHost, aContent, loadGroup);
|
||||
|
||||
nsCOMPtr<nsINetworkInterceptController> interceptController = do_QueryInterface(info->docShell);
|
||||
nsCOMPtr<nsINetworkInterceptController> interceptController =
|
||||
do_QueryInterface(info->docShell);
|
||||
pingListener->SetInterceptController(interceptController);
|
||||
nsCOMPtr<nsIStreamListener> listener(pingListener);
|
||||
|
||||
@@ -845,10 +844,6 @@ DecreasePrivateDocShellCount()
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsDocShell: Object Management
|
||||
//*****************************************************************************
|
||||
|
||||
static uint64_t gDocshellIDCounter = 0;
|
||||
|
||||
nsDocShell::nsDocShell()
|
||||
@@ -922,7 +917,6 @@ nsDocShell::nsDocShell()
|
||||
CallGetService(NS_URIFIXUP_CONTRACTID, &sURIFixup);
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#ifdef DEBUG
|
||||
if (!gDocShellLog) {
|
||||
gDocShellLog = PR_NewLogModule("nsDocShell");
|
||||
@@ -934,7 +928,6 @@ nsDocShell::nsDocShell()
|
||||
if (gDocShellLeakLog) {
|
||||
PR_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p created\n", this));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
// We're counting the number of |nsDocShells| to help find leaks
|
||||
@@ -967,11 +960,9 @@ nsDocShell::~nsDocShell()
|
||||
NS_IF_RELEASE(sURIFixup);
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocShellLeakLog) {
|
||||
PR_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p destroyed\n", this));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
// We're counting the number of |nsDocShells| to help find leaks
|
||||
@@ -1035,10 +1026,6 @@ nsDocShell::DestroyChildren()
|
||||
nsDocLoader::DestroyChildren();
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsISupports
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsDocShell, nsDocLoader)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDocShell, nsDocLoader)
|
||||
|
||||
@@ -1066,9 +1053,6 @@ NS_INTERFACE_MAP_BEGIN(nsDocShell)
|
||||
NS_INTERFACE_MAP_ENTRY(nsINetworkInterceptController)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDocLoader)
|
||||
|
||||
///*****************************************************************************
|
||||
// nsDocShell::nsIInterfaceRequestor
|
||||
//*****************************************************************************
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
|
||||
{
|
||||
@@ -1115,7 +1099,7 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
PR_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]: returning app cache container %p",
|
||||
this, domDoc.get()));
|
||||
@@ -1366,9 +1350,6 @@ nsDocShell::ConvertLoadTypeToDocShellLoadInfo(uint32_t aLoadType)
|
||||
return docShellLoadType;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsIDocShell
|
||||
//*****************************************************************************
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::LoadURI(nsIURI* aURI,
|
||||
nsIDocShellLoadInfo* aLoadInfo,
|
||||
@@ -1450,7 +1431,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
|
||||
aLoadInfo->GetBaseURI(getter_AddRefs(baseURI));
|
||||
}
|
||||
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString uristr;
|
||||
aURI->GetAsciiSpec(uristr);
|
||||
@@ -2025,7 +2006,6 @@ bool
|
||||
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
|
||||
bool aFireOnLocationChange, uint32_t aLocationFlags)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
if (aURI) {
|
||||
@@ -2033,7 +2013,6 @@ nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
|
||||
}
|
||||
PR_LogPrint("DOCSHELL %p SetCurrentURI %s\n", this, spec.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
// We don't want to send a location change when we're displaying an error
|
||||
// page, and we don't want to change our idea of "current URI" either
|
||||
@@ -2630,14 +2609,16 @@ nsDocShell::SetAllowContentRetargeting(bool aAllowContentRetargeting)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetAllowContentRetargetingOnChildren(bool* aAllowContentRetargetingOnChildren)
|
||||
nsDocShell::GetAllowContentRetargetingOnChildren(
|
||||
bool* aAllowContentRetargetingOnChildren)
|
||||
{
|
||||
*aAllowContentRetargetingOnChildren = mAllowContentRetargetingOnChildren;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren)
|
||||
nsDocShell::SetAllowContentRetargetingOnChildren(
|
||||
bool aAllowContentRetargetingOnChildren)
|
||||
{
|
||||
mAllowContentRetargetingOnChildren = aAllowContentRetargetingOnChildren;
|
||||
return NS_OK;
|
||||
@@ -3527,7 +3508,8 @@ nsDocShell::SetDocLoaderParent(nsDocLoader* aParent)
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetAllowWindowControl(&value))) {
|
||||
SetAllowWindowControl(value);
|
||||
}
|
||||
SetAllowContentRetargeting(parentAsDocShell->GetAllowContentRetargetingOnChildren());
|
||||
SetAllowContentRetargeting(
|
||||
parentAsDocShell->GetAllowContentRetargetingOnChildren());
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetIsActive(&value))) {
|
||||
SetIsActive(value);
|
||||
}
|
||||
@@ -5336,7 +5318,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
|
||||
const char* aCSSClass,
|
||||
nsIChannel* aFailedChannel)
|
||||
{
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
@@ -5664,6 +5646,7 @@ nsDocShell::GetSessionHistory(nsISHistory** aSessionHistory)
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsIWebPageDescriptor
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::LoadPage(nsISupports* aPageDescriptor, uint32_t aDisplayType)
|
||||
{
|
||||
@@ -6749,11 +6732,7 @@ nsDocShell::DoAppRedirectIfNeeded(nsIURI* aURI,
|
||||
nsIDocShellLoadInfo* aLoadInfo,
|
||||
bool aFirstParty)
|
||||
{
|
||||
uint32_t appId;
|
||||
nsresult rv = GetAppId(&appId);
|
||||
if (NS_FAILED(rv)) {
|
||||
return false;
|
||||
}
|
||||
uint32_t appId = nsIDocShell::GetAppId();
|
||||
|
||||
if (appId != nsIScriptSecurityManager::NO_APP_ID &&
|
||||
appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
|
||||
@@ -6761,7 +6740,7 @@ nsDocShell::DoAppRedirectIfNeeded(nsIURI* aURI,
|
||||
do_GetService(APPS_SERVICE_CONTRACTID);
|
||||
NS_ASSERTION(appsService, "No AppsService available");
|
||||
nsCOMPtr<nsIURI> redirect;
|
||||
rv = appsService->GetRedirect(appId, aURI, getter_AddRefs(redirect));
|
||||
nsresult rv = appsService->GetRedirect(appId, aURI, getter_AddRefs(redirect));
|
||||
if (NS_SUCCEEDED(rv) && redirect) {
|
||||
rv = LoadURI(redirect, aLoadInfo, nsIWebNavigation::LOAD_FLAGS_NONE,
|
||||
aFirstParty);
|
||||
@@ -7243,7 +7222,7 @@ nsDocShell::RefreshURIFromQueue()
|
||||
timer->InitWithCallback(refreshInfo, delay, nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
}
|
||||
} // while
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -7890,19 +7869,18 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
||||
aStatus == NS_ERROR_PROXY_CONNECTION_REFUSED) &&
|
||||
(isTopFrame || UseErrorPages())) {
|
||||
DisplayLoadError(aStatus, url, nullptr, aChannel);
|
||||
}
|
||||
else if (aStatus == NS_ERROR_NET_TIMEOUT ||
|
||||
aStatus == NS_ERROR_REDIRECT_LOOP ||
|
||||
aStatus == NS_ERROR_UNKNOWN_SOCKET_TYPE ||
|
||||
aStatus == NS_ERROR_NET_INTERRUPT ||
|
||||
aStatus == NS_ERROR_NET_RESET ||
|
||||
aStatus == NS_ERROR_OFFLINE ||
|
||||
aStatus == NS_ERROR_MALWARE_URI ||
|
||||
aStatus == NS_ERROR_PHISHING_URI ||
|
||||
aStatus == NS_ERROR_UNSAFE_CONTENT_TYPE ||
|
||||
aStatus == NS_ERROR_REMOTE_XUL ||
|
||||
aStatus == NS_ERROR_OFFLINE ||
|
||||
NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_SECURITY) {
|
||||
} else if (aStatus == NS_ERROR_NET_TIMEOUT ||
|
||||
aStatus == NS_ERROR_REDIRECT_LOOP ||
|
||||
aStatus == NS_ERROR_UNKNOWN_SOCKET_TYPE ||
|
||||
aStatus == NS_ERROR_NET_INTERRUPT ||
|
||||
aStatus == NS_ERROR_NET_RESET ||
|
||||
aStatus == NS_ERROR_OFFLINE ||
|
||||
aStatus == NS_ERROR_MALWARE_URI ||
|
||||
aStatus == NS_ERROR_PHISHING_URI ||
|
||||
aStatus == NS_ERROR_UNSAFE_CONTENT_TYPE ||
|
||||
aStatus == NS_ERROR_REMOTE_XUL ||
|
||||
aStatus == NS_ERROR_OFFLINE ||
|
||||
NS_ERROR_GET_MODULE(aStatus) == NS_ERROR_MODULE_SECURITY) {
|
||||
// Errors to be shown for any frame
|
||||
DisplayLoadError(aStatus, url, nullptr, aChannel);
|
||||
} else if (aStatus == NS_ERROR_DOCUMENT_NOT_CACHED) {
|
||||
@@ -7914,8 +7892,7 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
||||
}
|
||||
DisplayLoadError(aStatus, url, nullptr, aChannel);
|
||||
}
|
||||
}
|
||||
else if (url && NS_SUCCEEDED(aStatus)) {
|
||||
} else if (url && NS_SUCCEEDED(aStatus)) {
|
||||
// If we have a host
|
||||
mozilla::net::PredictorLearnRedirect(url, aChannel, this);
|
||||
}
|
||||
@@ -8069,9 +8046,9 @@ nsDocShell::CreateAboutBlankContentViewer(nsIPrincipal* aPrincipal,
|
||||
blankDoc->SetSandboxFlags(mSandboxFlags);
|
||||
|
||||
// create a content viewer for us and the new document
|
||||
docFactory->CreateInstanceForDocument(NS_ISUPPORTS_CAST(nsIDocShell*, this),
|
||||
blankDoc, "view",
|
||||
getter_AddRefs(viewer));
|
||||
docFactory->CreateInstanceForDocument(
|
||||
NS_ISUPPORTS_CAST(nsIDocShell*, this), blankDoc, "view",
|
||||
getter_AddRefs(viewer));
|
||||
|
||||
// hook 'em up
|
||||
if (viewer) {
|
||||
@@ -8473,8 +8450,8 @@ class MOZ_STACK_CLASS PresentationEventForgetter
|
||||
{
|
||||
public:
|
||||
explicit PresentationEventForgetter(
|
||||
nsRevocableEventPtr<nsDocShell::RestorePresentationEvent>&
|
||||
aRestorePresentationEvent)
|
||||
nsRevocableEventPtr<nsDocShell::RestorePresentationEvent>&
|
||||
aRestorePresentationEvent)
|
||||
: mRestorePresentationEvent(aRestorePresentationEvent)
|
||||
, mEvent(aRestorePresentationEvent.get())
|
||||
{
|
||||
@@ -8854,7 +8831,8 @@ nsDocShell::RestoreFromHistory()
|
||||
childShell->GetAllowDNSPrefetch(&allowDNSPrefetch);
|
||||
|
||||
bool allowContentRetargeting = childShell->GetAllowContentRetargeting();
|
||||
bool allowContentRetargetingOnChildren = childShell->GetAllowContentRetargetingOnChildren();
|
||||
bool allowContentRetargetingOnChildren =
|
||||
childShell->GetAllowContentRetargetingOnChildren();
|
||||
|
||||
uint32_t defaultLoadFlags;
|
||||
childShell->GetDefaultLoadFlags(&defaultLoadFlags);
|
||||
@@ -8873,7 +8851,8 @@ nsDocShell::RestoreFromHistory()
|
||||
childShell->SetAllowMedia(allowMedia);
|
||||
childShell->SetAllowDNSPrefetch(allowDNSPrefetch);
|
||||
childShell->SetAllowContentRetargeting(allowContentRetargeting);
|
||||
childShell->SetAllowContentRetargetingOnChildren(allowContentRetargetingOnChildren);
|
||||
childShell->SetAllowContentRetargetingOnChildren(
|
||||
allowContentRetargetingOnChildren);
|
||||
childShell->SetDefaultLoadFlags(defaultLoadFlags);
|
||||
|
||||
rv = childShell->BeginRestore(nullptr, false);
|
||||
@@ -9156,8 +9135,9 @@ nsDocShell::CreateContentViewer(const nsACString& aContentType,
|
||||
aOpenedChannel->SetLoadFlags(loadFlags);
|
||||
|
||||
mLoadGroup->AddRequest(aRequest, nullptr);
|
||||
if (currentLoadGroup)
|
||||
if (currentLoadGroup) {
|
||||
currentLoadGroup->RemoveRequest(aRequest, nullptr, NS_BINDING_RETARGETED);
|
||||
}
|
||||
|
||||
// Update the notification callbacks, so that progress and
|
||||
// status information are sent to the right docshell...
|
||||
@@ -9476,6 +9456,7 @@ nsDocShell::CheckLoadingPermissions()
|
||||
//*****************************************************************************
|
||||
// nsDocShell: Site Loading
|
||||
//*****************************************************************************
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef MOZ_PLACES
|
||||
@@ -9591,7 +9572,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
NS_IMETHOD
|
||||
Run()
|
||||
{
|
||||
return mDocShell->InternalLoad2(mURI, mOriginalURI,
|
||||
mLoadReplace,
|
||||
@@ -9721,7 +9703,6 @@ nsDocShell::InternalLoad2(nsIURI* aURI,
|
||||
nsresult rv = NS_OK;
|
||||
mOriginalUriString.Truncate();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
if (aURI) {
|
||||
@@ -9729,7 +9710,6 @@ nsDocShell::InternalLoad2(nsIURI* aURI,
|
||||
}
|
||||
PR_LogPrint("DOCSHELL %p InternalLoad %s\n", this, spec.get());
|
||||
}
|
||||
#endif
|
||||
// Initialize aDocShell/aRequest
|
||||
if (aDocShell) {
|
||||
*aDocShell = nullptr;
|
||||
@@ -10905,7 +10885,7 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
||||
// (ie. POST data, referrer, ...)
|
||||
//
|
||||
if (httpChannel) {
|
||||
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(httpChannel));
|
||||
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(httpChannel));
|
||||
/* Get the cache Key from SH */
|
||||
nsCOMPtr<nsISupports> cacheKey;
|
||||
if (mLSHE) {
|
||||
@@ -11328,7 +11308,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
NS_PRECONDITION(aURI, "uri is null");
|
||||
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
|
||||
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
@@ -11392,7 +11372,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
updateSHistory = false;
|
||||
updateGHistory = false; // XXX Why global history too?
|
||||
}
|
||||
} // rootSH
|
||||
}
|
||||
|
||||
// Check if the url to be loaded is the same as the one already loaded.
|
||||
if (mCurrentURI) {
|
||||
@@ -11461,7 +11441,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
"We shouldn't be updating session history for forced"
|
||||
" reloads!");
|
||||
|
||||
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(aChannel));
|
||||
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(aChannel));
|
||||
nsCOMPtr<nsISupports> cacheKey;
|
||||
// Get the Cache Key and store it in SH.
|
||||
if (cacheChannel) {
|
||||
@@ -11968,7 +11948,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
|
||||
NS_PRECONDITION(aURI, "uri is null");
|
||||
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
|
||||
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
#if defined(DEBUG)
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
@@ -12013,9 +11993,9 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
|
||||
nsCOMPtr<nsISHEntry> child;
|
||||
shContainer->GetChildAt(i, getter_AddRefs(child));
|
||||
shContainer->RemoveChild(child);
|
||||
} // for
|
||||
}
|
||||
entry->AbandonBFCacheEntry();
|
||||
} // shContainer
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new entry if necessary.
|
||||
@@ -12037,7 +12017,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
|
||||
nsCOMPtr<nsISupports> owner = aOwner;
|
||||
bool expired = false;
|
||||
bool discardLayoutState = false;
|
||||
nsCOMPtr<nsICachingChannel> cacheChannel;
|
||||
nsCOMPtr<nsICacheInfoChannel> cacheChannel;
|
||||
if (aChannel) {
|
||||
cacheChannel = do_QueryInterface(aChannel);
|
||||
|
||||
@@ -12381,7 +12361,8 @@ nsDocShell::WalkHistoryEntries(nsISHEntry* aRootEntry,
|
||||
if (aRootShell) {
|
||||
// Walk the children of aRootShell and see if one of them
|
||||
// has srcChild as a SHEntry.
|
||||
nsTObserverArray<nsDocLoader*>::ForwardIterator iter(aRootShell->mChildList);
|
||||
nsTObserverArray<nsDocLoader*>::ForwardIterator iter(
|
||||
aRootShell->mChildList);
|
||||
while (iter.HasMore()) {
|
||||
nsDocShell* child = static_cast<nsDocShell*>(iter.GetNext());
|
||||
|
||||
@@ -13154,10 +13135,6 @@ nsDocShell::SetLayoutHistoryState(nsILayoutHistoryState* aLayoutHistoryState)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsRefreshTimer: Object Management
|
||||
//*****************************************************************************
|
||||
|
||||
nsRefreshTimer::nsRefreshTimer()
|
||||
: mDelay(0), mRepeat(false), mMetaRefresh(false)
|
||||
{
|
||||
@@ -13167,10 +13144,6 @@ nsRefreshTimer::~nsRefreshTimer()
|
||||
{
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsRefreshTimer::nsISupports
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMPL_ADDREF(nsRefreshTimer)
|
||||
NS_IMPL_RELEASE(nsRefreshTimer)
|
||||
|
||||
@@ -13179,9 +13152,6 @@ NS_INTERFACE_MAP_BEGIN(nsRefreshTimer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
|
||||
NS_INTERFACE_MAP_END_THREADSAFE
|
||||
|
||||
///*****************************************************************************
|
||||
// nsRefreshTimer::nsITimerCallback
|
||||
//******************************************************************************
|
||||
NS_IMETHODIMP
|
||||
nsRefreshTimer::Notify(nsITimer* aTimer)
|
||||
{
|
||||
@@ -13196,9 +13166,6 @@ nsRefreshTimer::Notify(nsITimer* aTimer)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShell::InterfaceRequestorProxy
|
||||
//*****************************************************************************
|
||||
nsDocShell::InterfaceRequestorProxy::InterfaceRequestorProxy(
|
||||
nsIInterfaceRequestor* aRequestor)
|
||||
{
|
||||
@@ -13237,8 +13204,9 @@ nsDocShell::SetBaseUrlForWyciwyg(nsIContentViewer* aContentViewer)
|
||||
nsCOMPtr<nsIURI> baseURI;
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
if (sURIFixup)
|
||||
if (sURIFixup) {
|
||||
rv = sURIFixup->CreateExposableURI(mCurrentURI, getter_AddRefs(baseURI));
|
||||
}
|
||||
|
||||
// Get the current document and set the base uri
|
||||
if (baseURI) {
|
||||
@@ -13284,6 +13252,7 @@ nsDocShell::GetAuthPrompt(uint32_t aPromptReason, const nsIID& aIID,
|
||||
//*****************************************************************************
|
||||
// nsDocShell::nsILoadContext
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetAssociatedWindow(nsIDOMWindow** aWindow)
|
||||
{
|
||||
@@ -13533,8 +13502,6 @@ nsDocShell::SelectNone(void)
|
||||
return DoCommand("cmd_selectNone");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// link handling
|
||||
|
||||
class OnLinkClickEvent : public nsRunnable
|
||||
@@ -13594,8 +13561,6 @@ OnLinkClickEvent::OnLinkClickEvent(nsDocShell* aHandler,
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::OnLinkClick(nsIContent* aContent,
|
||||
nsIURI* aURI,
|
||||
@@ -14082,9 +14047,7 @@ nsDocShell::GetAppId(uint32_t* aAppId)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetAppManifestURL(nsAString& aAppManifestURL)
|
||||
{
|
||||
uint32_t appId;
|
||||
GetAppId(&appId);
|
||||
|
||||
uint32_t appId = nsIDocShell::GetAppId();
|
||||
if (appId != nsIScriptSecurityManager::NO_APP_ID &&
|
||||
appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
|
||||
nsCOMPtr<nsIAppsService> appsService =
|
||||
@@ -14154,7 +14117,6 @@ nsDocShell::GetURLSearchParams()
|
||||
class JavascriptTimelineMarker : public TimelineMarker
|
||||
{
|
||||
public:
|
||||
|
||||
JavascriptTimelineMarker(nsDocShell* aDocShell, const char* aName,
|
||||
const char* aReason)
|
||||
: TimelineMarker(aDocShell, aName, TRACING_INTERVAL_START,
|
||||
@@ -14169,7 +14131,7 @@ public:
|
||||
};
|
||||
|
||||
void
|
||||
nsDocShell::NotifyJSRunToCompletionStart(const char *aReason)
|
||||
nsDocShell::NotifyJSRunToCompletionStart(const char* aReason)
|
||||
{
|
||||
bool timelineOn = nsIDocShell::GetRecordProfileTimelineMarkers();
|
||||
|
||||
@@ -14229,7 +14191,8 @@ nsDocShell::MaybeNotifyKeywordSearchLoading(const nsString& aProvider,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate, bool* aShouldIntercept)
|
||||
nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate,
|
||||
bool* aShouldIntercept)
|
||||
{
|
||||
*aShouldIntercept = false;
|
||||
if (mSandboxFlags) {
|
||||
@@ -14237,7 +14200,7 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate, bool* aSho
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIServiceWorkerManager> swm = mozilla::services::GetServiceWorkerManager();
|
||||
nsCOMPtr<nsIServiceWorkerManager> swm = services::GetServiceWorkerManager();
|
||||
if (!swm) {
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -14257,7 +14220,7 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNavigate, bool* aSho
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel)
|
||||
{
|
||||
nsCOMPtr<nsIServiceWorkerManager> swm = mozilla::services::GetServiceWorkerManager();
|
||||
nsCOMPtr<nsIServiceWorkerManager> swm = services::GetServiceWorkerManager();
|
||||
if (!swm) {
|
||||
aChannel->Cancel();
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user